Boost logo

Boost-Build :

Subject: Re: [Boost-build] bjam for Mac OS X
From: Gevorg Voskanyan (v_gevorg_at_[hidden])
Date: 2011-02-22 05:55:03


er wrote:
> For toolset=darwin-4.0 or -4.2. it works seamlessly, but I noticed amending
>the configuration is not even necessary.

Yes, 4.0 and 4.2 should work out of the box.

> >> # ----------------------
> >> # Clang configuration.
> >> # ----------------------
> >> using clang : 4.2 : "/usr/llvm-gcc-4.2/bin/llvm-g++-4.2";
> >>
> >> # ----------------------
> >> # GCC configuration. (ported from unix using fink)
> >> # ----------------------
> >> using gcc : 4.4 : "/sw/lib/gcc4.4/bin/g++";
>
> I replaced the using line by
>
> using gcc : 4.4 : "/sw/lib/gcc4.4/bin/g++" ;
>
> and invoked
>
> sudo bjam toolset=gcc-4.4
>
> but it yields errors (see below) and I'm not sure how to interpret them. Any
>suggestion?
>
> ...patience...
> ...patience...
> ...found 1503 targets...
> ...updating 48 targets...
> common.mkdir
>../../../../../bin.v2/libs/assign/v2/test/unit_testing/detail.test/gcc-4.4
[snip]
> gcc.archive e
>../../../../../bin.v2/libs/test/build/gcc-4.4/debug/link-static/libboost_unit_test_framework.a
>
> gcc.link
>../../../../../bin.v2/libs/assign/v2/test/unit_testing/detail.test/gcc-4.4/debug/detail
>
> ld: : unknown option: --start-group
> collect2: ld returned 1 exit status
>
> "g++-4" -o
>"../../../../../bin.v2/libs/assign/v2/test/unit_testing/detail.test/gcc-4.4/debug/detail"
> -Wl,--start-group
>"../../../../../bin.v2/libs/assign/v2/test/unit_testing/detail.test/gcc-4.4/debug/detail.o"
>"../../../../../bin.v2/libs/test/build/gcc-4.4/debug/link-static/libboost_unit_test_framework.a"
> ; -Wl,-Bstatic -Wl,-Bdynamic -Wl,--end-group -g
>
>
> ...failed gcc.link
>../../../../../bin.v2/libs/assign/v2/test/unit_testing/detail.test/gcc-4.4/debug/detail...
>
> ...skipped
><p../../../../../bin.v2/libs/assign/v2/test/unit_testing/detail.test/gcc-4.4/debug>detail.run
> n for lack of
><p../../../../../bin.v2/libs/assign/v2/test/unit_testing/detail.test/gcc-4.4/debug>detail...
>
> common.mkdir
>../../../../../bin.v2/libs/assign/v2/test/unit_testing/ref.test/gcc-4.4
> common.mkdir r
>../../../../../bin.v2/libs/assign/v2/test/unit_testing/ref.test/gcc-4.4/debug
> gcc.compile.c++
>../../../../../bin.v2/libs/assign/v2/test/unit_testing/ref.test/gcc-4.4/debug/ref.o
>
> gcc.link k
>../../../../../bin.v2/libs/assign/v2/test/unit_testing/ref.test/gcc-4.4/debug/ref
>
> ld: unknown option: --start-group
> collect2: ld returned 1 exit status
[snip]
> ...failed gcc.link
>../../../../../bin.v2/libs/assign/v2/test/unit_testing/utility.test/gcc-4.4/debug/utility...
>
> ...skipped
><p../../../../../bin.v2/libs/assign/v2/test/unit_testing/utility.test/gcc-4.4/debug>utility.run
> n for lack of
><p../../../../../bin.v2/libs/assign/v2/test/unit_testing/utility.test/gcc-4.4/debug>utility...
>
> ...failed updating 4 targets...
> ...skipped 8 targets...
> ...updated 36 targets...
> erwann-macbook:unit_testing erwann$ sudo bjam toolset=darwin-4.0
> ...patience...
> ...patience...
> ...found 1503 targets...

Where this g++ 4.4.comes from? I've had more luck on OS X 10.5 with gcc 4.5 from
MacPorts, and configured it this way:

using darwin : 4.5 : /opt/local/bin/gcc-mp-4.5 : <cxxflags>\"-Wno-long-long\"
<linkflags>\"-L/opt/local/lib\" ;

You could have g++ instead of gcc I have above; I had to write gcc due to other
reasons caused by some complicated project requirements/setup.

Even though that isn't an Apple gcc, 'using darwin' works better than 'using
gcc', the only issue I had with 'using darwin' was just "unrecognized option
'-no-cpp-precomp'" warnings, but otherwise it was fine.

HTH,
Gevorg


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk