Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 406041 - sys-libs/libfaketime-0.9 - date: symbol lookup error: /usr/lib/faketime/libfaketime.so.1: undefined symbol: dlsym
Summary: sys-libs/libfaketime-0.9 - date: symbol lookup error: /usr/lib/faketime/libfa...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tim Harder
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-27 15:26 UTC by master_volkov
Modified: 2012-02-27 23:55 UTC (History)
0 users

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


Attachments
Fix --as-needed unneded usage (libfaketime09ebuildfix.patch,588 bytes, text/plain)
2012-02-27 15:26 UTC, master_volkov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description master_volkov 2012-02-27 15:26:01 UTC
Created attachment 303501 [details]
Fix --as-needed unneded usage

After compile, i get error on execute:

~ # faketime '2011-10-20 01:10:10' /bin/date
date: symbol lookup error: /usr/lib/faketime/libfaketime.so.1: undefined symbol: dlsym

because "--as-needed" added to default LD_FLAGS

Adding
"
pkg_setup() {
        append-ldflags $(no-as-needed)
}
"

fix these problem.



Before:
"
i686-pc-linux-gnu-gcc -o libfaketime.so.1 -Wl,-soname,libfaketime.so.1 -Wl,-O1 -Wl,--as-needed -shared -ldl -lm -lpthread faketime.o
i686-pc-linux-gnu-gcc -o libfaketimeMT.so.1 -Wl,-soname,libfaketimeMT.so.1 -Wl,-O1 -Wl,--as-needed -shared -ldl -lm -lpthread faketimeMT.o
"
After:
"
i686-pc-linux-gnu-gcc -o libfaketime.so.1 -Wl,-soname,libfaketime.so.1 -Wl,-O1 -Wl,--as-needed -Wl,--no-as-needed -shared -ldl -lm -lpthread faketime.o
i686-pc-linux-gnu-gcc -o libfaketimeMT.so.1 -Wl,-soname,libfaketimeMT.so.1 -Wl,-O1 -Wl,--as-needed -Wl,--no-as-needed -shared -ldl -lm -lpthread faketimeMT.o
"
Comment 1 Tim Harder gentoo-dev 2012-02-27 23:55:27 UTC
I fixed the underlying linking order problem so building with --as-needed works fine with the latest revision.