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
e toolset
C:/BoostRelease/tools/build/v2/build\project.jam:888: in using from module
proje ...

$ echo $PATH
bem;C:\Program Files\CollabNet Subversion
Files\TortoiseSVN\bin;C:\Program Files\MecSoft Corporation\Alibre
 Files\QuickTime\QTSystem\;C:\Program Files\Agilent\IO Libraries
ogram Files\IVI Foundation\VISA\WinNT\agvisa;C:\Program Files\IVI
\bin;C:\Program Files\IVI Foundation\VISA\WinNT\Bin\;C:\Program
SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL

$ g++-4 -v
Using built-in specs.
Target: i686-pc-cygwin
Configured with:
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
ith-tune=generic --enable-libgcj-sublibs CC=gcc-4 CXX=g++-4
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 :
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, david.abrahams at, gregod at, cpdaniel at, john at