Omgili, forum search, forums search, search forums, discussion search,discussions search, search discussions, board search, boards search, search boards
  Advanced Search

[boost] My non-system GCC doesn't link programs under b2

On Wed, 25 Jan 2012 18:09:33 -0500, Daryle Walker <...@hotmail.com

I'm still using my 2002 PowerPC/G4 Mac with Mac OS X 10.4 (Tiger).  I loaded GCC 4.6 (with multiprocessor options) onto it with MacPorts.  I have a "user-config.jam" in my home folder like:
//===using xsltproc        : /opt/local/bin/xsltproc        ;
using boostbook        : /opt/local/share/xsl/docbook-xsl/        : /opt/local/share/xml/docbook/4.2        ;
using doxygen ;
using darwin ;using gcc : 4.6 : g++-mp-4.6 : <cxxflagsI've tested GCC-4.6 (with C++11 active) with a "Hello World!" program, so I know it works with single-file programs.  I wanted to test "base_from_member" (part of Boost.Utility) and it worked with the default "darwin" target.  (I ran "b2" in "BOOST_ROOT/libs/utility/test".)  However, running "b2 toolset=gcc-4.6" ended in errors like:
//===common.mkdir ../../../bin.v2/libs/utility/test/base_from_member_test.test/gcc-4.6common.mkdir ../../../bin.v2/libs/utility/test/base_from_member_test.test/gcc-4.6/debuggcc.co mpile.c++ ../../../bin.v2/libs/utility/test/base_from_member_test.test/gcc-4.6/debug/base_ from_member_test.o../base_from_member_test.cpp: In constructor 'bad_class::bad_class()':../base_from_member_test.cpp:129:21: warning: 'bad_class::x_' will be initialized after [-Wreorder]../base_from_member_test.cpp:510:39: warning:   base 'base_class' [-Wreorder]../base_from_member_test.cpp:507:1: warning:   when initialized here [-Wreorder]gcc.link ../../../bin.v2/libs/utility/test/base_from_member_test.test/gcc-4.6/debug/base_ from_member_test/usr/bin/ld: unknown flag: --start-groupcollect2: ld returned 1 exit status
    "g++-mp-4.6"    -o "../../../bin.v2/libs/utility/test/base_from_member_test.test/gcc-4.6/debug/base _from_member_test" -Wl,--start-group "../../../bin.v2/libs/utility/test/base_from_member_test.test/gcc-4.6/debug/base _from_member_test.o"  -Wl,-Bstatic  -Wl,-Bdynamic  -Wl,--end-group -g 

...failed gcc.link ../../../bin.v2/libs/utility/test/base_from_member_test.test/gcc-4.6/debug/base_ from_member_test......skipped <p../../../bin.v2/libs/utility/test/base_from_member_test.test/gcc-4.6/debugG CC-4.6 compiles each C++ file into an object file just fine.  The problem happens when linking various object and library files into an executable; whichever linker gets called (the system linker?) chokes on a  "--start-group" flag.  When I first started writing this message, I thought the problem was GCC-4.6 being too new for the linker, but maybe we have to tweak something in our Jam files instead.  (Could it be the fact I downloaded the multiprocessor variant of GCC-4.6?)
BTW, how do I specify that I only want to try out the base_from_member test without trying to build all other tests in the directory?
Daryle W.


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost



On Wed, 25 Jan 2012 23:13:25 +0000, Daniel James <...@gmail.com

On 25 January 2012 23:09, Daryle Walker <...@hotmail.com
You should use the darwin toolset. It works apart from some
architecture flags which aren't supported by macports gcc.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Fri, 27 Jan 2012 05:23:48 -0500, Daryle Walker <...@hotmail.com

I normally do use the darwin toolset, but it's very old (like my system). I'm deliberately not doing it here so I can test C++11 stuff.


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Fri, 27 Jan 2012 11:42:49 +0100, Juergen Hunold <...@ivembh.de

Hi Daryle,

Well, you should use:

using darwin : 4.6 : g++-mp-4.6 : <cxxflags
for the new gcc with the darwin toolchain (apple linker and whatnot)...

Yours,

Jürgen
--
Dipl.-Math. Jürgen Hunold | IVE mbH
Software-Entwickler | Lützerodestraße 10
Tel: +49 511 897668 33 | 30161 Hannover, Germany
Fax: +49 511 897668 29 | http://www.ivembh.de
juer...@ivembh.de |
| Geschäftsführer:
Sitz des Unternehmens: Hannover | Univ.-Prof. Dr.-Ing. Thomas Siefer
Amtsgericht Hannover, HRB 56965 | PD Dr.-Ing. Alfons Radtke

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

On Mon, 30 Jan 2012 13:45:40 -0500, Dave Abrahams <...@boostpro.com

on Fri Jan 27 2012, Juergen Hunold <juergen.hunold-AT-ivembh.de

I suggest:

using darwin : 4.7 : g++-mp-4.7 : <cxxflags
--
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost