gentoo ~ # emerge rpm ..... source='rpmrc.c' object='rpmrc.lo' libtool=yes \ depfile='.deps/rpmrc.Plo' tmpdepfile='.deps/rpmrc.TPlo' \ depmode=gcc3 /bin/sh ../depcomp \ /bin/sh ../libtool --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build -I../rpmdb -I../rpmio -I../popt -I../zlib -O2 -mcpu=i686 -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -c -o rpmrc.lo `test -f 'rpmrc.c' || echo './'`rpmrc.c rm -f .libs/rpmrc.lo i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build -I../rpmdb -I../rpmio -I../popt -I../zlib -O2 -mcpu=i686 -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -c rpmrc.c -MT rpmrc.lo -MD -MP -MF .deps/rpmrc.TPlo -fPIC -DPIC -o .libs/rpmrc.lo rpmrc.c: In function `rpmPlatform': rpmrc.c:791: warning: implicit declaration of function `rpmioSlurp' i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build -I../rpmdb -I../rpmio -I../popt -I../zlib -O2 -mcpu=i686 -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -c rpmrc.c -MT rpmrc.lo -MD -MP -MF .deps/rpmrc.TPlo -o rpmrc.o >/dev/null 2>&1 make[3]: *** [rpmrc.lo] Error 1 make[3]: Leaving directory `/var/tmp/portage/rpm-4.2/work/rpm-4.2/lib' make[2]: *** [all] Error 2 make[2]: Leaving directory `/var/tmp/portage/rpm-4.2/work/rpm-4.2/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/rpm-4.2/work/rpm-4.2' make: *** [all] Error 2 !!! ERROR: app-arch/rpm-4.2 failed. !!! Function src_compile, Line 46, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. ====================================================================== gentoo ~ # emerge "<rpm-4.2" ..... config.status: creating db_config.h cd . && aclocal cd . && automake --foreign --include-deps Makefile automake-1.5: configure.in: required file `./depcomp' not found /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL make: *** [Makefile.in] Error 1 !!! ERROR: app-arch/rpm-4.0.4-r5 failed. !!! Function src_compile, Line 40, Exitcode 2 !!! (no error message) !!! If you need support, post the topmost build error, NOT this status message. Reproducible: Always Steps to Reproduce: 1. emerge rpm 2. emerge "<rpm-4.2" 3. Actual Results: both emerge error gentoo ~ # emerge info Portage 2.0.51-r2 (selinux/2004.1/x86, gcc-3.3.4, glibc-2.3.4.20041021-r0, 2.6.7-hardened-r9 i686) ================================================================= System uname: 2.6.7-hardened-r9 i686 AMD Athlon(TM) XP 2000+ Gentoo Base System version 1.6.4 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-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer -fforce-addr" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/security /etc/skel /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer -fforce-addr" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks loadpolicy sandbox sfperms strict" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" USE="X berkdb crypt f77 gpm gtk hardened ldap mysql ncurses nls opengl pam perl pic pie png python readline selinux ssl tcltk tcpd tiff x86 xml2 zlib"
From the rpm-4.2 error log I cannot see what caused the error, could you include more lines from the make process? I bet rpm-4.0.4 is too old to get working with a new toolchain (so will ignore!)
Created attachment 43260 [details] process of emerge rpm-4.2 This is my new system information created by 'emerge info'. Gentoo Base System version 1.6.5 Portage 2.0.51-r2 (selinux/2004.1/x86, gcc-3.3.4, glibc-2.3.4.20041021-r0, 2.6.7-hardened-r10 i686) ================================================================= System uname: 2.6.7-hardened-r10 i686 AMD Athlon(TM) XP 2000+ 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-r5 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer -fforce-addr" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/security /etc/skel /etc/terminfo /etc/wget /etc/env.d" CXXFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer -fforce-addr" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache distlocks loadpolicy sandbox sfperms strict" GENTOO_MIRRORS="ftp://166.111.172.55/pub/mirror/gentoo/ ftp://ftp.sjtu.edu.cn/mirror/sites/gentoo/ ftp://ftp.tsinghua.edu.cn/mirror/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://ftp.lzusiyu.org/gentoo-portage" USE="X berkdb crypt f77 gpm gtk hardened ldap mysql ncurses nls opengl pam perl pic pie png python readline selinux ssl tcltk tcpd tiff x86 xml2 zlib"
Mmm, as far as I can see there is not error reported by the make process except for it failing. I compiled rpm with exact same setting / compiler except for the hardened / selinux setup. It used the exact same gcc and libtool command line arguments, and worked. Could you try again and when it fails go to /var/tmp/portage/rpm-4.2/work/rpm-4.2/lib directory and manually run the last gcc compile command: i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build -I../rpmdb -I../rpmio -I../popt -I../zlib -O2 -mcpu=i686 -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -c rpmrc.c -MT rpmrc.lo -MD -MP -MF .deps/rpmrc.TPlo -o rpmrc.o Does it work? Also try the libtool line: source='rpmrc.c' object='rpmrc.lo' libtool=yes \ depfile='.deps/rpmrc.Plo' tmpdepfile='.deps/rpmrc.TPlo' \ depmode=gcc3 /bin/sh ../depcomp \ /bin/sh ../libtool --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build -I../rpmdb -I../rpmio -I../popt -I../zlib -O2 -mcpu=i686 -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -c -o rpmrc.lo `test -f 'rpmrc.c' || echo './'`rpmrc.c The problem might be there. Is rpmrc.lo created?
*** Bug 51695 has been marked as a duplicate of this bug. ***
I tried two methods, both failed. no rpmrc.lo was created. I am running gentoo on VMware 4.5 for windows. Does it matter? ================== #cd /var/tmp/portage/rpm-4.2/work/rpm-4.2/lib # i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build -I../rpmdb -I../rpmio -I../popt -I../zlib -O2 -mcpu=i686 -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -c rpmrc.c -MT rpmrc.lo -MD -MP -MF .deps/rpmrc.TPlo -o rpmrc.o rpmrc.c: In function `rpmPlatform': rpmrc.c:791: warning: implicit declaration of function `rpmioSlurp' rpmrc.c: In function `is_athlon': rpmrc.c:900: error: can't find a register in class `BREG' while reloading `asm' ================== # source='rpmrc.c' object='rpmrc.lo' libtool=yes \ > depfile='.deps/rpmrc.Plo' tmpdepfile='.deps/rpmrc.TPlo' \ > depmode=gcc3 /bin/sh ../depcomp \ > /bin/sh ../libtool --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build \ > -I../rpmdb -I../rpmio -I../popt -I../zlib -O2 -mcpu=i686 -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith \ > -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -c -o rpmrc.lo `test -f 'rpmrc.c' || echo './'`rpmrc.c rm -f .libs/rpmrc.lo i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build -I../rpmdb -I../rpmio -I../popt -I../zlib -O2 -mcpu=i686 -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -c rpmrc.c -MT rpmrc.lo -MD -MP -MF .deps/rpmrc.TPlo -fPIC -DPIC -o .libs/rpmrc.lo rpmrc.c: In function `rpmPlatform': rpmrc.c:791: warning: implicit declaration of function `rpmioSlurp' i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build -I../rpmdb -I../rpmio -I../popt -I../zlib -O2 -mcpu=i686 -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -c rpmrc.c -MT rpmrc.lo -MD -MP -MF .deps/rpmrc.TPlo -o rpmrc.o >/dev/null 2>&1
I viewed bug 51695. And I tried the method from #4. The result is: The commandline is: source='rpmrc.c' object='rpmrc.lo' libtool=yes \ depfile='.deps/rpmrc.Plo' tmpdepfile='.deps/rpmrc.TPlo' \ depmode=gcc3 /bin/sh ../depcomp \ /bin/sh ../libtool --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I.. -I../build -I../rpmdb -I../rpmio -I../popt -I../zlib -O2 -mcpu=i686 -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -fno-pie -c -o rpmrc.lo `test -f 'rpmrc.c' || echo './'`rpmrc.c The file compiles fine when -fno-pie is added to the command. But how can I go on to emerging rpm-4.2?
Created attachment 43357 [details, diff] rpm-4.2-pic.patch Thanks, seems like the inline asm runs out of registers if pic or pie is used; but pie does not hit the macro which should take care of it. Fix that. Could you try this patch? It should fix it (add it to the ebuild or any other method). Thanks
Ok, reproduced problem by switching gcc to: i686-pc-linux-gnu-3.4.2-hardened I then got the exact same error as reported. I applied my patch and it fixed it and it is the correct fix. Commited to portage. Closing bug :-)