
Since I'm trying to Boostify (is that a legitimate word now? - heck you can verb anything these days) my code, I decided to try bjam: Gulp, having been weaned on automake and fiends [sic] it looks like it should be easy enough, but I've fallen at the first hurdle: In Jamroot: using gcc : 4.4 : g++-4 ; exe example_basic : example_basic.cpp : <include>. ; The <include>. line, as I understand it will mean the #include <blah> that I use will pick up stuff in the same directory as the source file (this seems ok). My problem is the link stage, $ bjam example_basic ...found 53 targets... ...updating 1 target... gcc.link bin/gcc-4.4/debug/example_basic /usr/bin/ld: unknown flag: --start-group collect2: ld returned 1 exit status "g++-4" -o "bin/gcc-4.4/debug/example_basic" -Wl,--start- group "bin/gcc-4.4/debug/example_basic.o" -Wl,-Bstatic -Wl,- Bdynamic -Wl,--end-group -g ...failed gcc.link bin/gcc-4.4/debug/example_basic... I've no idea where all this --start-group stuff comes from -- never seen it before. Any ideas? -ed ------------------------------------------------ "No more boom and bust." -- Dr. J. G. Brown, 1997

AMDG Edward Grace wrote:
Since I'm trying to Boostify (is that a legitimate word now? - heck you can verb anything these days) my code, I decided to try bjam:
Gulp, having been weaned on automake and fiends [sic] it looks like it should be easy enough, but I've fallen at the first hurdle:
In Jamroot: using gcc : 4.4 : g++-4 ; exe example_basic : example_basic.cpp : <include>. ;
The <include>. line, as I understand it will mean the #include <blah> that I use will pick up stuff in the same directory as the source file (this seems ok).
My problem is the link stage,
$ bjam example_basic ...found 53 targets... ...updating 1 target... gcc.link bin/gcc-4.4/debug/example_basic /usr/bin/ld: unknown flag: --start-group collect2: ld returned 1 exit status
"g++-4" -o "bin/gcc-4.4/debug/example_basic" -Wl,--start-group "bin/gcc-4.4/debug/example_basic.o" -Wl,-Bstatic -Wl,-Bdynamic -Wl,--end-group -g
...failed gcc.link bin/gcc-4.4/debug/example_basic...
I've no idea where all this --start-group stuff comes from -- never seen it before.
What does g++ --version say? In Christ, Steven Watanabe

On 23 Aug 2009, at 15:27, Steven Watanabe wrote:
AMDG
Edward Grace wrote:
[snip]
"g++-4" -o "bin/gcc-4.4/debug/example_basic" -Wl,--start-group "bin/gcc-4.4/debug/example_basic.o" -Wl,-Bstatic -Wl,-Bdynamic -Wl,--end-group -g
...failed gcc.link bin/gcc-4.4/debug/example_basic...
I've no idea where all this --start-group stuff comes from -- never seen it before.
What does g++ --version say?
It sayeth various things, the default Apple vended compiler is: $ g++ --version i686-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370) 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. The one I want to use is: $ g++-4 --version g++-4 (GCC) 4.4.0 Copyright (C) 2009 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. -ed

AMDG Edward Grace wrote:
On 23 Aug 2009, at 15:27, Steven Watanabe wrote:
What does g++ --version say?
It sayeth various things, the default Apple vended compiler is:
$ g++ --version i686-apple-darwin8-g++-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5370) 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.
The one I want to use is:
$ g++-4 --version g++-4 (GCC) 4.4.0 Copyright (C) 2009 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.
Ok. use using darwin : ... ; instead of using gcc : ... ; In Christ, Steven Watanabe

Ok. use using darwin : ... ; instead of using gcc : ... ;
Bingo! Thanks! That works fine for the default darwin setup, however when I want to use g++-4 (which I would like to for testing purposes), the following doesn't work in the Jamfile using darwin : 4.4 : g++-4 ; bjam then returns with... darwin.compile.c++ bin/darwin-4.4/debug/example_basic.o g++-4: unrecognized option '-no-cpp-precomp' presumably I need to just tweak some sort of configuration file. Any idea where it lives? -ed ------------------------------------------------ "No more boom and bust." -- Dr. J. G. Brown, 1997

AMDG Edward Grace wrote:
That works fine for the default darwin setup, however when I want to use g++-4 (which I would like to for testing purposes), the following doesn't work in the Jamfile
using darwin : 4.4 : g++-4 ;
bjam then returns with... darwin.compile.c++ bin/darwin-4.4/debug/example_basic.o g++-4: unrecognized option '-no-cpp-precomp'
presumably I need to just tweak some sort of configuration file. Any idea where it lives?
All the toolsets are defined in tools/build/v2/tools/<toolset name>.jam Since g++-4 is a standard gcc distribution, but uses Apple's linker try using gcc : 4.4 : g++-4 : <linker-type>darwin ; The linker-type is deduced automatically for most cases. I don't know why it isn't for darwin. In Christ, Steven Watanabe

On 23 Aug 2009, at 19:36, Steven Watanabe wrote:
AMDG
Edward Grace wrote:
That works fine for the default darwin setup, however when I want to use g++-4 (which I would like to for testing purposes), the following doesn't work in the Jamfile
using darwin : 4.4 : g++-4 ;
bjam then returns with... darwin.compile.c++ bin/darwin-4.4/debug/example_basic.o g++-4: unrecognized option '-no-cpp-precomp'
presumably I need to just tweak some sort of configuration file. Any idea where it lives?
All the toolsets are defined in tools/build/v2/tools/<toolset name>.jam Since g++-4 is a standard gcc distribution, but uses Apple's linker try using gcc : 4.4 : g++-4 : <linker-type>darwin ; The linker-type is deduced automatically for most cases. I don't know why it isn't for darwin.
Thanks for that -- now I know where to look I feel empowered... So far so working! ;-) -ed
participants (2)
-
Edward Grace
-
Steven Watanabe