Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 51695

Summary: rpm-4.2.1 compilation failed
Product: Gentoo Linux Reporter: Jackie Polke <jackie>
Component: Current packagesAssignee: Stefan Jones (RETIRED) <cretin>
Status: RESOLVED DUPLICATE    
Severity: normal CC: arnvid, sandino
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Jackie Polke 2004-05-21 14:41:56 UTC
When I try emerge rpm-4.2.1 I get compile error in rpmrc.c 

rm -f .libs/rpmrc.lo
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build -I../rpmdb -I../rpmio -I/usr/include/beecrypt -I../popt -I../zlib -Os -march=athlon-xp -pipe -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT rpmrc.lo -MD -MP -MF .deps/rpmrc.Tpo -c rpmrc.c  -fPIC -DPIC -o .libs/rpmrc.lo
rpmrc.c: In function `rpmPlatform':
rpmrc.c:791: warning: implicit declaration of function `rpmioSlurp'
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build -I../rpmdb -I../rpmio -I/usr/include/beecrypt -I../popt -I../zlib -Os -march=athlon-xp -pipe -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT rpmrc.lo -MD -MP -MF .deps/rpmrc.Tpo -c rpmrc.c -o rpmrc.o >/dev/null 2>&1
make[3]: *** [rpmrc.lo] B??d 1
make[3]: Leaving directory `/home/install/tmp/portage/rpm-4.2.1/work/rpm-4.2.1/lib'
make[2]: *** [all] B??d 2
make[2]: Leaving directory `/home/install/tmp/portage/rpm-4.2.1/work/rpm-4.2.1/lib'
make[1]: *** [all-recursive] B??d 1
make[1]: Leaving directory `/home/install/tmp/portage/rpm-4.2.1/work/rpm-4.2.1'
make: *** [all] B??d 2

!!! ERROR: app-arch/rpm-4.2.1 failed.
!!! Function src_compile, Line 46, Exitcode 2
!!! (no error message)

This is elibtool.log

patching file /home/install/tmp/portage/rpm-4.2.1/work/rpm-4.2.1/popt/ltmain.sh
Hunk #1 FAILED at 3462.
1 out of 1 hunk FAILED -- saving rejects to file /home/install/tmp/portage/rpm-4.2.1/work/rpm-4.2.1/popt/ltmain.sh.rej

I tried reemerge popt.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Portage 2.0.50-r6 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040420-r0, 
2.4.26_pre6-gentoo) 
================================================================= 
System uname: 2.4.26_pre6-gentoo i686 AMD Athlon(tm) XP 1700+ 
Gentoo Base System version 1.4.15 
Autoconf: sys-devel/autoconf-2.59-r3 
Automake: sys-devel/automake-1.8.3 
ACCEPT_KEYWORDS="x86 ~x86" 
AUTOCLEAN="yes" 
CFLAGS="-Os -march=athlon-xp -pipe -fomit-frame-pointer" 
CHOST="i686-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /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/qmail/control" 
CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-Os -march=athlon-xp -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs ccache sandbox" 
GENTOO_MIRRORS="http://src.gentoo.pl/ http://mirror.tucdemonic.org/gentoo/ 
http://128.213.5.34/gentoo/  
ftp://ftp.join.uni-muenster.de/pub/linux/distributions/gentoo 
http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/home/install/tmp" 
PORTDIR="/usr/portage"
Comment 1 Aron Griffis (RETIRED) gentoo-dev 2004-05-28 12:31:30 UTC
So what happens when you "rm -rf /var/tmp/portage/rpm*" then try again?  Same exact errors?

I'm asking because I just merged rpm three times.  The first two times I got errors, not even the same ones, and the last time I didn't get any errors.  I haven't figured out what the problem is, though, since the ebuild doesn't use emake.
Comment 2 Anil Gupta 2004-07-08 11:56:06 UTC
I was able to build rpm after I emerged beecrypt.
Comment 3 Dennis Freise 2004-07-25 06:09:25 UTC
I got the same error - though I can reproduce it on every try.
I tried rm -rf /var/tmp/portage/* - to no avail.
I also tried reemerging beecrypt.
I have even recompiled my whole world since the last try :)

Portage 2.0.50-r9 (x86, gcc-3.3.4, glibc-2.3.3.20040420-r0, 2.6.7-hardened-r3)
=================================================================
System uname: 2.6.7-hardened-r3 i686 AMD Duron(tm) 
Gentoo Base System version 1.5.1
Autoconf: sys-devel/autoconf-2.59-r4
Automake: sys-devel/automake-1.8.5-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon -mcpu=athlon -mmmx -m3dnow -O2 -pipe -fomit-frame-pointer -ffast-math -fforce-addr -falign-functions=4"
CHOST="i686-pc-linux-gnu"
COMPILER=""
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /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="-march=athlon -mcpu=athlon -mmmx -m3dnow -O2 -pipe -fomit-frame-pointer -ffast-math -fforce-addr -falign-functions=4"
DISTDIR="/storage/portage/distfiles"
FEATURES="autoaddcvs ccache sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.easynet.nl/mirror/gentoo/ ftp://gentoo.inode.at/source/ http://gentoo.inode.at"
MAKEOPTS="-j2"
PKGDIR="/storage/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://localhost/gentoo-portage"
USE="3dnow acpi apache2 apm berkdb chroot crypt curl erandom exiscan-acl gd gdbm gif gmp gpm hardened hardenedphp imagemagick imap innodb java jpeg ldap libwww maildir mmx mysql nagios-dns nagios-ntp nagios-ping nagios-ssh ncurses nls nptl pam parse-clocks pcre pdflib perl pic pie png python readline samba sasl slang snmp socks5 sse ssl tcpd tetex threads tiff truetype usb vhosts wildlsearch x86 xml xml2 zlib"
Comment 4 Dennis Freise 2004-08-04 22:29:03 UTC
Okay, I think I tracked down the error. It's in lib/rpmrc.c, line 900 to line 902:

__asm__("cpuid"
        : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
        : "a" (op));

This piece of assembler-code doesn't compile on a hardened gcc, and throws the following error:

rpmrc.c: In function `is_athlon':
rpmrc.c:900: error: can't find a register in class `BREG' while reloading `asm'

The commandline is:
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build -I../rpmdb -I../rpmio -I/usr/include/beecrypt -I../popt -I../zlib -march=athlon -mcpu=athlon -O2 -pipe -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT rpmrc.lo -MD -MP -MF .deps/rpmrc.Tpo -c rpmrc.c -o rpmrc.o

The file compiles fine when -fno-pie is added to the command.

I'm not sure if it's an upstream-bug or a problem with the hardened toolchain, maybe the hardened devs could have a look at this...
Comment 5 Sandino Araico Sanchez 2004-09-07 19:49:20 UTC
-fno-pie does not help

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build -I../rpmdb -I../rpmio -I/usr/include/beecrypt -I../popt -I../zlib -march=athlon-xp -O3 -pipe -fprefetch-loop-arrays -fno-pie -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT rpmrc.lo -MD -MP -MF .deps/rpmrc.Tpo -c rpmrc.c  -fPIC -DPIC -o .libs/rpmrc.lo
rpmrc.c: In function `rpmPlatform':
rpmrc.c:791: warning: implicit declaration of function `rpmioSlurp'
Comment 6 Stefan Jones (RETIRED) gentoo-dev 2004-09-09 09:43:02 UTC
Works fine here, I do not use hardened. Just a fully up to date unstable setup with nptl.

Is this problem still there on normal non-hardened systems? If not I will reassign to the hardened team.
Comment 7 Arnvid L. Karstad 2004-09-14 08:27:49 UTC
I have the same problem with my non-hardnened server.

Linux trance 2.6.7-gentoo-r14 #1 SMP Fri Aug 13 11:51:35 CEST 2004 i686 Intel(R) Xeon(TM) CPU 2.00GHz GenuineIntel GNU/Linux



Comment 8 Arnvid L. Karstad 2004-09-14 08:34:02 UTC
rpmrc.c: In function `rpmPlatform':
rpmrc.c:791: warning: implicit declaration of function `rpmioSlurp'
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build -I../rpmdb -I../rpmio -I/usr/include/beecrypt -I../popt -I../zlib -march=pentium4 -pipe -O2 -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -MT rpmrc.lo -MD -MP -MF .deps/rpmrc.Tpo -c rpmrc.c -o rpmrc.o >/dev/null 2>&1
make[3]: *** [rpmrc.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/rpm-4.2.1/work/rpm-4.2.1/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/rpm-4.2.1/work/rpm-4.2.1/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/rpm-4.2.1/work/rpm-4.2.1'
make: *** [all] Error 2

!!! ERROR: app-arch/rpm-4.2.1 failed.
!!! Function src_compile, Line 46, Exitcode 2
!!! (no error message)
Comment 9 Arnvid L. Karstad 2004-09-14 09:15:11 UTC
Annoying. It compiles fine on my p3 box..  Just compiled it there.
Comment 10 Stefan Jones (RETIRED) gentoo-dev 2004-09-14 09:29:43 UTC
Ok, I cannot reproduce any errors here yet, wtill trying... I bet it is the asm code in rpmrc.c though.

I think we have two errors here, the fail compile on non-hardeded systems and the hardened failure reported in #3 and #4.

Will check for any updates to the file upstream.
Comment 11 Stefan Jones (RETIRED) gentoo-dev 2004-10-04 07:43:23 UTC
This must of been a transient toolchain error, closing as works for me.

Please reopen if it still persists.
Comment 12 Stefan Jones (RETIRED) gentoo-dev 2004-11-04 10:46:24 UTC
Seems others have hit this problem again
Comment 13 Stefan Jones (RETIRED) gentoo-dev 2004-11-04 10:46:36 UTC

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