Boost logo

Boost-Build :

Subject: [Boost-build] fPIC option for boost
From: Ven Tadipatri (ven.tadipatri_at_[hidden])
Date: 2011-01-05 16:40:13


Hi,
   I'm trying to build Boost version 1.44 for CentOS, and though my code
compiles against it just fine, at link time it keeps complaining about
an fPIC option:
[ERROR] /usr/bin/ld: libboost-filesystem-1.44.a(v2_operations.o):
relocation R_X86_64_32 against `a local symbol' can not be used when
making a shared object; recompile with -fPIC
[ERROR] libboost-filesystem-1.44.a: could not read symbols: Bad value
[ERROR] collect2: ld returned 1 exit status

Here is the command line I'm giving to bjam (v. 3.1.18)
bjam address-model=64 cxxflags=-fPIC --user-config=user-config.jam stage
variant=debug link=static threading=multi

Here is the user-config.jam file
using gcc : 4.1 : /usr/bin/gcc : <compileflags>-fPIC;

It looks like I'm compiling with the right options, so what's going on?
Again, to clarify, the boost libraries build fine, but the error occurs
when I'm trying to link against the library.

Thanks,
Ven


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