Bug #2249
closedProblem building against boost 1.54 on Ubuntu 12.04 with GCC 4.7
0%
Description
I get the following errors when the wt shared libs are being linked to the static boost libs.
/usr/bin/ld: /opt/boost-1_54/lib/libboost_thread.a(thread.o): relocation R_X86_64_32 against `.text' can not be used when making a shared object; recompile with -fPIC
/opt/boost-1_54/lib/libboost_thread.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
I have already ensured that the -fPIC options are being used for the build. The command used to build boost is './b2 -j14 -s cxxflags="-v -fPIC" -s cflags="-v -fPIC" link=static -a install'. There are old system installed shared boost libraries. That is the reason for having to use the static boost libs when building wt. I am currently trying to build the git trunk version.
Updated by Wim Dumon about 11 years ago
- Status changed from New to Feedback
Sounds like your static boost libraries are compiled without -fPIC, not sure how this can be solved in Wt.
Can you verify that the -fPIC option is effectively passed to the compiler (bjam has a verbose setting that prints all compiler options)? I've never set it from the command line, I've edited jam files to add compile options to boost.
Wim.
Updated by Koen Deforche almost 11 years ago
- Status changed from Feedback to Closed