The latest Prefix ebuild for sys-devel/gcc-4.4.3-r2 fails to emerge on x86-linux and amd64-linux. The problem is that it fails to pick up libgmp headers that are actually installed in my prefix: /opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/build/./prev-gcc/xgcc -B/opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/build/./prev-gcc/ -B/opt/hwbp/usr/i686-pc-linux-gnu/bin/ -c -O2 -fno-stack-protector -pipe -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -I. -I. -I/opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc -I/opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/. -I/opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/../include -I/opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/../libcpp/include -I/opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/../libdecnumber -I/opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/../libdecnumber/bid -I../libdecnumber /opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/c-lang.c -o c-lang.o In file included from /opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/tree.h:30, from /opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/c-lang.c:27: /opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/double-int.h:24:17: error: gmp.h: No such file or directory In file included from /opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/tree.h:30, from /opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/c-lang.c:27: /opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/double-int.h:184: error: expected ')' before 'double_int' /opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/double-int.h:185: error: expected declaration specifiers or '...' before 'mpz_t' In file included from /opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/c-lang.c:27: /opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/tree.h:4905: error: expected declaration specifiers or '...' before 'mpz_t' /opt/hwbp/var/tmp/portage/sys-devel/gcc-4.4.3-r2/work/gcc-4.4.3/gcc/tree.h:4905: error: expected declaration specifiers or '...' before 'mpz_t' make[3]: *** [c-lang.o] Error 1 sys-devel/gcc-4.4.2 and the older sys-devel/gcc-4.4.3 before the latest sync continue to emerge OK. Reproducible: Always
confirmed. The only difference is in -r2 over -r0 is the cloog patch. No clue what it does but Halcy0n says that it only matters if you enabled USE=graphite, which I did not. My error seems abit different because I don't see that "missing gmp.h" message. This seems related: http://www.mail-archive.com/lfs-support@linuxfromscratch.org/msg11090.html
Matt, please try: EXTRA_ECONF="--with-mpfr=${EPREFIX}/usr --with-gmp=${EPREFIX}/usr" emerge -av1 gcc and let me know how it goes? I can't explain the regression between -r0 and -r2 but the above command fixed it for me. I am awaiting your feedback :)
http://overlays.gentoo.org/proj/alt/changeset/58066
(In reply to comment #3) > http://overlays.gentoo.org/proj/alt/changeset/58066 > Hello Jeremy, this update does not fix the bug on my system. In the 1st stage, mpfr can be located, but not 2nd stage. Matt, can you confirm this? Please consider reopen the bug.
Created attachment 232533 [details] gcc-4.4.3-r2 build failure: cannot find mpfr.h in 2nd stage
$ emerge -pqv =sys-devel/gcc-4.4.3-r2 [ebuild U ] sys-devel/gcc-4.4.3-r2 [4.4.3] USE="fortran mudflap nls nptl openmp (-altivec) -bootstrap -build -doc (-fixed-point) -gcj -graphite -gtk (-hardened) (-libffi) (-multilib) -multislot (-n32) (-n64) -nocxx -objc -objc++ -objc-gc -test -vanilla" $ emerge --info =sys-devel/gcc-4.4.3-r2 Portage 2.2.00.15842-prefix (prefix/linux/x86, gcc-4.2.4, unavailable, 2.6.27.38-170.2.113.fc10.i686.PAE i686) ================================================================= System Settings ================================================================= System uname: Linux-2.6.27.38-170.2.113.fc10.i686.PAE-i686-Intel-R-_Xeon-R-_CPU_X5470_@_3.33GHz-with-fedora-10-Cambridge Timestamp of tree: Sun, 23 May 2010 00:38:41 +0000 distcc 2.18.3 i386-redhat-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] ccache version 2.4 [disabled] app-shells/bash: 4.0_p38 dev-lang/python: 2.6.5-r2 dev-util/cmake: 2.8.1-r1 sys-devel/autoconf: 2.13, 2.65 sys-devel/automake: 1.4_p6-r1, 1.5-r1, 1.6.3-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.2-r00.1, 1.11.1 sys-devel/binutils: 2.20.51.0.8 sys-devel/gcc: 4.2.4-r01.2, 4.4.3 sys-devel/gcc-config: 1.4.1-r00.2 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.33 ACCEPT_KEYWORDS="~x86-linux" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -pipe -march=nocona" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/config" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo" CXXFLAGS="-O2 -pipe -march=nocona" DISTDIR="/home/benda/local/usr/portage/distfiles" FEATURES="assume-digests collision-protect distlocks fixpackages news parallel-fetch preserve-libs protect-owned sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" LDFLAGS="-Wl,-O1" MAKEOPTS="-j8" PKGDIR="/home/benda/local/usr/portage/packages" PORTAGE_CONFIGROOT="/home/benda/local/" 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/benda/local/var/tmp" PORTDIR="/home/benda/local/usr/portage" PORTDIR_OVERLAY="/home/benda/local/usr/local/portage/tauon" SYNC="rsync://rsync.prefix.freens.org/gentoo-portage-prefix" USE="X audio berkdb bzip2 cli cracklib crypt cxx dri fortran gdbm iconv ipv6 modules mudflap ncurses nls nptl nptlonly openmp pcre perl pppd prefix python qt3support readline reflection session spl ssl sysfs tcpd unicode video x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
(In reply to comment #5) > Created an attachment (id=232533) [details] > gcc-4.4.3-r2 build failure: cannot find mpfr.h in 2nd stage > I don't see --with-mpfr= or --with-gmp= in your configure call there. Is gcc in your overlay?
(In reply to comment #7) > (In reply to comment #5) > > Created an attachment (id=232533) [details] [details] > > gcc-4.4.3-r2 build failure: cannot find mpfr.h in 2nd stage > > > > I don't see --with-mpfr= or --with-gmp= in your configure call there. Is gcc in > your overlay? > I don't have gcc in my overlay, and I have just done emerge --sync. and I can confirm $ grep mpfr gcc-4.4.3-r2.ebuild >=dev-libs/mpfr-2.3.2 EXTRA_ECONF="${EXTRA_ECONF} --with-mpfr=${EPREFIX}/usr --with-gmp=${EPREFIX}/usr" Why this does not apply to my system? Somehow portage ignores EXTRA_ECONF?
(In reply to comment #7) > (In reply to comment #5) > > Created an attachment (id=232533) [details] [details] > > gcc-4.4.3-r2 build failure: cannot find mpfr.h in 2nd stage > > > > I don't see --with-mpfr= or --with-gmp= in your configure call there. Is gcc in > your overlay? > I guess the problem is in the following in the ebuild: if ${CTARGET}:" ${USE} " already matches some above *:*" prefix "*), it would be ignored? I tried to move EXTRA_ECONF="${EXTRA_ECONF} --with-mpfr=${EPREFIX}/usr --with-gmp=${EPREFIX}/usr" out of case statement and it works. 154 src_compile() { 155 case ${CTARGET}:" ${USE} " in 156 *-mint*) 157 EXTRA_ECONF="${EXTRA_ECONF} --enable-multilib" 158 ;; 159 *-solaris*) 162 ;; 163 *-aix*) 168 ;; 169 *-interix*) 183 ;; 184 i[34567]86-*-linux*:*" prefix "*) 196 ;; 197 *:*" prefix "*) 198 # Bug 320487, generic Gentoo Prefix fix. 199 EXTRA_ECONF="${EXTRA_ECONF} --with-mpfr=${EPREFIX}/usr --with-gmp=${EPREFIX}/usr" 200 ;; 201 esac 208 }
Ahh. Nice find. I was testing on x86_64 linux.
Moved outside the case statement so it is applied everywhere. Thanks. http://overlays.gentoo.org/proj/alt/changeset/58097
ugh. what a mess this became. =/ Just now I completely backed out my mpfr/gmp changes that I made because of this bug. The real problem was our broken eclass, which I fixed here: http://overlays.gentoo.org/proj/alt/changeset/58103 That broken eclass makes it so that the search path starts at the system dir and *then* the EPREFIX offset dirs. What does this mean? This means that you will have to rebuild gcc-4.4.3-r2 with a working gcc. Meaning, you can't rebuild it with 4.4.3-r2 because that is broken. Use gcc-config to set your gcc to a different one (I hope you didn't clean all the old ones) and then remerge gcc-4.4.3-r2. I will follow this up on the gentoo-alt ML if I see a number of issues in irc, otherwise not.
*** Bug 330831 has been marked as a duplicate of this bug. ***
(In reply to comment #12) > ugh. what a mess this became. =/ > That broken eclass makes it so that the search path starts at the system dir > and *then* the EPREFIX offset dirs. What does this mean? This means that you > will have to rebuild gcc-4.4.3-r2 with a working gcc. Meaning, you can't > rebuild it with 4.4.3-r2 because that is broken. Use gcc-config to set your gcc > to a different one (I hope you didn't clean all the old ones) and then remerge > gcc-4.4.3-r2. Jeremy, can you provide some tips (basic outline is fine) on what I should do if I've deleted the old compilers from this '03 Gentoo box and I'm stuck with this issue? I discovered this trying to build a new kernel and I arrived here from bug #330831.
(In reply to comment #14) > (In reply to comment #12) > > ugh. what a mess this became. =/ > > > That broken eclass makes it so that the search path starts at the system dir > > and *then* the EPREFIX offset dirs. What does this mean? This means that you > > will have to rebuild gcc-4.4.3-r2 with a working gcc. Meaning, you can't > > rebuild it with 4.4.3-r2 because that is broken. Use gcc-config to set your gcc > > to a different one (I hope you didn't clean all the old ones) and then remerge > > gcc-4.4.3-r2. > > > Jeremy, can you provide some tips (basic outline is fine) on what I should do > if I've deleted the old compilers from this '03 Gentoo box and I'm stuck with > this issue? > > I discovered this trying to build a new kernel and I arrived here from bug > #330831. Bill, I don't know. This bug was long solved for Gentoo Prefix. It doesn't apply to Gentoo Linux. I suggest the forums or #gentoo on freenode for support.