Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 51328 - tar + static fails to compile
Summary: tar + static fails to compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-17 17:42 UTC by John Barton
Modified: 2005-08-11 20:56 UTC (History)
0 users

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 John Barton 2004-05-17 17:42:49 UTC
Compilation of tar fails giving errors below. Getting same errors compiling tar on several machines

Reproducible: Always
Steps to Reproduce:
1. emerge sync
2. emerge -uD world
3.

Actual Results:  
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../lib     -O3 -mcpu=i586
-fomit-frame-pointer -pipe -MT rmt.o -MD -MP -MF ".deps/rmt.Tpo" \
  -c -o rmt.o `test -f 'rmt.c' || echo './'`rmt.c; \
then mv -f ".deps/rmt.Tpo" ".deps/rmt.Po"; \
else rm -f ".deps/rmt.Tpo"; exit 1; \
fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../lib     -O3 -mcpu=i586
-fomit-frame-pointer -pipe -MT tar.o -MD -MP -MF ".deps/tar.Tpo" \
  -c -o tar.o `test -f 'tar.c' || echo './'`tar.c; \
then mv -f ".deps/tar.Tpo" ".deps/tar.Po"; \
else rm -f ".deps/tar.Tpo"; exit 1; \
fi
gcc  -O3 -mcpu=i586 -fomit-frame-pointer -pipe  -static -o rmt  rmt.o
../lib/libtar.a
gcc  -O3 -mcpu=i586 -fomit-frame-pointer -pipe  -static -o tar  buffer.o
compare.o create.o delete.o extract.o xheader.o incremen.o list.o mangle.o
misc.o names.o rtapelib.o sparse.o system.o tar.o update.o ../lib/libtar.a  -lrt
names.o(.text+0xad): 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+0x1e7): 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+0x137): 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+0x2d): 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-lib/i386-pc-linux-gnu/3.3.2/../../../libc.a(mktime.o)(.text+0x1f0):
In function `__mktime_internal':
: multiple definition of `__mktime_internal'
../lib/libtar.a(mktime.o)(.text+0x0): first defined here
/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.2/../../../../i386-pc-linux-gnu/bin/ld:
Warning: size of symbol `__mktime_internal' changed from 1995 in
../lib/libtar.a(mktime.o) to 1224 in ../lib/libtar.a(mktime.o)
collect2: ld returned 1 exit status
make[2]: *** [tar] Error 1
make[2]: Leaving directory `/var/tmp/portage/tar-1.13.92-r3/work/tar-1.13.92/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/tar-1.13.92-r3/work/tar-1.13.92'
make: *** [all] Error 2

!!! ERROR: app-arch/tar-1.13.92-r3 failed.
!!! Function src_compile, Line 41, Exitcode 2
!!! emake failed



Expected Results:  
compiled cleanly

Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.4.26-1.9.15)
=================================================================
System uname: 2.4.26-1.9.15 i686 VIA Ezra
Gentoo Base System version 1.4.10
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=i586 -fomit-frame-pointer -pipe"
CHOST="i586-pc-linux-gnu"
COMPILER="gcc3"
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="-O3 -mcpu=i586 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
USE="3dnow acl berkdb crypt gdbm innodb mmx mysql ncurses pam perl python
readline snmp sse static tcpd x86 xml zlib"
Comment 1 John Barton 2004-05-17 17:47:11 UTC
Output from another system that has the same problem:

if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../lib     -O3 -mcpu=pentium3 -fomit-frame-pointer -MT rmt.o -MD -MP -MF ".deps/rmt.Tpo" \
  -c -o rmt.o `test -f 'rmt.c' || echo './'`rmt.c; \
then mv -f ".deps/rmt.Tpo" ".deps/rmt.Po"; \
else rm -f ".deps/rmt.Tpo"; exit 1; \
fi
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../lib     -O3 -mcpu=pentium3 -fomit-frame-pointer -MT tar.o -MD -MP -MF ".deps/tar.Tpo" \
  -c -o tar.o `test -f 'tar.c' || echo './'`tar.c; \
then mv -f ".deps/tar.Tpo" ".deps/tar.Po"; \
else rm -f ".deps/tar.Tpo"; exit 1; \
fi
gcc  -O3 -mcpu=pentium3 -fomit-frame-pointer  -static -o rmt  rmt.o ../lib/libtar.a
gcc  -O3 -mcpu=pentium3 -fomit-frame-pointer  -static -o tar  buffer.o compare.o create.o delete.o extract.o xheader.o incremen.o list.o mangle.o misc.o names.o rtapelib.o sparse.o system.o tar.o update.o ../lib/libtar.a  -lrt
names.o(.text+0xc4): 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+0x20b): 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+0x15b): 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+0x34): 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-lib/i686-pc-linux-gnu/3.3.2/../../../libc.a(mktime.o)(.text+0x1f0): In function `__mktime_internal':
: multiple definition of `__mktime_internal'
../lib/libtar.a(mktime.o)(.text+0x0): first defined here
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `__mktime_internal' changed from 1830 in ../lib/libtar.a(mktime.o) to 1224 in ../lib/libtar.a(mktime.o)
collect2: ld returned 1 exit status
make[2]: *** [tar] Error 1
make[2]: Leaving directory `/var/tmp/portage/tar-1.13.92-r3/work/tar-1.13.92/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/tar-1.13.92-r3/work/tar-1.13.92'
make: *** [all] Error 2

!!! ERROR: app-arch/tar-1.13.92-r3 failed.
!!! Function src_compile, Line 41, Exitcode 2
!!! emake failed





Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.2, glibc-2.3.2-r9, 2.6.1-gentoo-r2)
=================================================================
System uname: 2.6.1-gentoo-r2 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.10
Autoconf: sys-devel/autoconf-2.58-r1
Automake: sys-devel/automake-1.8.3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -mcpu=pentium3 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
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="-O3 -mcpu=pentium3 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
USE="acl berkdb crypt gdbm innodb mmx mysql ncurses pam perl python readline snmp sse ssl static tcpd x86 xml zlib"

Comment 2 John Barton 2004-05-18 12:47:23 UTC
Seems to have been caused by the "static" use variable being set, I removed it and tried again and it compiled properly
Comment 3 SpanKY gentoo-dev 2004-05-22 12:57:06 UTC
the getuid stuff is warnings, ignore that; it's new with gcc-3.4

the error is this:
: multiple definition of `__mktime_internal'
Comment 4 SpanKY gentoo-dev 2005-08-11 20:56:58 UTC
fixed with glibc-2.3.5