Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 70942 - static bombs with gcc-3.4.3 / glibc-2.3.4.20041102-r0
Summary: static bombs with gcc-3.4.3 / glibc-2.3.4.20041102-r0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 91971 92902 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-11-12 03:05 UTC by Alexander Skwar
Modified: 2005-12-15 23:34 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Skwar 2004-11-12 03:05:44 UTC
I'm trying to compile util-linux with the static USE flag.

Reproducible: Always
Steps to Reproduce:
1. USE=static emerge =sys-apps/util-linux-2.12i

Actual Results:  
i686-pc-linux-gnu-gcc -c -O2 -march=athlon-xp -pipe -I../lib -Wall
-Wmissing-prototypes -Wstrict-prototypes -DNCH=1   -D_FILE_OFFSET_BITS=64
-DSBINDIR=\"/sbin\" -DUSRSBINDIR=\"/usr/sbin\" -DLOGDIR=\"/var/log\"
-DVARPATH=\"/var\" -DLOCALEDIR=\"/usr/share/locale\" -O2 -march=athlon-xp -pipe
-DHAVE_NFS  swapon.c
getusername.o(.text+0x12): In function `getusername':
: warning: Using 'getpwuid' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
umount.o(.text+0x69a): In function `umount_one':
: warning: Using 'gethostbyname' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
i686-pc-linux-gnu-gcc -Wl,-O1 -Wl,-z,now -static main_losetup.o loumount.o
loop.o sha512.o rmd160.o aes.o ../lib/xstrncpy.o -o losetup
main_losetup.o(.text+0x8f4): In function `sGetPass':
: warning: Using 'getpwuid' 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.3/../../../libc.a(setuid.o)(.text+0x29): In
function `__setuid':
: undefined reference to `__libc_pthread_functions'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libc.a(setgid.o)(.text+0x29): In
function `__setgid':
: undefined reference to `__libc_pthread_functions'
collect2: ld returned 1 exit status
make[1]: *** [losetup] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory
`/var/tmp/portage/util-linux-2.12i/work/util-linux-2.12i/mount'
make: *** [all] Error 1

!!! ERROR: sys-apps/util-linux-2.12i failed.
!!! Function src_compile, Line 98, Exitcode 2
!!! emake failed
!!! If you need support, post the topmost build error, NOT this status message.


Expected Results:  
It should compile just fine. 

If I compile with 

USE=-static emerge =sys-apps/util-linux-2.12i

the compilation works fine.

[12:01:05 alexander@server:~] $ emerge info
Portage 2.0.51-r3 (default-x86-2004.2, gcc-3.4.3, glibc-2.3.4.20041102-r0,
2.6.9-ck3.ASN.no-devfs.async_ppp.lp-module i686)
=================================================================
System uname: 2.6.9-ck3.ASN.no-devfs.async_ppp.lp-module i686 AMD Athlon(tm) XP
2000+
Gentoo Base System version 1.6.6
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.15.92.0.2-r1
Headers:  sys-kernel/linux26-headers-2.6.8.1-r1
Libtools: sys-devel/libtool-1.5.2-r7
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon-xp -pipe"
CHOST="i686-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/lib/mozilla/defaults/pref /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/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache collision-protect distlocks sandbox"
GENTOO_MIRRORS="http://localhost/~alexander/gentoo-files/
http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/
ftp://mirrors.sec.informatik.tu-darmstadt.de/gentoo/
ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo
ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo http://194.117.158.29"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowex X aalib acl alsa apache2 apm arts artswrappersuid async avi
bluetooth bzlib cairo calendar cddb cdparanoia cdr cdrom codecs crypt cscope
cups curl curlwrappers dga diet directfb divx4linux djbfft encode esd ethereal
evo exif fam fbcon fbdev ffmpeg fftw flac flash foomaticdb foreign-package
foreign-sysvinit fortran ftp fwdzone gd gdbm gif gimp gimpprint gmail gnokii
gnome gphoto2 gpm gstreamer gtk gtk2 guile hal iconv imagemagick imap imlib
immqt-bc java javascript jpeg kde libedit libg++ libwww lzo lzw lzw-tiff mad
maildir mailwrapper matroska matrox mbox mime mmap mmx mng mozilla mpeg ncurses
network nls no-old-linux noantlr nobcel nobeanutils nobsh nocommonslogging
nocommonsnet nojdepend nojsch nojython nolog4j nooro noregexp norhino noxalan
noxerces nptl nptlonly offensive ofx oggvorbis opengl oss pam parse-clocks pcntl
pcre pdflib perl pic pie png posix ppds python qt quicktime quotes readline
recode samba sasl sdl shared slang sockets spell sse ssl svg sysvipc tcltk tcpd
tetex theora tiff truetype unicode usb videos vim-with-x wmf x86 xchattext xfs
xml2 xmms xv xvid zlib video_cards_matrox linguas_de"
Comment 1 Alexander Skwar 2004-11-12 08:27:39 UTC
Hmm... app-arch/tar-1.14.90-r1 fails to compile with the exact same error message:

