Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 151307 - sys-apps/iproute2-2.6.18.20061002 fails to compile with --as-needed
Summary: sys-apps/iproute2-2.6.18.20061002 fails to compile with --as-needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2006-10-14 03:05 UTC by Maarten Maathuis
Modified: 2006-10-14 12:34 UTC (History)
4 users (show)

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


Attachments
iproute2-2.6.18.20061002-as-needed.patch (iproute2-2.6.18.20061002-as-needed.patch,418 bytes, patch)
2006-10-14 03:20 UTC, Mike Auty (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Maarten Maathuis 2006-10-14 03:05:17 UTC
gcc -Wl,-O1 -Wl,--as-needed -Wl,-export-dynamic -lm -ldl  genl.o ctrl.o ../lib/libnetlink.a ../lib/libutil.a  -lresolv -L../lib -lnetlink -lutil -o genl
genl.o: In function `main':
genl.c:(.text+0x18e): undefined reference to `dlopen'
genl.c:(.text+0x1ae): undefined reference to `dlopen'
genl.c:(.text+0x1df): undefined reference to `dlsym'
collect2: ld returned 1 exit status
make[1]: *** [genl] Error 1
make[1]: Leaving directory `/var/tmp/portage/sys-apps/iproute2-2.6.18.20061002/work/iproute2-2.6.18-061002/genl'
make: *** [all] Error 2
Comment 1 Maarten Maathuis 2006-10-14 03:05:52 UTC
Portage 2.1.2_pre3 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.18-ck1 x86_64)
=================================================================
System uname: 2.6.18-ck1 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.5
Last Sync: Sat, 14 Oct 2006 08:50:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -Os -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=k8 -Os -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer nostrip sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.snt.utwente.nl/pub/os/linux/gentoo ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo"
INSTALL_MASK="/usr/bin/emerge"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en nl"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/local/nouveau /usr/portage/local/layman/sunrise /usr/portage/local/layman/pro-audio /usr/portage/local/layman/science /usr/portage/local/layman/WTK-Testing"
SYNC="rsync://rsync.nl.gentoo.org/gentoo-portage"
USE="amd64 X Xaw3d alsa aotuv berkdb bitmap-fonts cairo caps cdr cli crypt cups dbus dhcp dlloader dri dvd dvdr eds elibc_glibc emboss encode fam firefox flac fortran gdbm gif gimpprint gpm gstreamer gtk gtk2 hal input_devices_keyboard input_devices_mouse ipv6 isdnlog jack jpeg kernel_linux ldap libg++ linguas_en linguas_nl mad mikmod minimal mp3 mpeg musepack ncurses nls nptl nptlonly nvidia offensive ogg oggvorbis opengl pam pcre pdf perl png ppds pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl svg tcpd truetype truetype-fonts type1-fonts udev unicode usb userland_GNU v4l v4l2 video_cards_nouveau video_cards_nv vorbis xml xorg xv xvmc zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, LANG, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Mike Auty (RETIRED) gentoo-dev 2006-10-14 03:20:23 UTC
Created attachment 99643 [details, diff]
iproute2-2.6.18.20061002-as-needed.patch

This removes the two library refrences from LDFLAGS and puts them in GENLLIBS, which appears after libdl's usage, so the library gets linked in.  Not sure if that's the best place for it, but it should fix the compilation problems...
Comment 3 SpanKY gentoo-dev 2006-10-14 12:33:45 UTC
no, GENLLIB has a different meaning ... you dont want to be utilizing that var
Comment 4 SpanKY gentoo-dev 2006-10-14 12:34:53 UTC
fixed in cvs, cheers