Bug 447426

Summary: libbfd binutils -fPIC
Product: [Fedora] Fedora Reporter: Lukas Bezdicka <social>
Component: binutilsAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: debarshir, jakub, wcohen
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 2.18.50.0.6-4.fc9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-07-18 08:05:10 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 430856, 797759    

Description Lukas Bezdicka 2008-05-19 21:20:33 UTC
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:
/usr/lib/gcc/x86_64-redhat-linux/4.3.0/../../../../lib64/libbfd.a(format.o):
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
-Wl,-soname,libcrystalspace-1.3.so

...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 19:11:54 UTC
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 20:21:44 UTC
This also affects building oprofile-0.9.4-rc3 (oprofile release candidate) on F-9:

http://sourceforge.net/project/showfiles.php?group_id=16191

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 20:11:47 UTC
binutils-2.18.50.0.6-4.fc9 has been submitted as an update for Fedora 9

Comment 4 Fedora Update System 2008-07-17 14:18:31 UTC
binutils-2.18.50.0.6-4.fc9 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 16:06:37 UTC
CS with --enable-debug compiles fine here. Seems to be ok now.
Thank you

Comment 6 Jan Kratochvil 2008-07-17 19:09:59 UTC
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 08:05:08 UTC
binutils-2.18.50.0.6-4.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.