compiling fails on MacOS X
Hi, I'm trying to compile boost 1.33 on MacOS X, and I get a number of failures. I have: $ uname -a Darwin akos-maroys-mac-mini.local 8.2.0 Darwin Kernel Version 8.2.0: Fri Jun 24 17:46:54 PDT 2005; root:xnu-792.2.4.obj~3/RELEASE_PPC Power Macintosh powerpc $ gcc --version powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 (Apple Computer, Inc. build 5026) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. I compiled bjam first (without problems), and then issues the following command (according to the documentation): ./tools/build/jam_src/bin.macosxppc/bjam -sTOOLS=darwin --prefix=/tmp/boost I get the following errors: darwin-Archive-action bin/boost/libs/regex/build/libboost_regex.a/darwin/release/libboost_regex-1_33.a ranlib: file: bin/boost/libs/regex/build/libboost_regex.a/darwin/release/libboost_regex-1_33.a(icu.o) has no symbols ranlib: file: bin/boost/libs/regex/build/libboost_regex.a/darwin/release/libboost_regex-1_33.a(regex_debug.o) has no symbols ranlib: file: bin/boost/libs/regex/build/libboost_regex.a/darwin/release/libboost_regex-1_33.a(w32_regex_traits.o) has no symbols ranlib: file: bin/boost/libs/regex/build/libboost_regex.a/darwin/release/libboost_regex-1_33.a(usinstances.o) has no symbols system-Ranlib bin/boost/libs/regex/build/libboost_regex.a/darwin/release/libboost_regex-1_33.a ranlib: file: bin/boost/libs/regex/build/libboost_regex.a/darwin/release/libboost_regex-1_33.a(icu.o) has no symbols ranlib: file: bin/boost/libs/regex/build/libboost_regex.a/darwin/release/libboost_regex-1_33.a(regex_debug.o) has no symbols ranlib: file: bin/boost/libs/regex/build/libboost_regex.a/darwin/release/libboost_regex-1_33.a(w32_regex_traits.o) has no symbols ranlib: file: bin/boost/libs/regex/build/libboost_regex.a/darwin/release/libboost_regex-1_33.a(usinstances.o) has no symbols darwin-Link-DyLib-action bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_prg_exec_monitor-d-1_33.dylib ld: Undefined symbols: __Z8cpp_mainiPPc /usr/bin/libtool: internal link edit command failed ...failed darwin-Link-DyLib-action bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_prg_exec_monitor-d-1_33.dylib... darwin-Link-DyLib-action bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_prg_exec_monitor-1_33.dylib ld: Undefined symbols: __Z8cpp_mainiPPc /usr/bin/libtool: internal link edit command failed ...failed darwin-Link-DyLib-action bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_prg_exec_monitor-1_33.dylib... darwin-Link-DyLib-action bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_test_exec_monitor-d-1_33.dylib ld: Undefined symbols: __Z9test_mainiPPc /usr/bin/libtool: internal link edit command failed ...failed darwin-Link-DyLib-action bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_test_exec_monitor-d-1_33.dylib... darwin-Link-DyLib-action bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_test_exec_monitor-1_33.dylib ld: Undefined symbols: __Z9test_mainiPPc /usr/bin/libtool: internal link edit command failed ...failed darwin-Link-DyLib-action bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_test_exec_monitor-1_33.dylib... darwin-Link-DyLib-action bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/libboost_unit_test_framework-d-1_33.dylib ld: Undefined symbols: __Z20init_unit_test_suiteiPPc /usr/bin/libtool: internal link edit command failed ...failed darwin-Link-DyLib-action bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/libboost_unit_test_framework-d-1_33.dylib... darwin-Link-DyLib-action bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/libboost_unit_test_framework-1_33.dylib ld: Undefined symbols: __Z20init_unit_test_suiteiPPc /usr/bin/libtool: internal link edit command failed
Ákos Maróy wrote:
Hi,
I'm trying to compile boost 1.33 on MacOS X, and I get a number of failures. I have:
<snip>
I went back and reviewed the massive bjam output from my build of 1.33.0 RC1. I get different "has no symbols" errors, but I got the same set of "internal link edit command failed" errors. I did this on the same version of Mac OSX and gcc that you are using. This suggests to me that the unit test framework library has some problem related to the Mac. I took a quick look at the code, but it was not clear to me what could be wrong. Finding cpp_main wasn't quite good enough.) I am using many other parts of the library, and everything I have used works as expected. I changed the headline a little bit, so that it includes [Unit Test}. I'm hoping this will flag it for the developer. - Rush
I need more information to provide any intelligent help. Gennadiy
Hi,
I'm trying to compile boost 1.33 on MacOS X, and I get a number of failures. I have:
I went back and reviewed the massive bjam output from my build of 1.33.0 RC1. I get different "has no symbols" errors, but I got the same set of "internal link edit command failed" errors. I did this on the same version of Mac OSX and gcc that you are using. This suggests to me that the unit test framework library has some problem related to the Mac. I took a quick look at the code, but it was not clear to me what could be wrong. Finding cpp_main wasn't quite good enough.)
I am using many other parts of the library, and everything I have used works as expected.
I changed the headline a little bit, so that it includes [Unit Test}. I'm hoping this will flag it for the developer.
- Rush
Gennadiy Rozental wrote:
I need more information to provide any intelligent help.
Gennadiy
Hi Gennadiy, I downloaded the 1.33.0 release and built it using this exact command line: bjam -sTOOLS=darwin --layout=versioned --prefix=/Users/rmanbert/Builds/Boost/boost_1_33_0/prefix --exec-prefix=/Users/rmanbert/Builds/Boost/boost_1_33_0/exec-prefix --builddir=/Users/rmanbert/Builds/Boost/boost_1_33_0 | tee /Users/rmanbert/Builds/Boost/boost_1_33_0/BoostBuildOutput_1_33_0_Full.txt It got the errors as previously described. I built it again with the same command line, attempting to reduce the noise in the captured output, and tee'd it into BoostBuildOutput_1_33_0_Partial.txt. The attached zip file contains both of the text files that capture the output. Please let me know if I can do anything else to help. - Rush
Hi Gennadiy,
I downloaded the 1.33.0 release and built it using this exact command line: bjam -sTOOLS=darwin --layout=versioned --prefix=/Users/rmanbert/Builds/Boost/boost_1_33_0/prefix --exec-prefix=/Users/rmanbert/Builds/Boost/boost_1_33_0/exec-prefix --builddir=/Users/rmanbert/Builds/Boost/boost_1_33_0 | tee /Users/rmanbert/Builds/Boost/boost_1_33_0/BoostBuildOutput_1_33_0_Full.txt
It got the errors as previously described. I built it again with the same command line, attempting to reduce the noise in the captured output, and tee'd it into BoostBuildOutput_1_33_0_Partial.txt.
The attached zip file contains both of the text files that capture the output. Please let me know if I can do anything else to help.
Hi, Rush I do not see any Boost.Test errors in an output. The only errors I see is from linking of Boost.Test component. The person who supports darwin toolset would be the one who could answer the best (log doesn't really contains any indication what really happend - it's just failed to link and that's it, ). Your best shot would be to reiterate the same issue on jamboost (Boost.Build dev/support) group. Gennadiy
Gennadiy Rozental wrote:
I do not see any Boost.Test errors in an output. The only errors I see is
from linking of Boost.Test component. The person who supports darwin toolset would be the one who could answer the best (log doesn't really contains any indication what really happend - it's just failed to link and that's it, ). Your best shot would be to reiterate the same issue on jamboost (Boost.Build dev/support) group.
Okay, I joined the list and posted there. We'll see what happens. Thanks for looking at it. - Rush
Ákos Maróy wrote:
Rush Manbert wrote:
Okay, I joined the list and posted there. We'll see what happens. Thanks for looking at it.
I'm not sure I understand what's going on here..
is anyone looking at the problem?
Hi Akos, I think the post on the Jamboost list is not going to go anywhere. I just looked again at the build output files that I posted on Friday. While they do show the link errors, they don't have any indication of the undefined symbols errors that you saw, and that were in my build output from 1.33.0 RC1. Can you post again with a text file that contains the Bjam output, making sure that it has all of the errors you were seeing originally? My guess is that Gennadiy still needs to look at it, but the output I generated isn't helping. Sigh. - Rush
Gennadiy Rozental wrote:
Hi, Rush
I do not see any Boost.Test errors in an output. The only errors I see is from linking of Boost.Test component. The person who supports darwin toolset would be the one who could answer the best (log doesn't really contains any indication what really happend - it's just failed to link and that's it, ). Your best shot would be to reiterate the same issue on jamboost (Boost.Build dev/support) group.
Hi Gennadiy, I'm sorry for the screwup. It looks like I didn't capture the stderr output in the text file. The attached file is from another build attempt that fails updating those same 6 targets, but it shows the undefined symbol errors. If I go and look in the build directories, I can see that cpp_main.o, for instance, exists, but cpp_main does not seem to be defined. When I go and look at cpp_main.ipp I have to admit that I don't really understand what's going on with cpp_main_caller, but it looks like cpp_main is supposed to be supplied by the user of the library. Anyway, I hoped that you would give another look at the attached file and see if you still think it is a tools problem. I haven't gotten any answer from the maintainer on the jamboost list. - Rush ush-Manberts-Computer:~/Sources/Boost/boost_1_33_0 rmanbert$ bjam -sTOOLS=darwin --layout=versioned --prefix=/Users/rmanbert/Builds/Boost/boost_1_33_0/prefix --exec-prefix=/Users/rmanbert/Builds/Boost/boost_1_33_0/exec-prefix --builddir=/Users/rmanbert/Builds/Boost/boost_1_33_0 --------------------------------------------------------------------- *** If you don't need Boost.Python, you can ignore this section *** *** pass --without-python to suppress this message in the future *** skipping Boost.Python library build due to missing or incorrect configuration couldn't find Python.h in "/System/Library/Frameworks/Python.framework/Versions/2.2/include/python2.2" You can configure the location of your python installation by setting: PYTHON_ROOT - currently "/System/Library/Frameworks/Python.framework/Versions/2.2" PYTHON_VERSION - The 2-part python Major.Minor version number (e.g. "2.2", NOT "2.2.1") - currently "2.2" The following are automatically configured from PYTHON_ROOT if not otherwise set: PYTHON_LIB_PATH - path to Python library object; currently PYTHON_INCLUDES - path to Python #include directories; currently "/System/Library/Frameworks/Python.framework/Versions/2.2/include/python2.2" --------------------------------------------------------------------- Building Boost.Regex with the optional Unicode/ICU support disabled. Please refer to the Boost.Regex documentation for more information (and if you don't know what ICU is then you probably don't need it). ...found 8882 targets... ...updating 6 targets... darwin-Link-DyLib-action /Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_prg_exec_monitor-d-1_33.dylib ld: Undefined symbols: __Z8cpp_mainiPPc /usr/bin/libtool: internal link edit command failed DYLD_LIBRARY_PATH=/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/debug/shared-linkable-true export DYLD_LIBRARY_PATH ld -dynamic -m -r -d -o "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_prg_exec_monitor-d-1_33.lo" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/debug/shared-linkable-true/execution_monitor.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/debug/shared-linkable-true/cpp_main.o" \ && \ c++ -g -o "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_prg_exec_monitor-d-1_33.dylib" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_prg_exec_monitor-d-1_33.lo" \ \ -dynamiclib -install_name "libboost_prg_exec_monitor-d-1_33.dylib" \ && \ rm -f "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_prg_exec_monitor-d-1_33.lo" ...failed darwin-Link-DyLib-action /Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_prg_exec_monitor-d-1_33.dylib... darwin-Link-DyLib-action /Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_prg_exec_monitor-1_33.dylib ld: Undefined symbols: __Z8cpp_mainiPPc /usr/bin/libtool: internal link edit command failed DYLD_LIBRARY_PATH=/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/release/shared-linkable-true export DYLD_LIBRARY_PATH ld -dynamic -m -r -d -o "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_prg_exec_monitor-1_33.lo" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/release/shared-linkable-true/execution_monitor.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/release/shared-linkable-true/cpp_main.o" \ && \ c++ -Wl,-x -o "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_prg_exec_monitor-1_33.dylib" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_prg_exec_monitor-1_33.lo" \ \ -dynamiclib -install_name "libboost_prg_exec_monitor-1_33.dylib" \ && \ rm -f "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_prg_exec_monitor-1_33.lo" ...failed darwin-Link-DyLib-action /Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_prg_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_prg_exec_monitor-1_33.dylib... darwin-Link-DyLib-action /Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_test_exec_monitor-d-1_33.dylib ld: Undefined symbols: __Z9test_mainiPPc /usr/bin/libtool: internal link edit command failed DYLD_LIBRARY_PATH=/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true export DYLD_LIBRARY_PATH ld -dynamic -m -r -d -o "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_test_exec_monitor-d-1_33.lo" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/compiler_log_formatter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/execution_monitor.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/framework.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/plain_report_formatter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/progress_monitor.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/results_collector.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/results_reporter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/test_main.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/test_tools.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/unit_test_log.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/unit_test_main.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/unit_test_monitor.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/unit_test_parameters.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/unit_test_suite.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/xml_log_formatter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/xml_report_formatter.o" \ && \ c++ -g -o "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_test_exec_monitor-d-1_33.dylib" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_test_exec_monitor-d-1_33.lo" \ \ -dynamiclib -install_name "libboost_test_exec_monitor-d-1_33.dylib" \ && \ rm -f "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_test_exec_monitor-d-1_33.lo" ...failed darwin-Link-DyLib-action /Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/debug/shared-linkable-true/libboost_test_exec_monitor-d-1_33.dylib... darwin-Link-DyLib-action /Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_test_exec_monitor-1_33.dylib ld: Undefined symbols: __Z9test_mainiPPc /usr/bin/libtool: internal link edit command failed DYLD_LIBRARY_PATH=/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true export DYLD_LIBRARY_PATH ld -dynamic -m -r -d -o "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_test_exec_monitor-1_33.lo" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/compiler_log_formatter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/execution_monitor.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/framework.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/plain_report_formatter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/progress_monitor.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/results_collector.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/results_reporter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/test_main.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/test_tools.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/unit_test_log.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/unit_test_main.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/unit_test_monitor.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/unit_test_parameters.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/unit_test_suite.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/xml_log_formatter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/xml_report_formatter.o" \ && \ c++ -Wl,-x -o "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_test_exec_monitor-1_33.dylib" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_test_exec_monitor-1_33.lo" \ \ -dynamiclib -install_name "libboost_test_exec_monitor-1_33.dylib" \ && \ rm -f "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_test_exec_monitor-1_33.lo" ...failed darwin-Link-DyLib-action /Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_test_exec_monitor.dylib/darwin/release/shared-linkable-true/libboost_test_exec_monitor-1_33.dylib... darwin-Link-DyLib-action /Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/libboost_unit_test_framework-d-1_33.dylib ld: Undefined symbols: __Z20init_unit_test_suiteiPPc /usr/bin/libtool: internal link edit command failed DYLD_LIBRARY_PATH=/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true export DYLD_LIBRARY_PATH ld -dynamic -m -r -d -o "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/libboost_unit_test_framework-d-1_33.lo" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/compiler_log_formatter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/execution_monitor.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/framework.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/plain_report_formatter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/progress_monitor.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/results_collector.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/results_reporter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/test_tools.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/unit_test_log.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/unit_test_main.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/unit_test_monitor.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/unit_test_parameters.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/unit_test_suite.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/xml_log_formatter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/xml_report_formatter.o" \ && \ c++ -g -o "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/libboost_unit_test_framework-d-1_33.dylib" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/libboost_unit_test_framework-d-1_33.lo" \ \ -dynamiclib -install_name "libboost_unit_test_framework-d-1_33.dylib" \ && \ rm -f "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/libboost_unit_test_framework-d-1_33.lo" ...failed darwin-Link-DyLib-action /Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/debug/shared-linkable-true/libboost_unit_test_framework-d-1_33.dylib... darwin-Link-DyLib-action /Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/libboost_unit_test_framework-1_33.dylib ld: Undefined symbols: __Z20init_unit_test_suiteiPPc /usr/bin/libtool: internal link edit command failed DYLD_LIBRARY_PATH=/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true export DYLD_LIBRARY_PATH ld -dynamic -m -r -d -o "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/libboost_unit_test_framework-1_33.lo" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/compiler_log_formatter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/execution_monitor.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/framework.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/plain_report_formatter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/progress_monitor.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/results_collector.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/results_reporter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/test_tools.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/unit_test_log.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/unit_test_main.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/unit_test_monitor.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/unit_test_parameters.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/unit_test_suite.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/xml_log_formatter.o" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/xml_report_formatter.o" \ && \ c++ -Wl,-x -o "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/libboost_unit_test_framework-1_33.dylib" "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/libboost_unit_test_framework-1_33.lo" \ \ -dynamiclib -install_name "libboost_unit_test_framework-1_33.dylib" \ && \ rm -f "/Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/libboost_unit_test_framework-1_33.lo" ...failed darwin-Link-DyLib-action /Users/rmanbert/Builds/Boost/boost_1_33_0/bin/boost/libs/test/build/libboost_unit_test_framework.dylib/darwin/release/shared-linkable-true/libboost_unit_test_framework-1_33.dylib... ...failed updating 6 targets... Rush-Manberts-Computer:~/Sources/Boost/boost_1_33_0 rmanbert$
Hi Gennadiy,
I'm sorry for the screwup. It looks like I didn't capture the stderr output in the text file. The attached file is from another build attempt that fails updating those same 6 targets, but it shows the undefined symbol errors. If I go and look in the build directories, I can see that
I am no expect for Mac, but from an output it looks like this system, the same as Windows, doesn't support unresolved symbols within shared libraries. If you could confirm that this is true, I will have to update a Jamfile to prevent these to be built and you should be using static libraries instead. If it's not true - this is toolset issue. Gennadiy
Gennadiy Rozental wrote:
Hi Gennadiy,
I'm sorry for the screwup. It looks like I didn't capture the stderr output in the text file. The attached file is from another build attempt that fails updating those same 6 targets, but it shows the undefined symbol errors. If I go and look in the build directories, I can see that
I am no expect for Mac, but from an output it looks like this system, the same as Windows, doesn't support unresolved symbols within shared libraries. If you could confirm that this is true, I will have to update a Jamfile to prevent these to be built and you should be using static libraries instead. If it's not true - this is toolset issue.
Gennadiy
It appears that the default treatment for undefined symbols is error, but there are a couple of ld flags that can circumvent that. Excerpt from "man ld": -undefined treatment Specifies how undefined symbols are to be treated. treatment can be: error, warning, or suppress. Which cause the treatment of undefined symbols as either, errors, warnings, or suppresses the checking of undefined symbols. The default is to treat undefined symbols as errors. When the environment variable MACOSX_DEPLOYMENT_TARGET is set to 10.3 or higher then -unde- fined dynamic_lookup can also be used to allow any undefined symbols to be looked up dynamically at runtime. Use of a binary built with this flag requires a system with a dynamic linker from Mac OS X 10.3 or later. The flag -undefined define_a_way can also be used to cause the static linker to create a private definition for all undefined symbols. This flag should only be used if it is known that the undefined symbols are not refer- enced as any use of them may cause a crash. -U sym Allow the symbol sym to be undefined, even if the -r flag is not given. Produce an executable file if the only undefined symbols are those specified with -U. This option overlaps with a compiler option. If you use the compiler driver cc(1) to invoke ld, invoke this option in this way: -Wl,-U,sym. And since -U references -r: -r Save the relocation information in the output file so that it can be the subject of another ld run. The resulting file type is a Mach-O relocatable file (MH_OBJECT) if not otherwise speci- fied. This flag also prevents final definitions from being given to common symbols, and suppresses the `undefined symbol' diagnostics. So it looks like the dylibs can be built if the right flags are passed to ld. I would try it, but I have no idea how to go about changing the jamfile, or even which one to change. If you want me to test a modified jamfile, you could email it with instructions to rush at manbert dot com. - Rush
So it looks like the dylibs can be built if the right flags are passed to ld. I would try it, but I have no idea how to go about changing the jamfile, or even which one to change. If you want me to test a modified jamfile, you could email it with instructions to rush at manbert dot com. - Rush
You don't change Jamfile to add flags to linker. There is tool file that is responcible for that. In this case it's boost\tools\build\v1\darwin-tools.jam. I am no expert in this staff. So you better ask Boost.Build guys. Gennadiy
Gennadiy Rozental wrote:
So it looks like the dylibs can be built if the right flags are passed to ld. I would try it, but I have no idea how to go about changing the jamfile, or even which one to change. If you want me to test a modified jamfile, you could email it with instructions to rush at manbert dot com. - Rush
You don't change Jamfile to add flags to linker. There is tool file that is responcible for that. In this case it's boost\tools\build\v1\darwin-tools.jam. I am no expert in this staff. So you better ask Boost.Build guys.
Gennadiy
But everything else builds successfully. It doesn't seem reasonable that you would want to make undefined symbols acceptable for all dylib builds, just for the test subsystem. Isn't there a provision for special cases on a per-library basis? (For instance, I found a Jamfile in boost_1_33_0/libs/date_time/build that appears to provide special handling for the library creation.) - Rush
participants (3)
-
Gennadiy Rozental
-
Rush Manbert
-
Ákos Maróy