Subject: Re: [Boost-build] Problem with -fPIC and boost::detail::sp_counted_base
From: Bo Jensen (jensen.bo_at_[hidden])
Date: 2011-07-28 08:43:40
On Fri, Apr 29, 2011 at 10:00 AM, Bo Jensen <jensen.bo_at_[hidden]> wrote:
> I am building static library on 64 bit linux, but get this error :
> gcc.link.dll bin/gcc-4.6.1/release/address-model-64/threading-multi/libcapi-sulum.so
> /usr/bin/ld: bin/intel-linux/release/address-model-64/link-static/threading-multi/libsulum-lib.a(model.o):
> relocation R_X86_64_32 against `vtable for
> boost::detail::sp_counted_base' can not be used when making a shared
> object; recompile with -fPIC
> could not read symbols: Bad value
> Everything is compiled with -fPIC, so I am a bit confused with this
> link error. Further more there are so many hits in the code base on
> this function, so I can not really figure out where the problem is and
> how to fix it.
> I am using lintel to compile and gcc for linking, but the same error
> happens with gcc for both compile and link.
> Any thoughts ?
Sorry for reposting this old thread, but I got no reply, so trying
this last time since it's really a showstopper for me.
As explained above, I am creating a static library which is included
in a shared library, the static library contains several boost libs,
but all are compiled with -fPIC.
If anybody got some advice on how to lead me in the right direction to
fix this, it would be much appreciated.
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