Bug 447426 - libbfd binutils -fPIC
libbfd binutils -fPIC
Product: Fedora
Classification: Fedora
Component: binutils (Show other bugs)
x86_64 Linux
low Severity low
: ---
: ---
Assigned To: Jan Kratochvil
Fedora Extras Quality Assurance
Depends On:
Blocks: 430856 797759
  Show dependency treegraph
Reported: 2008-05-19 17:20 EDT by Lukas Bezdicka
Modified: 2012-02-27 03:55 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-18 04:05:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Lukas Bezdicka 2008-05-19 17:20:33 EDT
Description of problem: libbfd in binutils package isn't compiled with -fPIC

Version-Release number of selected component (if applicable): any?

How reproducible: always

Steps to Reproduce: When compiling Crystalspace with --enable-debug
1. svn co https://crystal.svn.sourceforge.net/svnroot/crystal/CS/trunk CS_latest
2. ./configure --enable-debug
3. jam -aq
Actual results: compilation fails

ResponseFile1 ./out/linux/debug/libs/libcrystalspace-1.3.so.resp
LinkSharedLibraryRsp ./out/linux/debug/libs/libcrystalspace-1.3.so /usr/bin/ld:
relocation R_X86_64_32 against `a local symbol' can not be used when making a
shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../../../lib64/libbfd.a: could not
read symbols: Bad value collect2: ld returned 1 exit status

    g++ -Wl,--as-needed -shared -o ./out/linux/debug/libs/libcrystalspace-1.3.so
-Wl,@./out/linux/debug/libs/libcrystalspace-1.3.so.resp -Wl,--gc-sections \

        -lm -ldl -lnsl -L/usr/local/lib -Wl,-z,defs
-Wl,--warn-unresolved-symbols -Wl,-E -g3 -lbfd -liberty -lz -lpthread -lm -ldl
-lnsl -L/usr/local/lib -Wl,-z,defs -Wl,--warn-unresolved-symbols -Wl,-E -g3

...failed LinkSharedLibraryRsp ./out/linux/debug/libs/libcrystalspace-1.3.so ...
...failed updating 1 target(s)... ...updated 246 target(s)...

Expected results: compilation should continue

Additional info: It's mentioned for example here
https://fcp.surfsite.org/modules/newbb/viewtopic.php?topic_id=53684&forum=11 and
"fix" in there helps. I'd love to know if there is any reason for not having
-fPIC there ?
Comment 1 Laurent Wandrebeck 2008-05-24 15:11:54 EDT
Prevents Anjuta to be build with valgrind-plugin on x86_64 too.
See https://fcp.surfsite.org/modules/newbb/viewtopic.php?topic_id=53684&forum=11
Comment 2 William Cohen 2008-07-14 16:21:44 EDT
This also affects building oprofile-0.9.4-rc3 (oprofile release candidate) on F-9:


The suggested fix for binutils of adding -fPIC to the .spec file seemed to solve
this problem.
Comment 3 Fedora Update System 2008-07-16 16:11:47 EDT
binutils- has been submitted as an update for Fedora 9
Comment 4 Fedora Update System 2008-07-17 10:18:31 EDT
binutils- has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update binutils'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-6494
Comment 5 Lukas Bezdicka 2008-07-17 12:06:37 EDT
CS with --enable-debug compiles fine here. Seems to be ok now.
Thank you
Comment 6 Jan Kratochvil 2008-07-17 15:09:59 EDT
Your tests were great, as the patch does not change the binutils linked binaries
it should have no regression.  Pushed it to stable.
Comment 7 Fedora Update System 2008-07-18 04:05:08 EDT
binutils- has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.