Boost logo

Boost Users :

Subject: Re: [Boost-users] [build] How can I change how the linker is called?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-05-08 23:29:53


AMDG

On 05/08/2012 06:52 PM, Daryle Walker wrote:
>
> This is for my PowerPC Tiger Mac system. I've installed GCC 4.7 fromMacPorts on it. I have it set in C++11 mode.
> Yesterday, I wrote on the list that I couldn't get the example file torun in my new trial project. (It's at<https://github.com/CTMacUser/Unionize>.) As soon as I added acompile-fail test and the corresponding line to Jamfile, everything worked!
> Sort of. The compile-fail test fails as expected (at compile-time).The example file still doesn't run due to a linking error I've seen before:
> //========================================[daryle_at_daryle-walkers-emac:test]$ b2 toolset=gcc-4.7...found 30 targets......updating 14 targets...common.mkdir bincommon.mkdir bin/super_union_basics.testcommon.mkdir bin/super_union_basics.test/gcc-4.7common.mkdir bin/super_union_basics.test/gcc-4.7/debuggcc.compile.c++ bin/super_union_basics.test/gcc-4.7/debug/super_union_basics.ogcc.link bin/super_union_basics.test/gcc-4.7/debug/super_union_basicsld: unknown option: --start-groupcollect2: error: ld returned 1 exit status
> "g++-mp-4.7" -o "bin/super_union_basics.test/gcc-4.7/debug/super_union_basics" -Wl,--start-group "bin/super_union_basics.test/gcc-4.7/debug/super_union_basics.o" -Wl,-Bstatic -Wl,-Bdynamic -Wl,--end-group -g
>
> ...failed gcc.link bin/super_union_basics.test/gcc-4.7/debug/super_union_basics......skipped <pbin/super_union_basics.test/gcc-4.7/debug>super_union_basics.run for lack of <pbin/super_union_basics.test/gcc-4.7/debug>super_union_basics...common.mkdir bin/super_union_fail_test.testcommon.mkdir bin/super_union_fail_test.test/gcc-4.7common.mkdir bin/super_union_fail_test.test/gcc-4.7/debuggcc.compile.c++ bin/super_union_fail_test.test/gcc-4.7/debug/super_union_fail_test.oIn file included from super_union_fail_test.cpp:9:0://========================================
> Now "ld" points to a version of ld64 from MacPorts, but that error hasshown up before this. I don't think my versions of "ld" have"--start-group" or "--end-group" options. What should they be instead,and where do I make these changes? (Even if no one here can answer thefirst part, they should be able to answer the second. That's where I'llmake the changes if I have to ask about the first part elsewhere.)
> Oh, I've uploaded the version of the project used here. Its SHA ID is"535241c3f13a9488bd845549ce3b1cf661ffcbac". (It's the latest as of this writing.)
>

Try

using gcc : 4.7 : /command/ : <linker-type>darwin ;

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net