Boost logo

Boost-Build :

Subject: Re: [Boost-build] building libboost_python-mt-s.so*
From: Jürgen Hunold (jhunold_at_[hidden])
Date: 2015-10-19 14:33:03


Hi Paul,

Am Montag, 19. Oktober 2015, 16:12:39 schrieb Paul Hatton:
> I then try to build graph-tool, a Python module, using this build of boost
> which fails looking for this shared library. It does find
> /gpfs/apps/boost/v1.57.0_gcc-v4.7.2/lib/libboost_python-mt-s.a but, of
> course, refuses to link against it, saying:
>
> /usr/bin/ld:
> /gpfs/apps/boost/v1.57.0_gcc-v4.7.2/lib/libboost_python-mt-s.a(from_python.
> o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when
> making a shared object; recompile with -fPIC
>
> which is what I'd expect when a static library is found instead of a shared
> library.

You just have to recompile the static libraries with -fPIC enabled. Add
cxxflags=-fPIC to your commandline and rebuild everything (either b2 clean or
add -a to force recompilation).

Yours,

Jürgen

-- 
* Dipl.-Math. Jürgen Hunold  ! 
* voice: ++49 4257 300       ! Fährstraße 1
* fax  : ++49 4257 300       ! 31609 Balge/Sebbenhausen
* jhunold_at_gmx.eu             ! Germany

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