Boost logo

Boost-Build :

Subject: Re: [Boost-build] bjam for Mac OS X -gcc4.x
From: er (er.ci.2020_at_[hidden])
Date: 2011-02-22 10:44:08


On 2/22/11 1:42 PM, Gevorg Voskanyan wrote:
> er wrote:
>>> Where this g++ 4.4.comes from? I've had more luck on OS X 10.5 with gcc 4.5
>> from
>>
>> It comes from http://pdb.finkproject.org/pdb/package.php/gcc44
>> I did:
>>
>> using darwin : 4.4 : /sw/lib/gcc4.4/bin/g++ :
>> <linkflags>\"-L/sw/lib/gcc4.4/bin\" ;
>>
>> and
>>
>> sudo bjam toolset=darwin-4.4
>>
>> and apparently it works! But unfortunately, not with
>>
>> sudo bjam toolset=darwin-4.4 cxxflags=-std=c++0x
>>
>> which was the reason for porting from unix in the first place:
>>
>> ...patience...
>> ...patience...
>> ...found 1503 targets...
>> ...updating 16 targets...
>> darwin.compile.c++
>> ../../../../../bin.v2/libs/assign/v2/test/unit_testing/utility.test/darwin-4.4/debug/utility.o
>>
>> cc1plus: error: unrecognized command line option "-std=c++0x"
>>
>> "g++" -ftemplate-depth-128 -O0 -fno-inline -Wall -g -dynamic
>> -no-cpp-precomp -gdwarf-2 -fPIC -std=c++0x -DBOOST_ALL_NO_LIB=1
>> -DBOOST_TEST_NO_AUTO_LINK=1 -I"../../../../.." -c -o
>> "../../../../../bin.v2/libs/assign/v2/test/unit_testing/utility.test/darwin-4.4/debug/utility.o"
>> "utility.cpp"
>
>
> Here, the compiler invoked is "g++" but should have been
> "/sw/lib/gcc4.4/bin/g++" if everything were configured correctly. Please check
> that the configuration is in ~/user-config.jam (and only), is typed correctly,
> and the paths are correct.
>

Thanks for following up.

- The path /sw/lib/gcc4.4/bin is indeed that which shortcut
/sw/bin/g++-4 points to.
- The configuration is in
/usr/local/boost-trunk/tools/build/v2/user-config.jam.
- find / tells me the only other user-config.jam's are in
~/sandbox/somewhere and I doubt that bjam looks there.
- In particular, I have not had to ammend ~/user-config.jam as it does
not exist.
- If you see to it differently (about its existence), let me know.

>> PS: It works from IDE CodeBlocks with the following settings:
>> search path = /sw/bin, C compiler = gcc-4, C++ compiler = g++-4, Linker
>> for dyn libs = g++-4. These are in fact shortcuts to gcc and g++ in
>> /sw/lib/gcc4.4/bin
>
> What happens when you try:
> using darwin : 4.4 : /sw/bin/g++-4 ;
> ?
>

In user-config.jam I tried both

  using darwin : 4.4 : /sw/bin/g++-4 : <linkflags>\"-L/sw/bin\" ;

and

  using darwin : 4.4 : g++-4 : <linkflags>\"-L/sw/bin\" ;

with similar results:

$sudo bjam toolset=darwin-4.4
...patience...
...patience...
...found 1503 targets...
...updating 16 targets...
darwin.compile.c++
../../../../../bin.v2/libs/assign/v2/test/unit_testing/detail.test/darwin-4.4/debug/detail.o
g++-4: unrecognized option '-no-cpp-precomp'
darwin.link
../../../../../bin.v2/libs/assign/v2/test/unit_testing/detail.test/darwin-4.4/debug/detail
ld: warning: in
../../../../../bin.v2/libs/test/build/darwin-4.4/debug/link-static/libboost_unit_test_framework.a,
file was built for unsupported file format which is not the architecture
being linked (i386)
Undefined symbols:

"file was built for unsupported file format which is not the
architecture being linked (i386)" is perhaps revealing that I shouldn't
mix a ported compiler with toolset=darwin? So I tried

  using gcc : 4.4 : g++-4 : <linkflags>\"-L/sw/bin\" ;

$sudo bjam toolset=gcc-4.4
...patience...
...patience...
...found 1503 targets...
...updating 16 targets...
gcc.compile.c++
../../../../../bin.v2/libs/assign/v2/test/unit_testing/detail.test/gcc-4.4/debug/detail.o
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 "-L/sw/bin"

etc.

> Gevorg
> _______________________________________________
> Unsubscribe& other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
>


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