Boost logo

Boost Users :

From: Vladimir Prus (vladimir_at_[hidden])
Date: 2008-08-16 03:03:37


François Mauger wrote:

> Hi boosters
>
> I just tried to build boost 1.34.1 from source on my laptop
> running Linux Ubuntu 8.04 and gcc version 4.2.3. Unfortunately
> it failed at the very beginning:
......
> ./tools/jam/src/bin.linuxx86/bjam -sICU_PATH=/usr
> --user-config=user-config.jam --with-date_time --with-filesystem
> --with-iostreams --with-program_options --with-python --with-serialization
> --with-thread
> Segmentation fault <=== BLAM!
>
> strace output that prints:
>>>>>>>>
> $ strace tools/jam/src/bin.linuxx86/bjam
> execve("tools/jam/src/bin.linuxx86/bjam",
> ["tools/jam/src/bin.linuxx86/bjam"], [/* 236 vars */]) = 0
.....
> I'm not familiar with the 'strace' utility so I cannot
> guess whatever useful from this output.

strace, while been a highly useful tool for some cases, is not a tool
one would use to debug a segfault, in general.

> So my pb comes from the brand new bjam executable
> (tools/jam/src/bin.linuxx86/bjam) that segfaults systematically
> for some mystery reason.
>
> Using bjam from the 'bjam' Debian package is ok so I can of course
> use the '--with-bjam=/usr/bin/bjam' switch to build the whole
> boost stuff. But I'm not satisfied with this solution for
> the standard boost build procedure worked perfectly as expected
> for boost 1.34.1 under my previous Ubuntu 7.04/gcc 4.1 and also for
> the new boost 1.36.0/gcc 4.2.3.
>
> Maybe someone could give me some hints to understand this problem?

I don't know for sure, without a stacktrace, but the most likely reason
is a mismatch between your bjam version and gcc version. Some of bjam
code, going back as far as Perforce Jam, uses casts liberally, which
gcc optimizer does not like. Technically, gcc is right, but nobody
was able to comprehend its objections fully. gcc 4.1 is not affected
by this issue, and 1.36.0 bjam works this issue around.

- Volodya


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net