Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 83569 - Shared library in efence fails to link on amd64
Summary: Shared library in efence fails to link on amd64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 All
: High normal (vote)
Assignee: Aaron Walker (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-28 10:11 UTC by Grant Goodyear (RETIRED)
Modified: 2005-03-02 11:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
efence-2.4.13-gentoo.diff (efence-2.4.13-gentoo.diff,1.91 KB, patch)
2005-03-01 05:34 UTC, Aaron Walker (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Goodyear (RETIRED) gentoo-dev 2005-02-28 10:11:19 UTC
I'd like to be able to link some of my development code w/ efence on my spiffy new amd64 box, but blindly adding ~amd64 to KEYWORDS for efence-2.4.13 leads to:

ar crv libefence.a efencepp.o efence.o
g++ -g -shared -Wl,-soname,libefence.so.0 -o libefence.so.0.0 \
efencepp.o efence.o -lpthread
a - efencepp.o
a - efence.o
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld: efencepp.o: relocation R_X86_64_32S against `a local symbol' can not be used when making a shared object; recompile with -fPIC
efencepp.o: could not read symbols: Bad value

I know this sort of error is common on amd64, and if somebody will tell me the canonical fix, I'll be happy to implement it.
Comment 1 Grant Goodyear (RETIRED) gentoo-dev 2005-02-28 11:24:32 UTC
Hmmm, looks like the problem is the efence-2.4.13-gentoo.diff patch, which comments out the CPPFLAGS line in the Makefile.  Anybody know why that was done?
Comment 2 Aaron Walker (RETIRED) gentoo-dev 2005-03-01 05:34:19 UTC
Grant, I cannot remember why I commented out CPPFLAGS... more than likely I didn't realize the author was using that where CXXFLAGS should be used (CPP is C Pre Processor of course), so it looks like the C sources were compiled with -fPIC while the C++ sources were not.

I will attach a patch.  Please test it and see if that is indeed the cause of the problem.  If it works, hopefully the amd64 guys would be awesome enough to keyword it ~amd64.
Comment 3 Aaron Walker (RETIRED) gentoo-dev 2005-03-01 05:34:49 UTC
Created attachment 52380 [details, diff]
efence-2.4.13-gentoo.diff
Comment 4 Grant Goodyear (RETIRED) gentoo-dev 2005-03-02 11:42:18 UTC
Patch works beautifully (at least on amd64 and x86).

Committed, and set as ~x86.