Boost logo

Boost-Build :

Subject: [Boost-build] having trouble compiling with gcc
From: Robert Ramey (ramey_at_[hidden])
Date: 2011-10-10 17:53:30


After many month of not doing this, I'm running boost build with my cygwin
gcc compiler and having lots of trouble. I don't think this is a boost build
issue per se, but rather a side effect of something in my setup.
Unfortunately I can no way figure out what it is. Perhaps someone might
recognise my symtoms and offer a diagnosis.

>From my mks korn shell I run

$ 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
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 ...

$ echo $PATH
c:/cygwin/bin;./;c:/Program
Files/MKS/mksnt;c:/bin;c:/menu;C:\WINDOWS\System32\W
bem;C:\Program Files\CollabNet Subversion
Server;C:\WINDOWS\System32;C:\Program
Files\TortoiseSVN\bin;C:\Program Files\MecSoft Corporation\Alibre
CAM;C:\Program
 Files\QuickTime\QTSystem\;C:\Program Files\Agilent\IO Libraries
Suite\bin;C:\Pr
ogram Files\IVI Foundation\VISA\WinNT\agvisa;C:\Program Files\IVI
Foundation\IVI
\bin;C:\Program Files\IVI Foundation\VISA\WinNT\Bin\;C:\Program
Files\Microsoft
SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL
Server\100\DTS\Binn\

$ g++-4 -v
Using built-in specs.
COLLECT_GCC=g++-4
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)

So it looks like the path I'm using in my shell isn't the same one that bjam
is using.

I've done the exact same experiments with my cygwin shell ... with (almost)
the exact same
results. The only difference is the cygwin path displays differently -
which seems OK to me.

The relevant section 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++-4 :
    <linkflags>-Wl,--enable-auto-import
    <linkflags>-Wl,--enable-stdcall-fixup
;
which looks correct to me - especially since my bjam line shows toolset=gcc
and this is getting rendered as g++-4 by the time it fails to be found.

Has anyone else had a similar problem and found the right solution? any
advice 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