Project

General

Profile

Actions

Bug #2249

closed

Problem building against boost 1.54 on Ubuntu 12.04 with GCC 4.7

Added by Anonymous over 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
Start date:
09/23/2013
Due date:
% Done:

0%

Estimated time:

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.

Actions #1

Updated by Wim Dumon over 10 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.

Actions #2

Updated by Koen Deforche about 10 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF