pax-utils fails to compile with LDFLAGS=-Wl,--as-needed and USE=caps: i686-pc-linux-gnu-gcc -O2 -pipe -march=pentium4 -fomit-frame-pointer -DWANT_SYSCAP -Wl,--as-needed -lcap paxinc.o paxelf.o -o pspax pspax.o pspax.o: In function `.L30': pspax.c:(.text+0x448): undefined reference to `cap_init' pspax.c:(.text+0x9ce): undefined reference to `capgetp' pspax.c:(.text+0x9e0): undefined reference to `cap_to_text' pspax.c:(.text+0xb31): undefined reference to `cap_free' collect2: ld returned 1 exit status make: *** [pspax] Error 1 The solution is to put -lcap at the end, i.e.: i686-pc-linux-gnu-gcc -O2 -pipe -march=pentium4 -fomit-frame-pointer -DWANT_SYSCAP -Wl,--as-needed paxinc.o paxelf.o -o pspax pspax.o -lcap Unfortunately, I do not know how to modify the ebuild appropriately. Changing emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" pspax || die to emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" pspax LDFLAGS="${LDFLAGS}" || die does not do what I intended. Gentoo Base System version 1.6.15 Portage 2.1_pre10-r5 (selinux/2005.1/x86/hardened, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-hardened-r6 i686) ================================================================= System uname: 2.6.16-hardened-r6 i686 Intel(R) Pentium(R) 4 CPU 1.60GHz dev-lang/python: 2.4.3-r1 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: [Not Present] dev-util/confcache: [Not Present] sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 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.16.92 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -pipe -march=pentium4 -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -pipe -march=pentium4 -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--alphabetical" FEATURES="autoconfig collision-protect distlocks loadpolicy metadata-transfer parallel-fetch sandbox selinux sfperms strict userpriv usersandbox" GENTOO_MIRRORS="ftp://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/" LANG="en_US.UTF-8" LDFLAGS="-Wl,--as-needed" LINGUAS="en" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from /etc/portage/rsync_excludes" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file - -delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/pac kages'" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" USE="x86 X a52 aac alsa bzip2 caps cjk crypt cups curl dts dvd dvdread ffmpeg flac gif glut gtk hardened idn ipv6 jpeg mad matroska mikmod mmap mmx mp3 ncurses nptl offensive ogg opengl pam pic png readline sdl selinux sndfile sse sse2 ssl theora threads tiff truetype unicode vorbis win32codecs xinerama xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_en userland_GNU" Unset: ASFLAGS, CTARGET, INSTALL_MASK, LC_ALL
Unless somebody posts a patch for this, I'm not that worried about it.
> Changing > emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" pspax || die > to > emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" pspax LDFLAGS="${LDFLAGS}" || die > does not do what I intended. that's because that isnt how make works fixed up in pax-utils cvs
(In reply to comment #2) [...] > that's because that isnt how make works Now I know that. :-) > fixed up in pax-utils cvs Works nicely, thanks! This really is much appreciated.