I tried to emerge: [ebuild U ] sys-apps/findutils-4.2.24 [4.2.23] -build +nls (-selinux) +static 0 kB if i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../gnulib/lib -I../lib -I../gnulib/lib -I../intl -DLOCALEDIR=\"/usr/share/locale\" -O2 -mtune=pentium-m -pipe -fomit-frame-pointer -MT version.o -MD -MP -MF ".deps/version.Tpo" -c -o version.o version.c; \ then mv -f ".deps/version.Tpo" ".deps/version.Po"; else rm -f ".deps/version.Tpo"; exit 1; fi i686-pc-linux-gnu-gcc -O2 -mtune=pentium-m -pipe -fomit-frame-pointer -Wl,-O1 -static -o find find.o fstype.o parser.o pred.o tree.o util.o version.o ../lib/libfind.a ../gnulib/lib/libgnulib.a pred.o: In function `pred_nogroup': pred.c:(.text+0xc1e): warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking parser.o: In function `parse_group': parser.c:(.text+0x56a): warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking parser.c:(.text+0x571): warning: Using 'endgrent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking parser.o: In function `parse_user': parser.c:(.text+0x142a): warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking pred.o: In function `pred_nouser': pred.c:(.text+0xc3e): warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking parser.o: In function `parse_user': parser.c:(.text+0x1431): warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/../../../libc.a(regex.o):(.rodata+0x0): multiple definition of `__re_error_msgid_idx' ../gnulib/lib/libgnulib.a(regex.o):(.rodata+0x0): first defined here /usr/lib/gcc/i686-pc-linux-gnu/3.4.4/../../../libc.a(regex.o):(.rodata+0x60): multiple definition of `__re_error_msgid' ../gnulib/lib/libgnulib.a(regex.o):(.rodata+0x60): first defined here collect2: With the previous version 4.2.23, I was able to emerge findutils with USE=static
emerge --info included please.
Oh, I'm sorry :( server linux # emerge --info Portage 2.0.52-r1 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r1, 2.6.12-ck6.014.reiser4.nfsv4.inotify.no-posix.bsd i686) ================================================================= System uname: 2.6.12-ck6.014.reiser4.nfsv4.inotify.no-posix.bsd i686 AMD Athlon(tm) XP 2000+ Gentoo Base System version 1.12.0_pre8 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] ccache version 2.4 [enabled] dev-lang/python: 2.3.4-r1, 2.4.2 sys-apps/sandbox: 1.2.13 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 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.20 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -mtune=pentium-m -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mtune=pentium-m -pipe -fomit-frame-pointer" DISTDIR="/Gentoo/Portage/distfiles" FEATURES="autoconfig buildpkg ccache collision-protect distcc distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://server.bei.digitalprojects.com/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://stuff.alexander.skwar.name/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distfiles.gentoo.org/" LANG="de_DE.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="de" MAKEOPTS="-j3" PKGDIR="/Gentoo/Portage/packages" PORTAGE_TMPDIR="/Gentoo/Portage/build" PORTDIR="/Gentoo/Portage/tree" PORTDIR_OVERLAY="/Gentoo/Portage/local-tree/misc" SYNC="rsync://server/gentoo-portage" USE="x86 GAPING_SECURITY_HOLE X acpi alsa amd apm arts artswrappersuid async avi bash-completion bdf berkdb bitmap-fonts bluetooth bootsplash browserplugin cardbus ccache cdda cddb cdio cdparanoia cdr cdrom cle266 crypt css cups curl curlwrappers dbus devmap dillo divx4linux dlloader dvd dvdread emoticon esd exif fam fbcon fbdev fbsplash firefox fping freetype gd gdbm gif gnokii gnome gstreamer gtk gtk2 hal hpn icc id3 idn imagemagick imap imlib imlib2 insecure-drivers insecure-savers java javascript jikes jpeg kde kdeenablefinal libedit libwww logrotate lynxkeymap mad madwifi maildir matroska mbox mmx mmxext mozilla moznoirc mozsvg mp3 mpeg mpeg2 mpeg4 mplayer multicall ncurses netboot network new-login nfs nis nls no-old-linux no-suexec noantlr nobcel nobeanutils nobsf nobsh nocd nocommonslogging nocommonsnet nodrm nogg nogulm nojsch nojython nolog4j nomac nooro nopri norhino noxalan noxerces nozaptel nptl nptlonly nsplugin offensive ogg oggvorbis opengl openssh pam_console pam_timestamp passfile password patented pccts pcmcia pcre perl perlsuid pic player png pnp qt quicktime rar readline real recode reiserfs samba sdl sendfile sensord sftp slang sms spell spf sse sse2 ssl startup-notification stream subp subtitles suid symlink sysfs syslog transcode truetype truetype-fonts trusted type1-fonts underscores unichrome unicode unsafe usb utf8 uudeview vim vim-pager vlm vorbis wifi win32codecs wma123 x11vnc xine xinetd xml xml2 xmms xpm xscreensaver xv xvid xvmc zlib video_cards_via linguas_de userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LC_ALL
you have LDFLAGS set.
(In reply to comment #3) > you have LDFLAGS set. That's right. Reading bug #65002, it doesn't sound as if LDFLAGS are NOT to be set. Why did you mark this bug "invalid"?
(In reply to comment #4) > (In reply to comment #3) > > you have LDFLAGS set. > > That's right. Reading bug #65002, it doesn't sound as if LDFLAGS are NOT to be > set. Why did you mark this bug "invalid"? Don't set LDFLAGS if you want to compile things w/ USE=static, it makes zero sense.
this isnt an LDFLAGS issue
not sure whether to blame findutils or toolchain without looking further ... seems like the included regex is being built when it shouldnt ... wonder if adding --without-included-regex to the `econf` will fix this
Created attachment 69537 [details, diff] Patch agains findutils-4.2.24.ebuild, adding --without-included-regex (In reply to comment #7) > wonder if adding --without-included-regex to the `econf` will fix this It does. The attached file is a patch against findutils-4.2.24.ebuild creating a findutils-4.2.24-r1.ebuild, in which I added use static && myconf="${myconf} --without-included-regex" After that, emerge with LDFLAGS=-Wl,-O1 USE=static emerge =findutils-4.2.24-r1 was successful.
no, --without-included-regex should *always* be passed, not just when USE=static
Created attachment 69603 [details, diff] Patch, making econf always use --without-included-regex (In reply to comment #9) > no, --without-included-regex should *always* be passed, not just when USE=static The new attached patch does that.
Added --without-included-regex, thanks.
Reopening. The exact same error also happens with coreutils-5.94 on a newly installed 2005.1 system. On this system I'm using a hardened TC, but this this should not matter, I suppose. I tried to build coreutils with the following USE flags: (chroot2) hetzner tmp # emerge -vpt coreutils These are the packages that I would merge, in reverse order: Calculating dependencies ...done! [ebuild U ] sys-apps/coreutils-5.94 [5.2.1-r6] USE="acl* nls -build static" 0 kB Total size of downloads: 0 kB This did not work. Building with USE=-static worked. i686-pc-linux-gnu-gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -Wl,-O1 -static -o chown chown.o chown-core.o ../lib/libcoreutils.a ../lib/libcoreutils.a chown-core.o(.text+0xe4): In function `gid_to_name': : warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking chgrp.o(.text+0x550): In function `main': : warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking chgrp.o(.text+0x560): In function `main': : warning: Using 'endgrent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking chown-core.o(.text+0x164): In function `uid_to_name': : warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking i686-pc-linux-gnu-gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -Wl,-O1 -static -o chmod chmod.o ../lib/libcoreutils.a ../lib/libcoreutils.a chown-core.o(.text+0xe4): In function `gid_to_name': : warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ../lib/libcoreutils.a(userspec.o)(.text+0x1b4): In function `parse_with_separator': : warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ../lib/libcoreutils.a(userspec.o)(.text+0x1c8): In function `parse_with_separator': : warning: Using 'endgrent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ../lib/libcoreutils.a(userspec.o)(.text+0xb2): In function `parse_with_separator': : warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ../lib/libcoreutils.a(userspec.o)(.text+0xb2): In function `parse_with_separator': : warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking chown-core.o(.text+0x164): In function `uid_to_name': : warning: Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking ../lib/libcoreutils.a(userspec.o)(.text+0xdc): In function `parse_with_separator': : warning: Using 'endpwent' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking i686-pc-linux-gnu-gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -Wl,-O1 -static -o cp cp.o copy.o cp-hash.o ../lib/libcoreutils.a ../lib/libcoreutils.a -lacl i686-pc-linux-gnu-gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -Wl,-O1 -static -o dd dd.o ../lib/libcoreutils.a ../lib/libcoreutils.a -lrt /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libc.a(regex.o)(.rodata+0x0): multiple definition of `__re_error_msgid_idx' ../lib/libcoreutils.a(regex.o)(.rodata+0x0): first defined here /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libc.a(regex.o)(.rodata+0x60): multiple definition of `__re_error_msgid' ../lib/libcoreutils.a(regex.o)(.rodata+0x60): first defined here copy.o(.text+0x1ec): In function `copy_attr_filter': : undefined reference to `attr_copy_check_permissions' copy.o(.text+0x22e2): In function `copy_internal': : undefined reference to `attr_copy_file' collect2: ld returned 1 exit status make[3]: *** [cp] Error 1 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory `/Gentoo/Portage/build/portage/coreutils-5.94/work/coreutils-5.94/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/Gentoo/Portage/build/portage/coreutils-5.94/work/coreutils-5.94/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/Gentoo/Portage/build/portage/coreutils-5.94/work/coreutils-5.94' make: *** [all] Error 2 !!! ERROR: sys-apps/coreutils-5.94 failed. Call stack: ebuild.sh, line 1894: Called dyn_compile ebuild.sh, line 941: Called src_compile (chroot) hetzner tmp # emerge info Portage 2.1_pre4-r1 (hardened/x86/2.6, gcc-3.4.5, glibc-2.3.6-r2, 2.4.27-2-686 i686) ================================================================= System uname: 2.4.27-2-686 i686 AMD Athlon(tm) XP 2000+ Gentoo Base System version 1.6.13 ccache version 2.4 [enabled] dev-lang/python: 2.3.5-r2, 2.4.2-r1 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-r1 sys-devel/binutils: 2.15.92.0.2-r10, 2.16.1-r1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" 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="-march=athlon-xp -O2 -pipe -fomit-frame-pointer" DISTDIR="/Gentoo/Portage/distfiles" FEATURES="autoconfig buildpkg ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LDFLAGS="-Wl,-O1" LINGUAS="de" MAKEOPTS="-j2" PKGDIR="/Gentoo/Portage/packages" PORTAGE_TMPDIR="/Gentoo/Portage/build" PORTDIR="/Gentoo/Portage/tree" PORTDIR_OVERLAY="/Gentoo/Portage/local-tree/misc /Gentoo/Portage/local-tree/overlays/gentoo-de" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="3dnow 3dnowext 7zip acl apache2 async bash-completion berkdb bzip2 cap caps ccache checkpath chroot cracklib crypt cyrus dcc discard-path dlloader ecc erandom exif extensions firefox glep glibc-omitfp hardened hardenedphp hpn iconv idea idled idn imagemagick imap imlib imlib2 jikes jpeg kdeenablefinal linuxthreads-tls logrotate lynxkeymap maildir mime mmap mmx mmxext mode-owner moznoirc mozsvg multislot nls no-old-linux noaudio nocd nodrm nolvm1 nopop3d offensive pam pam-mysql pcre pdf php pic posix postfix prelude pyzor razor readline recode reiserfs sasl sendfile server sftplogging sharedmem srvdir sse ssl static sysvipc szip tcpd threads tiff tokenizer tools unicode userlocales utf8 vhosts vim-pager x86 xfs xinetd zlib elibc_glibc kernel_linux linguas_de userland_GNU" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL
add --without-included-regex to coreutils
Reopening. There's also another error, that makes it impossible to build coreutils with USE=static: i686-pc-linux-gnu-gcc -march=athlon-xp -O2 -pipe -fomit-frame-pointer -Wl,-O1 -static -o dd dd.o ../lib/libcoreutils.a ../lib/libcoreutils.a -lrt copy.o(.text+0x1ec): In function `copy_attr_filter': : undefined reference to `attr_copy_check_permissions' copy.o(.text+0x22e2): In function `copy_internal': : undefined reference to `attr_copy_file'
unrelated, file a new bug
Unrelated? This error message was also part of my comment #12 and it goes away when USE=-static is used. Anyway, please see bug #123343
seems pretty clear to me ... that error has nothing at all to do with this original bug report
(In reply to comment #17) > seems pretty clear to me ... that error has nothing at all to do with this > original bug report I disagree. coreutils cannot be compiled statically. Anyway, in coreutils-5.91-r1, the msgid stuff shows up again: i686-pc-linux-gnu-gcc -O2 -mtune=pentium-m -pipe -fomit-frame-pointer -Wl,-O1 -static -o cp cp.o copy.o cp-hash.o ../lib/libcoreutils.a ../lib/libcoreutils.a -lacl -lattr /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libc.a(regex.o):(.rodata+0x0): multiple definition of `__re_error_msgid_idx' ../lib/libcoreutils.a(regex.o):(.rodata+0x0): first defined here /usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../libc.a(regex.o):(.rodata+0x60): multiple definition of `__re_error_msgid' ../lib/libcoreutils.a(regex.o):(.rodata+0x60): first defined here collect2: ld returned 1 exit status make[3]: *** [cp] Error 1 make[3]: Leaving directory `/Gentoo/Portage/build/portage/coreutils-5.94-r1/work/coreutils-5.94/src' make[2]: *** [all] Error 2 make[2]: Leaving directory `/Gentoo/Portage/build/portage/coreutils-5.94-r1/work/coreutils-5.94/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/Gentoo/Portage/build/portage/coreutils-5.94-r1/work/coreutils-5.94' make: *** [all] Fehler 2 !!! ERROR: sys-apps/coreutils-5.94-r1 failed. Call stack: ebuild.sh, line 1894: Called dyn_compile ebuild.sh, line 941: Called src_compile !!! emake !!! If you need support, post the topmost build error, and the call stack if relevant. I tried to compile with the following flags: [ebuild U ] sys-apps/coreutils-5.94-r1 [5.94] USE="nls static -acl -build" 0 kB alexander@blatt ~ $ emerge info Portage 2.1_pre4-r1 (default-linux/x86/2005.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.15-suspend2-r6.042.kernel-alsa i686) ================================================================= System uname: 2.6.15-suspend2-r6.042.kernel-alsa i686 Intel(R) Celeron(R) M processor 1.50GHz Gentoo Base System version 1.12.0_pre16 distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [enabled] dev-lang/python: 2.3.4-r1, 2.4.2-r1 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-r1 sys-devel/binutils: 2.16.1-r1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -mtune=pentium-m -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mtune=pentium-m -pipe -fomit-frame-pointer" DISTDIR="/Gentoo/Portage/distfiles" FEATURES="autoconfig buildpkg ccache collision-protect distlocks sandbox sfperms strict" GENTOO_MIRRORS=" http://server.bei.digitalprojects.com/gentoo/ http://stuff.alexander.skwar.name/gentoo/ http://mirrors.sec.informatik.tu-darmstadt.de/gentoo/ http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo http://distfiles.gentoo.org/ " LANG="de_DE.UTF-8" LDFLAGS="-Wl,-O1" LINGUAS="de" PKGDIR="/Gentoo/Portage/packages" PORTAGE_TMPDIR="/Gentoo/Portage/build" PORTDIR="/Gentoo/Portage/tree" PORTDIR_OVERLAY="/Gentoo/Portage/local-tree/misc /Gentoo/Portage/local-tree/overlays/gentoo-de" SYNC="rsync://rsync.de.gentoo.org/gentoo-portage" USE="x86 GAPING_SECURITY_HOLE X acpi alsa amd apm arts artswrappersuid async avi bdf berkdb bitmap-fonts bluetooth bootsplash cairo caps cardbus ccache cdda cddb cdio cdparanoia cdr cdrom cle266 crypt css curlwrappers dbus devmap dillo divx4linux dlloader dvd dvdread emoticon esd exif fam fbcon fbdev firefox fping freetype gdbm gif gnokii gnome gstreamer gtk gtk2 hal hpn icc id3 idn imap imlib imlib2 insecure-drivers insecure-savers javascript jikes jpeg kde kdeenablefinal libedit libwww linuxthreads-tls logrotate lynxkeymap mad madwifi maildir matroska mbox mmx mmxext mozilla moznoirc mozsvg mp3 mpeg mpeg2 mpeg4 mplayer multicall ncurses netboot network new-login nfs nis nls no-old-linux no-suexec noantlr nobcel nobeanutils nobsf nobsh nocd nocommonslogging nocommonsnet nodrm nogg nogulm nojsch nojython nolog4j nomac nooro nopri norhino noxalan noxerces nozaptel nptl nsplugin offensive ogg oggvorbis opengl openssh pam_console pam_timestamp passfile password patented pccts pcmcia pcre perl perlsuid pic player png pnp qt quicktime rar readline real recode reiserfs sdl sendfile sensord sftp sms spell spf sse sse2 ssl startup-notification stream subp subtitles suid symlink sysfs syslog tiff transcode truetype truetype-fonts trusted type1-fonts underscores unichrome unicode unsafe usb utf8 uudeview vim vim-pager vlm vorbis wifi win32codecs wma123 x11vnc xinetd xml xml2 xmms xpm xscreensaver xv xvid xvmc zlib elibc_glibc kernel_linux linguas_de userland_GNU video_cards_via" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LC_ALL, MAKEOPTS
> I disagree. coreutils cannot be compiled statically. it doesnt matter if you disagree, you're seeing two sep issues, end of story the acl one is already resolved elsewhere
and newer versions of coreutils uses --without-included-regex again