names.o(.text+0x130): In function `gid_to_gname':
: warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
names.o(.text+0x326): In function `gname_to_gid':
: warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
names.o(.text+0x224): In function `uname_to_uid':
: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
names.o(.text+0x50): In function `uid_to_uname':
: warning: Using 'getpwuid' 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.3/../../../libc.a(setuid.o)(.text+0x38): In function `__setuid':
: undefined reference to `__libc_pthread_functions'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libc.a(setgid.o)(.text+0x38): In function `__setgid':
: undefined reference to `__libc_pthread_functions'
collect2: ld gab 1 als Ende-Status zur
Comment 2 Alexander Skwar 2004-11-12 08:27:39 UTC
Hmm... app-arch/tar-1.14.90-r1 fails to compile with the exact same error message:

names.o(.text+0x130): In function `gid_to_gname':
: warning: Using 'getgrgid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
names.o(.text+0x326): In function `gname_to_gid':
: warning: Using 'getgrnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
names.o(.text+0x224): In function `uname_to_uid':
: warning: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
names.o(.text+0x50): In function `uid_to_uname':
: warning: Using 'getpwuid' 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.3/../../../libc.a(setuid.o)(.text+0x38): In function `__setuid':
: undefined reference to `__libc_pthread_functions'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libc.a(setgid.o)(.text+0x38): In function `__setgid':
: undefined reference to `__libc_pthread_functions'
collect2: ld gab 1 als Ende-Status zurück
make[2]: *** [tar] Fehler 1
make[2]: Leaving directory `/var/tmp/portage/tar-1.14.90-r1/work/tar-1.14.90/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/var/tmp/portage/tar-1.14.90-r1/work/tar-1.14.90'
make: *** [all] Fehler 2

!!! ERROR: app-arch/tar-1.14.90-r1 failed.
!!! Function src_compile, Line 45, Exitcode 2
!!! emake failed
!!! If you need support, post the topmost build error, NOT this status message.


17:23:19 askwar@alturo:~ $ epm -qf /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libc.a
glibc-2.3.4.20041102

17:23:44 askwar@alturo:~ $ genlop -i glibc
 * sys-libs/glibc


   Total builds: 3
   Global build time: 6 hours, 7 minutes and 23 seconds.
   Average merge time: 2 hours, 2 minutes and 27 seconds.

   Info about currently installed ebuild:

   * sys-libs/glibc-2.3.4.20041102
   Install date: Fri Nov 12 02:04:36 2004
   USE="nls pic nptl nptlonly hardened -build -erandom -multilib -debug -userlocales -nomalloccheck"
   CFLAGS="-march=pentium4 -O3 -pipe -freorder-blocks -O2"
Comment 3 Alexander Skwar 2004-11-13 22:40:01 UTC
Hmm, strange. app-admin/syslog-ng-1.6.5-r1 gives the same error message:

/usr/lib/libol.a(io.o)(.text+0x1727): In function `get_inaddr':
: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
afinet.o(.text+0x259): In function `inet_address_setport':
: warning: Using 'getservbyname' 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.3/../../../libc.a(setuid.o)(.text+0x38): In function `__setuid':
: undefined reference to `__libc_pthread_functions'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libc.a(setgid.o)(.text+0x38): In function `__setgid':
: undefined reference to `__libc_pthread_functions'
collect2: ld gab 1 als Ende-Status zur
Comment 4 Alexander Skwar 2004-11-13 22:40:01 UTC
Hmm, strange. app-admin/syslog-ng-1.6.5-r1 gives the same error message:

/usr/lib/libol.a(io.o)(.text+0x1727): In function `get_inaddr':
: warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
afinet.o(.text+0x259): In function `inet_address_setport':
: warning: Using 'getservbyname' 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.3/../../../libc.a(setuid.o)(.text+0x38): In function `__setuid':
: undefined reference to `__libc_pthread_functions'
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libc.a(setgid.o)(.text+0x38): In function `__setgid':
: undefined reference to `__libc_pthread_functions'
collect2: ld gab 1 als Ende-Status zurück
make[3]: *** [syslog-ng] Fehler 1
make[3]: Leaving directory `/var/tmp/portage/syslog-ng-1.6.5-r1/work/syslog-ng-1.6.5/src'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/var/tmp/portage/syslog-ng-1.6.5-r1/work/syslog-ng-1.6.5/src'
make[1]: *** [all] Fehler 2
make[1]: Leaving directory `/var/tmp/portage/syslog-ng-1.6.5-r1/work/syslog-ng-1.6.5/src'
make: *** [all-recursive] Fehler 1

!!! ERROR: app-admin/syslog-ng-1.6.5-r1 failed.


Is there some issue with the glibc? 

07:38:17 askwar@alturo:~ $ epm -qf /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../libc.a
glibc-2.3.4.20041102
Comment 5 SpanKY gentoo-dev 2004-11-13 22:44:40 UTC
it's a toolchain bug, not these packages
Comment 6 Alexander Skwar 2004-11-14 07:33:10 UTC
I just realised something: The error messages always said, that something with pthread wasn't present. Then I realised, that I had glibc installed with nptlonly. 

I now re-emerged glibc WITHOUT nptlonly, which also installed the pthread library. After I did so, I was able to USE=static emerge tar (and all the others, I mentioned).

Is there anything I expect gentoo to do better? Dunno. It would be nice, if the packages I mentioned wouldn't even try to compile with static, if nptlonly is set. But, I don't quite know if this is a sensible expectation.
Comment 7 SpanKY gentoo-dev 2005-05-31 17:51:06 UTC
*** Bug 92902 has been marked as a duplicate of this bug. ***
Comment 8 SpanKY gentoo-dev 2005-05-31 17:51:10 UTC
*** Bug 91971 has been marked as a duplicate of this bug. ***
Comment 9 Mark Loeser (RETIRED) gentoo-dev 2005-12-15 23:34:39 UTC
This looks fixed.  USE=static tar worked for me on my nptlonly system.