Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 187534 - net-dialup/capisuite-0.4.5-r4 build fails with -Wl,--as-needed
Summary: net-dialup/capisuite-0.4.5-r4 build fails with -Wl,--as-needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2007-08-02 19:59 UTC by stephan wezel
Modified: 2007-11-15 10:12 UTC (History)
0 users

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


Attachments
correct link oder of needed libs when linking libpython-2.4 (capisuite-0.4.5-acinclude-python.patch,761 bytes, patch)
2007-08-02 20:00 UTC, stephan wezel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description stephan wezel 2007-08-02 19:59:41 UTC
build of capisuite-0.4.5-r4 fails when "-Wl,--as-needed" is set in LDFLAGS with following error:

i686-pc-linux-gnu-g++  -march=athlon-xp -O2 -pipe  -Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,now -L/usr/lib/python2.4/config -Xlinker -export-dynamic -o capisuite  main.o application/libccapplication.a modules/libccmodules.a backend/libccbackend.a -lpthread -lcapi20   -lpthread -ldl -lutil -lm -lpython2.4
/usr/lib/python2.4/config/libpython2.4.a(posixmodule.o): In function `posix_tmpnam':
(.text+0x93e): warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/lib/python2.4/config/libpython2.4.a(posixmodule.o): In function `posix_tempnam':
(.text+0xa2a): warning: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/lib/python2.4/config/libpython2.4.a(dynload_shlib.o): In function `_PyImport_GetDynLoadFunc':
(.text+0x136): undefined reference to `dlsym'
/usr/lib/python2.4/config/libpython2.4.a(dynload_shlib.o): In function `_PyImport_GetDynLoadFunc':
(.text+0x1a6): undefined reference to `dlopen'
/usr/lib/python2.4/config/libpython2.4.a(dynload_shlib.o): In function `_PyImport_GetDynLoadFunc':
(.text+0x1d4): undefined reference to `dlsym'
/usr/lib/python2.4/config/libpython2.4.a(dynload_shlib.o): In function `_PyImport_GetDynLoadFunc':
(.text+0x248): undefined reference to `dlerror'
/usr/lib/python2.4/config/libpython2.4.a(posixmodule.o): In function `posix_forkpty':
(.text+0x3439): undefined reference to `forkpty'
/usr/lib/python2.4/config/libpython2.4.a(posixmodule.o): In function `posix_openpty':
(.text+0x34c8): undefined reference to `openpty'
collect2: ld gab 1 als Ende-Status zurück
make[3]: *** [capisuite] Fehler 1
make[3]: Leaving directory `/home/videos/portage/net-dialup/capisuite-0.4.5-r4/work/capisuite-0.4.5/src'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/home/videos/portage/net-dialup/capisuite-0.4.5-r4/work/capisuite-0.4.5/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/videos/portage/net-dialup/capisuite-0.4.5-r4/work/capisuite-0.4.5'
make: *** [all] Fehler 2

The problem is the ordering of the needed libs to be linked when linking libpython-2.4.

wrong oder: -lpthread -ldl -lutil -lm -lpython2.4
right order: -lpython2.4 -lm -lpthread -ldl -lutil

the attached patch changes the ordering of these libs in the acinclude.m4 file.


Reproducible: Always
Comment 1 stephan wezel 2007-08-02 20:00:42 UTC
Created attachment 126729 [details, diff]
correct link oder of needed libs when linking libpython-2.4
Comment 2 Alin Năstac (RETIRED) gentoo-dev 2007-11-15 10:12:17 UTC
Fixed in cvs, thanks!