|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-08-28 01:13:35
On Thursday 28 August 2008 01:00:40 Juergen Hunold wrote:
> On Wednesday 27 August 2008 21:53:53 David Abrahams wrote:
> > Hi,
> >
> > I've been trying to run the Boost 1.35.0 tests with GCC on Suse Linux
> > Enterprise Server 10/AMD64, and there are some failures that indicate we
> > got something wrong somewhere.
>
> Wow. Thats old ;-))
>
> > /usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld
> >: /zorak/sles/build/boost/bin.v2/libs/statechart/test/gcc-4.1.0/release/
> > link-static/LibTestNormalLibTuTest.o:
> > relocation R_X86_64_32 against `a local symbol' can not be used when
> > making a shared object; recompile with -fPIC
> >
> > I assume that there's something wrong with what Boost.Build is doing
> > here, but I'm at a loss as to how it might be fixed.
>
> Well, x86_64 gcc targets sometimes requires -fPIC even for static builds.
Rather, shared objects must be fully PIC, embedding some
non-PIC code (say from a static library) into a shared library is not OK.
So one solution is to build everything with -fPIC; but it won't help with
linking to system expat, although the changeset that Dave mentioned:
http://svn.boost.org/trac/boost/changeset/47719
should fix that.
> So
> add <cxxflags>-fPIC to your user config jam or the Jamfile for Boost.StateChart.
> And do a full (!) recompile.
>
> This has been fixed on trunk and 1.36.0. Note that command line arguments will
> not work due to a BB bug.
For the record, the changeset that fixed *that* bug is:
http://svn.boost.org/trac/boost/changeset/39104/
I don't know of any change that make this work without explicit -fPIC request
somewhere.
- Volodya
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