Boost logo

Boost :

From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-11-20 17:44:32


----- Original Message -----
From: "Lucas Ackerman" <ackerman_at_[hidden]>

> I'm trying to build the Boost libraries for use of the shared_ptr and
> tuple classes

Well, if you're really fed up you can stop right there. You don't need to
build anything to use these two libraries - they're entirely in header
files.

> and am having a really terrible time at it. I've read
> every recent post on build problems re boost & jam, and even messed with
> the source a bit in hopes of finding any obvious problems. my system is
> Linux 2.2.19, Debian 2.2 (all from potato, except for qt2, and kdevelop
> from the unstable branch), gcc version 2.95.4 (gcc-3.0 ver 3.0.2 is also
> installed, though it seems to make no difference and I don't know how to
> specify for jam to use it instead).

You can define the GCC_ROOT_DIRECTORY variable in your environment or on the
build command-line with -sGCC_ROOT_DIRECTORY=, to point at the installation
of the compiler you want tp use.

> These problems are the same for
> boost 1.25.1 and the latest CVS, iirc, but my output here will be from
> 1.25.1 for consitency's sake.
>
> Having failed at building the included ftjam

Not sure what you're referring to, here. The current CVS snapshot of boost
won't build with FTJam.

> via make and via classic
> perforce jam, I got FTjam 2.3.5 from sourceforge (which reports itself
> as v2.3.2), file ftjam-2.3.5-linux-libc6.tar.gz, since others here have
> reported using it successfully. FTjam won't build Boost itself, as it
> appears there is some missing functionality. this is the output it gives:
>
> jam -ftools/build/allyourbase.jam -sTOOLS=gcc
> tools/build/allyourbase.jam: line 1608: syntax error at keyword (
> don't know how to make all
> ...found 1 target...
> ...can't find 1 target...

Right. You are using FTJam to build the current CVS snapshot. If you want to
use FTJam, you'll have to build from the latest boost release.

If you want to build the CVS snapshot, you can produce Boost Jam by running
FTJam in the tools/build/jam_src subdirectory, or you can try again with
make using these instructions:
http://www.boost.org/tools/build/index.html

> So, I of course need to build the Boost jam, which again bombs. in
> tools/build/jam_src :
>
> jam -sBOOST_ROOT= -sBOOST_BUILD_PATH= -sJAMBASE=
> [snip]
> Link bin.linuxx86/jam
> bin.linuxx86/jam.o: In function `main':
> bin.linuxx86/jam.o(.text+0x25e): undefined reference to `yydebug'
> collect2: ld returned 1 exit status
>
> cc -o bin.linuxx86/jam bin.linuxx86/jam.o bin.linuxx86/jambase.o
> bin.linuxx86/libjam.a
>
> ...failed Link bin.linuxx86/jam ...
> ...failed updating 1 target...

Oops! you can fix this by defining YYDEBUG:

jam -sBOOST_ROOT= -sBOOST_BUILD_PATH= -sJAMBASE= -sCCFLAGS=-DYYDEBUG=1

or you can get the latest sources from CVS and try again.

> I tried commenting out the 2 lines in jam.c where yydebug is used on the
> presumption that I won't be trying to debug it, which allows the build
> to complete correctly, but gives an infinite loop of the following when
> trying to build Boost (where jamtest is my edited build):
>
> jamtest -ftools/build/allyourbase.jam -sTOOLS=gcc
> new-split.jam: No such file or directory
> warning: unknown rule split
> warning: unknown rule split
> [ repeat until segfault ]

With Boost Jam, you need to set BOOST_ROOT as described in the link above.
new-split.jam was there both in the release:
http://www.boost.org/tools/build/new-split.jam and in the CVS state.

> I'd really like to be coding with Boost, but am at a complete loss as
> far as getting it built. I've tried every recent version of build
> instructions found on this list archive, and also tried versions back to
> 1.24.0 (the earliest afaik containing tuple), which fails on 44
> targets. The most common jam message I seem to get is "...found 7
> targets..." alone.
>
> Any help would be much appreciated. thanks,

I hope this helps out. Please let me know if you still have problems.

-Dave


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk