dev-lang/python-2.3.6-r1 fails to compile with LDFLAGS="-Wl,-O1,--as-needed". I think it may be enough to link libpython2.3.so with libz.so # emerge python [...] i686-pc-linux-gnu-gcc -pthread -Wl,-O1,--as-needed -Xlinker -export-dynamic -o python \ Modules/python.o \ -L. -lpython2.3 -lpthread -ldl -lutil -L/usr/lib -lz -lm ./libpython2.3.so: undefined reference to `deflate' ./libpython2.3.so: undefined reference to `inflate' ./libpython2.3.so: undefined reference to `deflateInit_' ./libpython2.3.so: undefined reference to `adler32' ./libpython2.3.so: undefined reference to `crc32' ./libpython2.3.so: undefined reference to `deflateInit2_' ./libpython2.3.so: undefined reference to `inflateEnd' ./libpython2.3.so: undefined reference to `inflateInit2_' ./libpython2.3.so: undefined reference to `deflateEnd' collect2: ld gab 1 als Ende-Status zurück make: *** [python] Fehler 1 # emerge --info Portage 2.1.2.7 (default-linux/x86/2007.0/desktop, gcc-4.1.2, glibc-2.5-r2, 2.6.21-gentoo i686) ================================================================= System uname: 2.6.21-gentoo i686 AMD Athlon(tm) XP 3000+ Gentoo Base System release 2.0.0_alpha2 Timestamp of tree: Unknown distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] dev-java/java-config: 1.3.7, 2.0.32 dev-lang/python: 2.3.6, 2.4.4-r2 dev-python/pycrypto: 2.0.1-r5 dev-util/ccache: 2.4-r7 sys-apps/sandbox: 1.2.18.1 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.7.9-r1, 1.9.6-r2, 1.10 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.16 sys-devel/libtool: 1.5.23b virtual/os-headers: 2.6.21 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/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c" CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer -pipe" DISTDIR="/usr/my-distfiles" FEATURES="autoaddcvs ccache collision-detect cvs distlocks metadata-transfer parallel-fetch sandbox sfperms sign strict" GENTOO_MIRRORS="http://85.25.128.62 http://pandemonium.tiscali.de/pub/gentoo/" LANG="de_DE.utf8" LC_ALL="de_DE.utf8" LDFLAGS="-Wl,-O1,--as-needed" LINGUAS="de en en_GB" 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 --filter=H_**/files/digest-*" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/home/matze/overlays/layman/sunrise /home/matze/overlays/gentoo.de /home/matze/overlays/zzam /home/matze/overlays/vdr/testing /home/matze/overlays/vdr/experimental" SYNC="cvs://zzam@cvs.gentoo.org:/var/cvsroot" USE="3dnow 3dnowext X Xaw3d a52 aac acl acpi alsa amr apache2 artswrappersuid audacious berkdb bitmap-fonts bluetooth bzip2 cairo cap caps cddb cdparanoia cdr cli cracklib crypt cups curl dbus directfb doc dri dts dvb dvd dvdr dvdread eds emboss encode evo exif fam fbcon ffmpeg firefox font-server fortran fuse gcj gdbm gif gimpprint glut gphoto2 gpm gstreamer gtk gtk2 hal iconv imap ipv6 isdnlog java jpeg jpeg2k kde kdexdeltas kerberos libdvdread libg++ lirc logitech-mouse mad midi mikmod mmx mmxext mng mp3 mpeg mplayer musicbrainz mysql ncurses nls nptl nptlonly nvram offensive ogg opengl oss pam pcre pdf perl php png ppds pppd python qt3 qt3support qt4 quotes readline reflection regex samba session sms sndfile spell spl sql sqlite sse ssl svg taglib tcltk tcpd theora tiff truetype truetype-fonts type1-fonts unicode usb userlocales vcd vdr visualization vorbis webdav win32codecs wma wmf x264 x86 xinerama xml xorg xrandr xslt xv zlib zvbi" ALSA_CARDS="emu10k1 intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" DVB_CARDS="ttpci usb-wt220u dibusb-usb2 usb-dib0700" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en en_GB" LIRC_DEVICES="serial" USERLAND="GNU" VIDEO_CARDS="nvidia v4l vesa vbdev nv" Unset: CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
I've opted to just filtering as-needed as I'm aiming to remove python.2.3.x from the tree if possible and don't want to add another patch requiring more maintainance.