Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 132477 - xplc-0.3.13-r1: fix building with -Wl,--as-needed
Summary: xplc-0.3.13-r1: fix building with -Wl,--as-needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Alin Năstac (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2006-05-06 10:40 UTC by TGL
Modified: 2006-05-07 03:11 UTC (History)
1 user (show)

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


Attachments
files/xplc-0.3.13-as-needed.patch (xplc-0.3.13-as-needed.patch,561 bytes, patch)
2006-05-06 10:40 UTC, TGL
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!