From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.6) Gecko/20040518 Firefox/0.8 Description of problem: The boost libs in FC2 are not compiled with -fPIC. This leads to all sorts of headaches on x86-64 during linking, eg thislib.a(thislib.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC thislib.a: could not read symbols: Bad value Version-Release number of selected component (if applicable): boost-1.31.0-7 How reproducible: Always Steps to Reproduce: 1. Write code that uses boost libs 2. Compile for x86-64 using boost shared libs 3. Wait eons for g++ to finish 4. Cringe at linker error Actual Results: thislib.a(thislib.o): relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC thislib.a: could not read symbols: Bad value Expected Results: Happy linker with no errors Additional info:
Created attachment 101324 [details] Patch for boost.spec Patch adds -fPIC compile options to .spec file. Tested and works fine for me(tm)
Created attachment 106692 [details] More radical patch Bug confirmed on FC3 (boost-devel-1.31.0-9) Prevents compilation of KDE from sources. /usr/bin/ld: /usr/lib64/libboost_python.a(list.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib64/libboost_python.a: could not read symbols: Bad value collect2: ld returned 1 exit status The -fPIC option should be enabled for *all* objects going into *all* static libraries distributed in FC3, in order to enable users to include those libraries into other static libraries (as opposed to including them into executables only). Jason, you patch fixes only libboost_python.a. there are other static libraries in boost-devel: /usr/lib64/libboost_date_time.a /usr/lib64/libboost_filesystem.a /usr/lib64/libboost_prg_exec_monitor.a /usr/lib64/libboost_python.a /usr/lib64/libboost_regex.a /usr/lib64/libboost_signals.a /usr/lib64/libboost_test_exec_monitor.a /usr/lib64/libboost_unit_test_framework.a So I suggest a more radical patch, directed at RPM options in general. Please let me know if ther is anything wrong with it. cheers, Philippe
Oops, important typo: s/static/shared/g -fPIC affects SHARED libraries. The paragraph should read: The -fPIC option should be enabled for *all* objects going into *all* shared libraries distributed in FC3, in order to enable users to include those libraries into other shared libraries (as opposed to including them into executables only).
These patches are incorrect. This should be fixed in gcc-tools.jam. I'm updating to boost-1.32.0, please try those rpms. -benjamin
Here's an updated package for boost-1.32.0. http://people.redhat.com/bkoz/boost-1.32.0/ I believe it resolves this problem. Can you confirm? -benjamin
Fixed in 1.32.0-1.