Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 152654 - net-misc/quagga-0.99.5 does not emerge with --as-needed
Summary: net-misc/quagga-0.99.5 does not emerge with --as-needed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Alin Năstac (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: as-needed
  Show dependency tree
 
Reported: 2006-10-24 06:30 UTC by Matthias Schwarzott
Modified: 2008-07-08 20:05 UTC (History)
3 users (show)

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


Attachments
quagga-0.99.5-as-needed.diff (quagga-0.99.5-as-needed.diff,443 bytes, patch)
2006-10-24 06:53 UTC, Matthias Schwarzott
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Schwarzott gentoo-dev 2006-10-24 06:30:28 UTC
net-misc/quagga-0.99.5 does not emerge with LDFLAGS="-Wl,--as-needed" set.
Without --as-needed emerge works.

i686-pc-linux-gnu-gcc -O2 -march=athlon-xp -fomit-frame-pointer -pipe -Wl,--as-needed -o .libs/testzebra test_main.o zebra_rib.o interface.o connected.o debug.o zebra_vty.o kernel_null.o redistribute_null.o ioctl_null.o misc_null.o  -lcap ../lib/.libs/libzebra.so -lm -lcrypt
../lib/.libs/libzebra.so: undefined reference to `cap_init'
../lib/.libs/libzebra.so: undefined reference to `cap_get_flag'
../lib/.libs/libzebra.so: undefined reference to `cap_clear'
../lib/.libs/libzebra.so: undefined reference to `cap_set_flag'
../lib/.libs/libzebra.so: undefined reference to `cap_set_proc'
../lib/.libs/libzebra.so: undefined reference to `cap_free'
collect2: ld returned 1 exit status
make[2]: *** [testzebra] Fehler 1
make[2]: *** Warte auf noch nicht beendete Prozesse...
i686-pc-linux-gnu-gcc -O2 -march=athlon-xp -fomit-frame-pointer -pipe -Wl,--as-needed -o .libs/zebra zserv.o main.o interface.o connected.o zebra_rib.o redistribute.o debug.o rtadv.o zebra_snmp.o zebra_vty.o irdp_main.o irdp_interface.o irdp_packet.o router-id.o ioctl.o ipforward_proc.o if_netlink.o if_proc.o rt_netlink.o rtread_netlink.o  ../lib/.libs/libzebra.so -lcap -lm -lcrypt
../lib/.libs/libzebra.so: undefined reference to `cap_init'
../lib/.libs/libzebra.so: undefined reference to `cap_get_flag'
../lib/.libs/libzebra.so: undefined reference to `cap_clear'
../lib/.libs/libzebra.so: undefined reference to `cap_set_flag'
../lib/.libs/libzebra.so: undefined reference to `cap_set_proc'
../lib/.libs/libzebra.so: undefined reference to `cap_free'
collect2: ld returned 1 exit status
make[2]: *** [zebra] Fehler 1
make[2]: Leaving directory `/var/tmp/portage/net-misc/quagga-0.99.5/work/quagga-0.99.5/zebra'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/var/tmp/portage/net-misc/quagga-0.99.5/work/quagga-0.99.5'
make: *** [all] Fehler 2

!!! ERROR: net-misc/quagga-0.99.5 failed.
Call stack:
  ebuild.sh, line 1568:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  quagga-0.99.5.ebuild, line 70:   Called die

!!! make failed
!!! If you need support, post the topmost build error, and the call stack if relevant.

# emerge --info
Portage 2.1.2_pre3-r7 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.18.1 i686)
=================================================================
System uname: 2.6.18.1 i686 AMD Athlon(tm) XP 3000+
Gentoo Base System version 1.12.5
Last Sync: Unknown
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.3.5-r3, 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
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, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe"
DISTDIR="/usr/my-distfiles"
FEATURES="autoaddcvs autoconfig ccache collision-detect cvs distlocks metadata-transfer parallel-fetch sandbox sfperms sign strict"
GENTOO_MIRRORS="http://pandemonium.tiscali.de/pub/gentoo/ ftp://pandemonium.tiscali.de/pub/gentoo/"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LDFLAGS="-Wl,--as-needed"
LINGUAS="de"
MAKEOPTS="-j4"
PKGDIR="/usr/my-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="/home/matze/gentoo/overlays/de /home/matze/gentoo/overlays/zzam /home/matze/gentoo/overlays/vdr/testing /home/matze/gentoo/overlays/vdr/experimental /usr/portage/local/layman/sunrise /usr/portage/local/layman/java-migration-packages"
SYNC="cvs://zzam@cvs.gentoo.org:/var/cvsroot"
USE="x86 3dnow 3dnowext X Xaw3d a52 aac acl alsa apache2 artswrappersuid audacious berkdb bitmap-fonts bluetooth bzip2 cairo cap caps cddb cdparanoia cdr cli cracklib crypt cups dbus dlloader doc dri dts dvb dvd dvdr eds elibc_glibc emboss encode exif fam fbcon ffmpeg firefox font-server fortran fuse gcj gdbm gif gimpprint glut gpm gstreamer gtk hal imap input_devices_keyboard input_devices_mouse ipv6 isdnlog java jpeg jpeg2k kde kdexdeltas kernel_linux ldap libg++ linguas_de lirc lirc_devices_all logitech-mouse mad mikmod mmx mmxext mng mp3 mpeg mplayer musicbrainz mysql ncurses nls nogecko-sdk nptl nptlonly nvram offensive ogg opengl oss pam pcre pdf perl png ppds pppd python qt qt3 qt4 quotes readline reflection samba session sms sndfile softmmu spell spl sqlite sse ssl svg taglib tcltk tcpd tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU userlocales vcd vdr video_cards_nv video_cards_nvidia video_cards_v4l video_cards_vbdev video_cards_vesa visualization vorbis win32codecs wma wmf xinerama xml xorg xrandr xslt xv zlib zvbi"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Matthias Schwarzott gentoo-dev 2006-10-24 06:53:16 UTC
Created attachment 100380 [details, diff]
quagga-0.99.5-as-needed.diff

The attached patch makes quagga link with --as-needed.

The cause is that ../lib/.libs/libzebra.so uses functions of libcap but does not link against it. The patch fixes it.
Comment 2 Alin Năstac (RETIRED) gentoo-dev 2006-11-11 08:59:59 UTC
Reassigned to me since now I'm the only quagga maintainer left.
Comment 3 Alin Năstac (RETIRED) gentoo-dev 2006-11-11 09:45:35 UTC
Fixed in cvs, without revision bump, by merging your patch and zebra-linkorder.patch into link-libcap.patch.

As a side note, on my test machine zebra-linkorder.patch was enough to make quagga compilable with LDFLAGS=-Wl,--as-needed.

P.S. If you want to increase the chance of your bugs being fixed, add to CC all the maintainers. I thought you found another solution to your problem.
Comment 4 Robert Buchholz (RETIRED) gentoo-dev 2008-07-06 22:40:28 UTC
This is still unfixed in our stable ebuild -- any chance the patch might be applied there?
Comment 5 Alin Năstac (RETIRED) gentoo-dev 2008-07-08 20:05:17 UTC
I've added the patch to version 0.98.6-r4.