Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 283663 - app-arch/cpio-2.10 failed: multiple definition of `lstat'/`stat'
Summary: app-arch/cpio-2.10 failed: multiple definition of `lstat'/`stat'
Status: RESOLVED DUPLICATE of bug 289757
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-04 14:41 UTC by Xiao-Yong JIN
Modified: 2010-08-26 17:40 UTC (History)
1 user (show)

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


Attachments
output after preprocessing `copyin.c' (copyin_pp.c,179.05 KB, text/plain)
2009-09-05 22:34 UTC, Xiao-Yong JIN
Details
preprocessed copyout.c (copyout_pp.c,166.46 KB, text/plain)
2009-09-05 22:36 UTC, Xiao-Yong JIN
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xiao-Yong JIN 2009-09-04 14:41:43 UTC
x86_64-pc-linux-gnu-gcc -std=gnu99  -march=native -O3 -pipe -fomit-frame-pointer  -Wl,-O1 -o cpio copyin.o copyout.o copypass.o defer.o dstring.o global.o fatal.o main.o tar.o util.o filemode.o idcache.o makepath.o userspec.o ../lib/libpax.a ../gnu/libgnu.a  
copyout.o: In function `stat':
copyout.c:(.text+0x430): multiple definition of `stat'
copyin.o:copyin.c:(.text+0x11d0): first defined here
copyout.o: In function `lstat':
copyout.c:(.text+0x440): multiple definition of `lstat'
copyin.o:copyin.c:(.text+0x11e0): first defined here
copypass.o: In function `stat':
copypass.c:(.text+0x1e0): multiple definition of `stat'
copyin.o:copyin.c:(.text+0x11d0): first defined here
copypass.o: In function `lstat':
copypass.c:(.text+0x1f0): multiple definition of `lstat'
copyin.o:copyin.c:(.text+0x11e0): first defined here
main.o: In function `lstat':
main.c:(.text+0x1830): multiple definition of `lstat'
copyin.o:copyin.c:(.text+0x11e0): first defined here
main.o: In function `stat':
main.c:(.text+0x1820): multiple definition of `stat'
copyin.o:copyin.c:(.text+0x11d0): first defined here
tar.o: In function `stat':
tar.c:(.text+0x230): multiple definition of `stat'
copyin.o:copyin.c:(.text+0x11d0): first defined here
tar.o: In function `lstat':
tar.c:(.text+0x240): multiple definition of `lstat'
copyin.o:copyin.c:(.text+0x11e0): first defined here
util.o: In function `stat':
util.c:(.text+0xcc0): multiple definition of `stat'
copyin.o:copyin.c:(.text+0x11d0): first defined here
util.o: In function `lstat':
util.c:(.text+0xcd0): multiple definition of `lstat'
copyin.o:copyin.c:(.text+0x11e0): first defined here
collect2: ld returned 1 exit status
make[2]: *** [cpio] Error 1


Reproducible: Always
Comment 1 Xiao-Yong JIN 2009-09-04 14:49:53 UTC
Portage 2.2.00.14179-prefix (prefix/linux/amd64, gcc-4.4.1, unavailable, 2.6.9-42.0.3.ELsmp x86_64)
=================================================================
System uname: Linux-2.6.9-42.0.3.ELsmp-x86_64-Intel-R-_Xeon-R-_CPU_E5335_@_2.00GHz-with-redhat-4.4-Beryllium
Timestamp of tree: Fri, 04 Sep 2009 13:33:13 +0000
app-shells/bash:     4.0_p28-r00.1
dev-lang/python:     2.6.2-r01.1
sys-devel/autoconf:  2.13, 2.63-r01.1
sys-devel/automake:  1.10.2-r00.1, 1.11
sys-devel/binutils:  2.19.51.0.14
sys-devel/gcc-config: 1.4.1-r00.2
sys-devel/libtool:   2.2.6a-r00.1
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64-linux ~amd64-linux"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O3 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=native -O3 -pipe -fomit-frame-pointer"
DISTDIR="/home/jin/gentoo_em64t/usr/portage/distfiles"
FEATURES="assume-digests collision-protect distlocks fixpackages parallel-fetch preserve-libs protect-owned sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j8"
PKGDIR="/home/jin/gentoo_em64t/usr/portage/packages"
PORTAGE_CONFIGROOT="/home/jin/gentoo_em64t/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/home/jin/gentoo_em64t/var/tmp"
PORTDIR="/home/jin/gentoo_em64t/usr/portage"
PORTDIR_OVERLAY="/home/jin/gentoo_port_overlay"
SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix"
USE="X amd64 berkdb bzip2 cairo cjk cli cracklib crypt cscope cvs djvu dri emacs fortran gd gdbm gif gmp gtk iconv imlib ipv6 isdnlog jbig jpeg jpeg2k m17n-lib mmx mudflap ncurses nls nptl nptlonly openmp pcre pdf perl plotutils png pppd prefix python readline reflection session spl sse sse2 ssl subversion svg sysfs tcpd tetex threads tiff truetype unicode xface xinerama xml xorg xpm zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-09-04 15:25:54 UTC
I was wondering if anyone else besides me had this problem. Been failing since April 2009. Looks like you have RHEL4 or similar host OS?
Comment 3 Xiao-Yong JIN 2009-09-04 22:36:40 UTC
It's Scientific Linux SL release 4.4 (Beryllium).  It is based RHEL, AFAIK.  Do you have any idea why it fails with multiple definitions of stat/lstat, specifically?
Comment 4 Fabian Groffen gentoo-dev 2009-09-05 07:07:15 UTC
here:

x86_64-pc-linux-gnu-gcc -std=gnu99  -march=native -O3 -pipe
-fomit-frame-pointer  -Wl,-O1 -o cpio copyin.o copyout.o copypass.o defer.o
dstring.o global.o fatal.o main.o tar.o util.o filemode.o idcache.o makepath.o
userspec.o ../lib/libpax.a ../gnu/libgnu.a  
copyout.o: In function `stat':
copyout.c:(.text+0x430): multiple definition of `stat'
copyin.o:copyin.c:(.text+0x11d0): first defined here

so it's both in copyout.o and copyin.o

Were there compilation warnings about stat?  It would be interesting to see how the code looks there, maybe stat is defined in a file that both include, in such a way that the symbol gets stored.
Comment 5 Xiao-Yong JIN 2009-09-05 22:34:45 UTC
Created attachment 203240 [details]
output after preprocessing `copyin.c'

So here is the output after I stick in a `-E' to the command line.  I can't figure out what is the problem.  Hope you guys can get some clues out of it.  I will attach the preprocessed copyout.c in the next post.
Comment 6 Xiao-Yong JIN 2009-09-05 22:36:15 UTC
Created attachment 203242 [details]
preprocessed copyout.c

I hope it helps to figure out what is wrong with the system.
Comment 7 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-08-26 17:40:51 UTC
Marking as a dupe of bug 289757. Appending -fgnu89-inline to CFLAGS fixes this package.

*** This bug has been marked as a duplicate of bug 289757 ***