Boost logo

Boost-Build :

Subject: Re: [Boost-build] having trouble compiling with gcc
From: Robert Ramey (ramey_at_[hidden])
Date: 2011-10-12 03:49:55


Jürgen Hunold wrote:
> Hi Robert,
>
>
> On Monday, 10. October 2011 23:53:30 Robert Ramey wrote:
>
>> $ bjam -n --dump-tests toolset=gcc
>> C:/BoostRelease/tools/build/v2/tools\gcc.jam:77: in gcc.init from
>> module gcc error: toolset gcc initialization:
>> error: provided command 'g++-4' not found
>
> Please try bjam -n --debug-configuration toolset=gcc
> This should provide more diagnostics to post here.

That seemed to provide some useful information; Here is what my cygwin
command line output shows. MKS korn shell shows the same:

bash-4.1$ c:/bin/bjam -n --debug-configuration toolset=gcc
notice: found boost-build.jam at C:/BoostRelease/boost-build.jam
notice: loading Boost.Build from C:/BoostRelease/tools/build/v2
notice: Searching C:\Documents and Settings\Robert Ramey C:/Documents and
Settin
gs/Robert Ramey C:\Documents and Settings\Robert Ramey
C:\BoostRelease\tools/bui
ld/v2 C:/BoostRelease/tools/build/v2/kernel
C:/BoostRelease/tools/build/v2/util
C:/BoostRelease/tools/build/v2/build C:/BoostRelease/tools/build/v2/tools
C:/Boo
stRelease/tools/build/v2/contrib C:/BoostRelease/tools/build/v2/. for
site-confi
g configuration file site-config.jam .
notice: Loading site-config configuration file site-config.jam from
C:/BoostRele
ase/tools/build/v2/site-config.jam .
notice: Searching C:\Documents and Settings\Robert Ramey C:/Documents and
Settin
gs/Robert Ramey C:\Documents and Settings\Robert Ramey
C:\BoostRelease\tools/bui
ld/v2 C:/BoostRelease/tools/build/v2/kernel
C:/BoostRelease/tools/build/v2/util
C:/BoostRelease/tools/build/v2/build C:/BoostRelease/tools/build/v2/tools
C:/Boo
stRelease/tools/build/v2/contrib C:/BoostRelease/tools/build/v2/. for
user-confi
g configuration file user-config.jam .
notice: Loading user-config configuration file user-config.jam from
C:/BoostRele
ase/tools/build/v2/user-config.jam .
warning: toolset gcc initialization:
warning: can not find user-provided command 'g++'
warning: initialized from C:\BoostRelease\tools/build/v2\user-config.jam:46
C:/BoostRelease/tools/build/v2/tools\gcc.jam:77: in gcc.init from module gcc
error: toolset gcc initialization:
error: provided command 'g++' not found
error: initialized from C:\BoostRelease\tools/build/v2\user-config.jam:46
C:/BoostRelease/tools/build/v2/build\toolset.jam:38: in toolset.using from
modul
e toolset
C:/BoostRelease/tools/build/v2/build\project.jam:888: in using from module
proje
ct-rules
C:\BoostRelease\tools/build/v2\user-config.jam:46: in modules.load from
module u
ser-config
C:/BoostRelease/tools/build/v2\build-system.jam:257: in load-config from
module
build-system
C:/BoostRelease/tools/build/v2\build-system.jam:399: in
load-configuration-files
 from module build-system
C:/BoostRelease/tools/build/v2\build-system.jam:555: in load from module
build-s
ystem
C:\BoostRelease\tools\build\v2/kernel\modules.jam:283: in import from module
mod
ules
C:\BoostRelease\tools\build\v2\kernel\bootstrap.jam:142: in boost-build from
mod
ule
C:\BoostRelease\boost-build.jam:bash-4.1

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-cygwin/4.5.3/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with:
/gnu/gcc/releases/respins/4.5.3-2/gcc4-4.5.3-2/src/gcc-4.5.3/co
nfigure --srcdir=/gnu/gcc/releases/respins/4.5.3-2/gcc4-4.5.3-2/src/gcc-4.5.3
 --
prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdi
r=/usr/lib --datadir=/usr/share --localstatedir=/var --sysconfdir=/etc --dataroo
tdir=/usr/share --docdir=/usr/share/doc/gcc4 -C --datadir=/usr/share --infodir=/
usr/share/info --mandir=/usr/share/man -v --with-gmp=/usr --with-mpfr=/usr --ena
ble-bootstrap --enable-version-specific-runtime-libs --libexecdir=/usr/lib --ena
ble-static --enable-shared --enable-shared-libgcc --disable-__cxa_atexit --with-
gnu-ld --with-gnu-as --with-dwarf2 --disable-sjlj-exceptions --enable-languages=
ada,c,c++,fortran,java,lto,objc,obj-c++ --enable-graphite --enable-lto --enable-
java-awt=gtk --disable-symvers --enable-libjava --program-suffix=-4 --enable-lib
gomp --enable-libssp --enable-libada --enable-threads=posix --with-arch=i686
 --w
ith-tune=generic --enable-libgcj-sublibs CC=gcc-4 CXX=g++-4
CC_FOR_TARGET=gcc-4
CXX_FOR_TARGET=g++-4 GNATMAKE_FOR_TARGET=gnatmake
GNATBIND_FOR_TARGET=gnatbind -
-with-ecj-jar=/usr/share/java/ecj.jar
Thread model: posix
gcc version 4.5.3 (GCC)17: in module scope from module

bash-4.1$

So I the the g++ executable doesn't seem to be found under bjam while under
the shell it's available via the $PATH

The relevant part of my user_config.jam is:

# Configure specific gcc version, giving alternative name to use.
# using gcc : 3.2 : g++-3.2 ;
using gcc : : g++ :
    <linkflags>-Wl,--enable-auto-import
    <linkflags>-Wl,--enable-stdcall-fixup
;

the site_config.jam is the default from the release version.

I've also tried variations of toolset=g++, toolset=g++-4, etc without any
success.
I"ve also tried setting the user_config to various things like

using gcc: 4.5.3 : g++4 ;
using gcc: 4.5.3 : g++ ;

etc.

Any suggestions appreciated.

Robert Ramey


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