net-misc/wget-1.9-r2 builds a broken binary if USE=static is set. Reproducible: Always Steps to Reproduce: 1. USE=-static emerge --buildpkgonly wget 2. tar -xjf /usr/portage/packages/All/wget-1.9-r2.tbz2 ./usr/bin/wget 3. ldd usr/bin/wget 4. USE=static emerge --buildpkgonly wget 5. tar -xjf /usr/portage/packages/All/wget-1.9-r2.tbz2 ./usr/bin/wget 6. ldd usr/bin/wget Actual Results: root@caravan:/tmp# USE=-static emerge --buildpkgonly wget [...] root@caravan:/tmp# tar -xjf /usr/portage/packages/All/wget-1.9-r2.tbz2 ./usr/bin/wget root@caravan:/tmp# ldd usr/bin/wget linux-gate.so.1 => (0xffffe000) libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0xb7f9c000) libcrypto.so.0.9.7 => /usr/lib/libcrypto.so.0.9.7 (0xb7e9d000) libsocks.so.0 => /usr/lib/libsocks.so.0 (0xb7e64000) libpam.so.0 => /lib/libpam.so.0 (0xb7e5b000) libnsl.so.1 => /lib/libnsl.so.1 (0xb7e46000) libcrypt.so.1 => /lib/libcrypt.so.1 (0xb7e19000) libdl.so.2 => /lib/libdl.so.2 (0xb7e16000) libresolv.so.2 => /lib/libresolv.so.2 (0xb7e05000) libc.so.6 => /lib/libc.so.6 (0xb7cf2000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0xb7fea000) root@caravan:/tmp# USE=static emerge --buildpkgonly wget [...] root@caravan:/tmp# tar -xjf /usr/portage/packages/All/wget-1.9-r2.tbz2 ./usr/bin/wget root@caravan:/tmp# ldd usr/bin/wget /usr/bin/ldd: line 1: usr/bin/wget: No such file or directory root@caravan:/tmp# ldd /bin/sash not a dynamic executable Expected Results: root@caravan:/tmp# ldd usr/bin/wget not a dynamic executable Gentoo Base System version 1.4.16 Portage 2.0.51-r2 (default-x86-2004.0, gcc-3.3.4, glibc-2.3.4.20040808-r1, 2.6.9-caravan-1 i686) ================================================================= System uname: 2.6.9-caravan-1 i686 mobile AMD Athlon(tm) XP2500+ distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.3 [enabled] Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.14.90.0.8-r1 Headers: sys-kernel/linux-headers-2.4.21-r1 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/afs/modload /etc/gconf /etc/make.globals /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache collision-protect distlocks fixpackages maketest sandbox severe strict userpriv usersandbox" GENTOO_MIRRORS="ftp://ftp.easynet.nl/mirror/gentoo/ http://gentoo.inode.at/ ftp://gentoo.inode.at/source/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/share/infra/work/portage-local--main--1.0" SYNC="rsync://hybrid.sascha.silbe.org/gentoo-portage" USE="3dnow X acl acpi afs alsa avi berkdb bitmap-fonts cdr crypt cups doc dvd encode foomaticdb gatos gdbm gif gps gtk gtk2 gtkhtml guile hbci imap imlib ipv6 jpeg jpeg2k krb4 lcms libg++ libwww mad maildir mbox mikmod mmx monitor mpeg nas ncurses nls oggvorbis opengl pam pcmcia pdflib png postgres python qt qtmt quicktime readline samba sdl skey socks5 spell sse ssl tetex tiff truetype unicode x86 xml xml2 xosd xv zlib video_cards_radeon input_devices_synaptics linguas_en,de"
I was able to narrow it down a bit: Versions: 1.8.2-r3 works fine 1.9-r2 is broken 1.9.1-r2 is broken USE flags: -socks5 static: works fine socks5 static: broken The binary is broken after compilation (or rather after linking), so it's not in the install code.
It also happens with the unpatched upstream version, so it's not in the additional patches. Both 1.8.2 and 1.9 react the same way (!). Since the 1.8.2-r3 ebuild has no USE=socks support, it always works fine. => Using Socks5 and linking wget statically always creates a broken binary (at least for 1.8.2, 1.9 and 1.9.1).
sascha, have you reported this upstream? is there a fix forthcoming?
Sorry, I have not yet reported it upstream. Will be on holiday till 11.01.05, too. Would be great if you could take it upstream. Otherwise I'll do it next year. Happy New Year!
I'm on leave of absence for the next 45-90 days, sorry :/
Sascha, what's news on this baby?
I've reported it upstream
Sascha, the wget upstream author would like to see a build log of the failure. Can you paste here please? Please reopen the bug when done.
I cannot even build wget-1.9.1-r[35] with USE="static socks5" (and the old ebuilds are gone). Shall I post the error here or open a new bug?