[test] Problems building Boost.Test

Hello, I'm trying to build Boost.Test from SVN trunk. Linking the dynamic libraries fails with gcc 4.0 on OSX. Apparently, the option -h is passed to the linker. Not sure what that means. The complete bjam output follows. Daniel Walker $ echo $OSTYPE darwin9.0 $ gcc --version i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5488) 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. $ bjam --version Boost.Build V2 (Milestone 12) Boost.Jam 03.1.16 $ svn update At revision 49428. $ bjam --toolset=gcc --with-test ...patience... ...found 659 targets... ...updating 2 targets... gcc.link.dll bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/libboost_prg_exec_monitor-gcc40-mt-1_37.dylib ld: unknown option: -h collect2: ld returned 1 exit status "g++" -o "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/libboost_prg_exec_monitor-gcc40-mt-1_37.dylib" -Wl,-h -Wl,libboost_prg_exec_monitor-gcc40-mt-1_37.dylib -shared -Wl,--start-group "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/execution_monitor.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/debug.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/cpp_main.o" -Wl,-Bstatic -Wl,-Bdynamic -Wl,--end-group -Wl,--strip-all ...failed gcc.link.dll bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/libboost_prg_exec_monitor-gcc40-mt-1_37.dylib... gcc.link.dll bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/libboost_unit_test_framework-gcc40-mt-1_37.dylib ld: unknown option: -h collect2: ld returned 1 exit status "g++" -o "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/libboost_unit_test_framework-gcc40-mt-1_37.dylib" -Wl,-h -Wl,libboost_unit_test_framework-gcc40-mt-1_37.dylib -shared -Wl,--start-group "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/execution_monitor.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/debug.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/compiler_log_formatter.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/framework.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/plain_report_formatter.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/progress_monitor.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/results_collector.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/results_reporter.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/test_tools.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/unit_test_log.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/unit_test_main.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/unit_test_monitor.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/unit_test_parameters.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/unit_test_suite.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/xml_log_formatter.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/xml_report_formatter.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/exception_safety.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/interaction_based.o" "bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/logged_expectations.o" -Wl,-Bstatic -Wl,-Bdynamic -Wl,--end-group -Wl,--strip-all ...failed gcc.link.dll bin.v2/libs/test/build/gcc-4.0.1/release/threading-multi/libboost_unit_test_framework-gcc40-mt-1_37.dylib... ...failed updating 2 targets... $

Daniel Walker <daniel.j.walker <at> gmail.com> writes:
Hello,
I'm trying to build Boost.Test from SVN trunk. Linking the dynamic libraries fails with gcc 4.0 on OSX. Apparently, the option -h is passed to the linker. Not sure what that means. The complete bjam
This is Boost.Build question. Maybe ask in Boost.Build list? Genandiy

On Wed, Oct 22, 2008 at 11:15 AM, Steven Watanabe <watanabesj@gmail.com> wrote:
AMDG
Daniel Walker wrote:
$ gcc --version i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5488)
<snip>
$ bjam --toolset=gcc --with-tes
toolset=darwin should work better.
Ah! I wasn't expecting a separate toolset for gcc on OSX. No other OS has a separate gcc toolset. But yeah, that did the trick. It also works for 4.3 built from the gcc source distribution. Thanks! Daniel Walker

AMDG Daniel Walker wrote:
toolset=darwin should work better.
Ah! I wasn't expecting a separate toolset for gcc on OSX. No other OS has a separate gcc toolset. But yeah, that did the trick. It also works for 4.3 built from the gcc source distribution. Thanks!
You should probably use the gcc toolset if you build gcc from the source. Apple's gcc is a little different from the standard gcc. In Christ, Steven Watanabe

On Wed, Oct 22, 2008 at 3:48 PM, Steven Watanabe <watanabesj@gmail.com> wrote:
AMDG
Daniel Walker wrote:
toolset=darwin should work better.
Ah! I wasn't expecting a separate toolset for gcc on OSX. No other OS has a separate gcc toolset. But yeah, that did the trick. It also works for 4.3 built from the gcc source distribution. Thanks!
You should probably use the gcc toolset if you build gcc from the source.
The gcc toolset doesn't work for me for either Apple's gcc build or my own. It still complains about the -h option being passed to the linker.
Apple's gcc is a little different from the standard gcc.
From fiddling with this a little, I'm getting the impression that the difference is mainly Apple's linker; i.e. gcc is the same, but /usr/bin/ld is different - not the usual gnu binutils, which makes sense, I suppose.
Daniel Walker
participants (3)
-
Daniel Walker
-
Gennaidy Rozental
-
Steven Watanabe