Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 132477

Summary: xplc-0.3.13-r1: fix building with -Wl,--as-needed
Product: Gentoo Linux Reporter: TGL <tom.gl>
Component: [OLD] LibraryAssignee: Alin Năstac (RETIRED) <mrness>
Status: RESOLVED FIXED    
Severity: minor CC: cpp+disabled
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 129413    
Attachments: files/xplc-0.3.13-as-needed.patch

Description TGL 2006-05-06 10:40:11 UTC
This package fails to build with --as-needed, because it puts -ldl in LDFLAGS, hence to early in the linker arguments for not being skipped:

i686-pc-linux-gnu-g++ -march=pentium-m -O2 -pipe -ggdb -march=pentium-m -O2 -pipe -ggdb -Woverloaded-virtual -fno-rtti -fno-exceptions -march=pentium-m -O2 -pipe -ggdb -O2 -DNDEBUG -Wall -fpic -DUNSTABLE -pipe -Iinclude  -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -lc -ldl  -shared -Wl,-hlibxplc.so.0.3.13-unstable -Wl,-z,defs,--version-script=config/exports.map xplc/category.o xplc/catiter.o xplc/catmgr.o xplc/loader.o xplc/moduleloader.o xplc/modulemgr.o xplc/monikers.o xplc/new.o xplc/servmgr.o xplc/statichandler.o libxplc-cxx.a -o libxplc.so
ranlib libxplc.a
ln -s -f libxplc.a libxplc_s.a
xplc/loader.o: In function `loaderClose(void*&)':
xplc/loader.cpp:68: undefined reference to `dlclose'
xplc/loader.o: In function `loaderSymbol(void*, char const*, void**)':
xplc/loader.cpp:58: undefined reference to `dlerror'
xplc/loader.cpp:60: undefined reference to `dlsym'
xplc/loader.cpp:62: undefined reference to `dlerror'
xplc/loader.o: In function `loaderOpen(char const*, void**)':
xplc/loader.cpp:44: undefined reference to `dlerror'
xplc/loader.cpp:46: undefined reference to `dlopen'
xplc/loader.cpp:49: undefined reference to `dlerror'
collect2: ld returned 1 exit status
make: *** [libxplc.so] Error 1

The attached patch fixes that.
Comment 1 TGL 2006-05-06 10:40:54 UTC
Created attachment 86293 [details, diff]
files/xplc-0.3.13-as-needed.patch
Comment 2 Alin Năstac (RETIRED) gentoo-dev 2006-05-07 03:11:33 UTC
fixed in cvs, without revision bump.
thanks!