[pkg-boost-devel] Bug#430001: Linking against libboost_serialization fails on AMD64

André Cruz andre.cruz at segula.pt
Thu Jun 21 16:45:06 UTC 2007


Package: libboost-serialization-dev
Version: 1.33.1-10

When building a shared library the linker outputs the following error:

andre at SS0-PS02:~/shibboleth-1.3/shib-memcache-ccache$ /bin/sh ../ 
libtool --silent --mode=link --tag=CXX g++ -DBIG_JOINS=1 -pthread  - 
Wall -O2 -DNDEBUG  -L/usr/local/shib-sp/lib -llog4cpp -lnsl  -o shib- 
memcache-ccache.la -rpath /usr/local/shib-sp/libexec -module -avoid- 
version shib-memcache-ccache.lo ../shib-target/libshib-target.la ../ 
shib/libshib.la -lsaml -lxml-security-c -lxerces-c  /usr/local/apr- 
util/lib/libaprutil-1.la -lboost_serialization
/usr/bin/ld: /usr/lib/libboost_serialization.a(basic_iarchive.o):  
relocation R_X86_64_32S against `vtable for  
boost::archive::detail::basic_iarchive' can not be used when making a  
shared object; recompile with -fPIC
/usr/lib/libboost_serialization.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

This library should be compiled with the -fPIC flag, at least on  
AMD64. I compiled it with this flag and the problem went away.









More information about the pkg-boost-devel mailing list