emerge tar on a ~x86 machine fails. Also reported on the forums by Clete2: http://forums.gentoo.org/viewtopic.php?t=244067&highlight=tar+include Reproducible: Always Steps to Reproduce: 1. emerge tar Actual Results: i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -O2 -march=athlon-xp -fomit-frame-pointer -c argp-fs-xinl.c In file included from /usr/include/stdio.h:28, from argp-fmtstream.h:32, from argp-fs-xinl.c:27: /usr/include/features.h:265:41: operator '&&' has no right operand make[3]: *** [argp-fs-xinl.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory `/var/tmp/portage/tar-1.14.90-r1/work/tar-1.14.90/lib' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/tar-1.14.90-r1/work/tar-1.14.90/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/tar-1.14.90-r1/work/tar-1.14.90' make: *** [all] Error 2 !!! ERROR: app-arch/tar-1.14.90-r1 failed. Expected Results: >>> app-arch/tar-1.14.90-r1 merged. lib/argp-xinl.c line 32 undefines __OPTIMIZE__, then defines it, but not to a value. features.h then complains about that. My computer's configuration: yodasixtyfour lib # emerge info Portage 2.0.51-r2 (default-x86-2004.2, gcc-3.3.3, glibc-2.3.4.20041021-r0, 2.6.9-gentoo-r1 i686) ================================================================= System uname: 2.6.9-gentoo-r1 i686 AMD Athlon(tm) 64 Processor 3500+ Gentoo Base System version 1.6.4 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.92.0.2-r1 Headers: sys-kernel/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=athlon-xp -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks sandbox" GENTOO_MIRRORS="http://10.10.10.100/gentoo ftp://ftp.uni-erlangen.de/pub/mirrors/gentoo ftp://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ http://vlaai.snt.ipv6.utwente.nl/pub/os/linux/gentoo/ http://ftp6.uni-erlangen.de/pub/mirrors/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X apm arts avi berkdb bitmap-fonts crypt cups doc encode f77 foomaticdb gdbm gif gnome gpm gtk gtk2 imlib java jpeg kde libg++ libwww mad mikmod motif mpeg ncurses nls nptl nptlonly oggvorbis opengl oss pam pdflib perl png pthreads python qt quicktime readline sdl slang spell ssl svga tcpd truetype x86 xml2 xmms xv zlib"
A workaround: emerge tar cd /var/tmp/portage/tar-1.14.90-r1/work/tar-1.14.90/lib patch -p1 <<EOM --- argp-fs-xinl.c.orig 2004-10-29 13:45:06.806318952 +0100 +++ argp-fs-xinl.c 2004-10-29 13:45:26.385342488 +0100 @@ -22,8 +22,9 @@ #endif #define ARGP_FS_EI -#undef __OPTIMIZE__ -#define __OPTIMIZE__ +#ifndef __OPTIMIZE__ +#define __OPTIMIZE__ 1 +#endif #include "argp-fmtstream.h" #if 0 EOM ebuild /usr/portage/app-arch/tar/tar-1.14.90-r1.ebuild merge
Martijn Koster's workaround works perfectly with one small change - use "patch -p0" instead of "patch -p1"
This did not work for me. In file included from /usr/include/stdio.h:28, from argp-fmtstream.h:32, from argp-fs-xinl.c:27: /usr/include/features.h:265:41: operator '&&' has no right operand gcc -DHAVE_CONFIG_H -I. -I. -I.. -march=pentium4 -O3 -pipe -fomit-frame-pointer -c backupfile.c distcc[2705] ERROR: compile argp-fs-xinl.c on localhost failed make[3]: *** [argp-fs-xinl.o] Error 1 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory `/var/tmp/portage/tar-1.14.90-r1/work/tar-1.14.90/lib' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/tar-1.14.90-r1/work/tar-1.14.90/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/tar-1.14.90-r1/work/tar-1.14.90' make: *** [all] Error 2 !!! ERROR: app-arch/tar-1.14.90-r1 failed. !!! Function src_compile, Line 44, Exitcode 2 !!! emake failed !!! If you need support, post the topmost build error, NOT this status message. This should be critical as I cannot complete an emerge system without tar. This has been broken since yesterday afternoon.
More ideas in this thread: http://forums.gentoo.org/viewtopic.php?p=1706299
Went away and tried the patch again. It works. Don't know why it didn't initially. I did "-p0" too. Oh well. Thanks!
argp-fs-xinl.c is a glibc file and in glibc-2.3.4.20041021, the interesting part looks like this: #define ARGP_FS_EI #undef __OPTIMIZE__ #define __OPTIMIZE__ 1 #include "argp-fmtstream.h" I'm not sure why tar needs a copy of this file.
*** Bug 69422 has been marked as a duplicate of this bug. ***
added myself as cc. Same broken tar package here...only difference is that I am on AMD64 Emerge info: Portage 2.0.51-r2 (default-linux/amd64/2004.3, gcc-3.4.2, glibc-2.3.4.20041021-r0, 2.6.9-gentoo-r1 x86_64) ================================================================= System uname: 2.6.9-gentoo-r1 x86_64 Mobile AMD Athlon(tm) 64 Processor 2800+ Gentoo Base System version 1.6.4 Autoconf: sys-devel/autoconf-2.59-r5 Automake: sys-devel/automake-1.8.5-r1 Binutils: sys-devel/binutils-2.15.92.0.2-r1 Headers: sys-kernel/linux26-headers-2.6.8.1-r1 Libtools: sys-devel/libtool-1.5.2-r5 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer -frename-registers" CHOST="x86_64-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/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 /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-march=k8 -O2 -pipe -fomit-frame-pointer -frename-registers" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks" GENTOO_MIRRORS="http://www.las.ic.unicamp.br/pub/gentoo/ ftp://ftp.las.ic.unicamp.br/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://www.gigaload.org/gentoo.org/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aalib acl acpi alsa amd64 apache2 apm arts avi berkdb bitmap-fonts bootsplash cdr cdrw crypt divx4linux doc dvd dvdr encode esd ethereal exif f77 fam flac foomaticdb ftp gd gdbm gif gnutls gphoto2 gpm gtk gtk2 hal icq imagemagick imlib ipv6 java joystick jp2 jpeg kde libg++ libwww lzw lzw-tiff maildir mailwrapper mbox mikmod mime motif mozilla mpeg msn multilib mysql mysqli ncurses nls nogcj nptl nptlonly odbc oggvorbis opengl oss pam pdflib perl php png python qt quicktime readline samba sdl slang sockets spell spl ssl tcltk tcpd tiff truetype usb userlocales vhosts xine xlmrpc xml xml2 xmms xpm xrandr xsl xv xvid zlib"
*** Bug 69562 has been marked as a duplicate of this bug. ***
*** Bug 69645 has been marked as a duplicate of this bug. ***
It would be nice if someone could set the priority of this bug from P2 to P1 and the severity from normal to critical because of this bug I can't install Gentoo Linux 2004.2. I've tried to change these two fields by myself but unfortunately I can't. Because of a bug in KDM - even if the author says it's not a KDM bug but a X bug - I've tried to update some other software including GCC 3.3 to GCC 3.4. And that's messed up my system completely. So I had to delete my Gentoo installation and install it completely new. Now that I've compiled the bootstrap and began with the next step (emerge system) for about one day 'emerge system' hangs because of this 'tar bug'. And because it's a new installation I can't do an 'emerge --fetchonly tar' and change the source before 'emerge tar' or 'emerge system'. BTW, because it's written in the Gentoo Handbook I've tried 'bootstrap.sh -f' and 'emerge --fetchonly system' before. But on a new installation these commands with these parameters don't work correctly. That's only to explain why I tried to change the priority and severity of this bug and am not just applying a workaround by hand. Maybe until this bug is fixed the broken tar version should be hard masked in the portage tree so that a new Linux installation doesn't crash even if someone has the ACCEPT_KEYWORDS="~x86" in his make.conf.
I rememeber I used bootstrap.sh -f and emerge system --fetchonly. Do you get an error message? Did you try the forums? It should work!
Created attachment 43129 [details, diff] Patch to fix bug in 1.14.90-r1 with corrected __OPTIMIZE__ define Dunno if this is already in portage but since I created this to fix our servers at work I figured I'd upload this and maybe save someone some time. This worked on x86_64 using dual Opteron 242 w/ GLIBC 2.3.4.20041021 and GCC 3.4.2-r3 I also added to the following: Manifest (line 18): MD5 08149db3d06186298b1c60683aa65740 files/1.14.90-optimize.patch 381 tar-1.14.90-r1.ebuild (line 32): epatch ${FILESDIR}/${PV}-optimize.patch #69731 Patch applied successfully and installed.
I referenced the wrong bug number in the ebuild change, it says: epatch ${FILESDIR}/${PV}-optimize.patch #69731 which should be: epatch ${FILESDIR}/${PV}-optimize.patch #69395 Sorry!
@Michel van Kessel: I don't want to turn Bugzilla into a second forum but I think I should answer you anyway. ;-) Yes I've tried all that but as I wrote in my previous comment that bootstrap.sh -f and emerge --fetchonly system didn't work because with these parameters it seems to calculate the dependencies wrong. I tried it two or three times but I've got some weird results. But that doesn't belong to this bug. ;-) Installation without ACCEPT_KEYWORDS="~x86" worked but I'll try again. :-)
fixed in cvs. sync up in about 30 mins, and tar should be merging again.