gcc 3.4.3 fails to compile when it runs a configure script about half way through the build, "configure: error: cannot run C compiled programs." The failed configure script resides in /var/tmp/portage/gcc-3.4.3-r1/work/build/x86_64-pc-linux-gnu/libstdc++-v3 Reproducible: Always Steps to Reproduce: 1. emerge gcc Actual Results: Configure error. Expected Results: Successful compilation. Last several lines of output compile output: Running configure in multilib subdirs 32 pwd: /var/tmp/portage/gcc-3.4.3-r1/work/build/x86_64-pc-linux-gnu/libstdc++-v3 Running configure in multilib subdir 32 pwd: /var/tmp/portage/gcc-3.4.3-r1/work/build/x86_64-pc-linux-gnu mkdir 32 configure: creating cache ./config.cache checking build system type... x86_64-pc-linux-gnu checking host system type... x86_64-pc-linux-gnu checking target system type... x86_64-pc-linux-gnu checking for a BSD-compatible install... /bin/install -c checking whether build environment is sane... yes checking for gawk... gawk checking whether make sets $(MAKE)... yes checking for x86_64-pc-linux-gnu-gcc... /var/tmp/portage/gcc-3.4.3-r1/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.3-r1/work/build/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -m32 checking for C compiler default output file name... a.out checking whether the C compiler works... configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details. make: *** [configure-target-libstdc++-v3] Error 1 Pertinent lines of config.log: configure:94710: $? = 0 configure:94746: /var/tmp/portage/gcc-3.4.3-r1/work/build/gcc/xgcc -B/var/tmp/p ortage/gcc-3.4.3-r1/work/build/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_6 4-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_ 64-pc-linux-gnu/sys-include -c -O2 -O2 -pipe -O2 -O2 -pipe conftest.c >&5 conftest.c: In function `main': conftest.c:208: error: `RLIMIT_VMEM' undeclared (first use in this function) conftest.c:208: error: (Each undeclared identifier is reported only once conftest.c:208: error: for each function it appears in.) configure:94752: $? = 1 configure: failed program was: emerge information: Portage 2.0.51-r8 (default-linux/amd64/2004.3, gcc-3.3.5, glibc-2.3.4.20041102-r0, 2.6.9-gentoo-r9 x86_64) ================================================================= System uname: 2.6.9-gentoo-r9 x86_64 AMD Athlon(tm) 64 FX-51 Processor Gentoo Base System version 1.6.7 Python: dev-lang/python-2.3.4 [2.3.4 (#1, Oct 4 2004, 22:58:39)] dev-lang/python: 2.3.4 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.5, 1.8.5-r2, 1.9.3, 1.4_p6, 1.6.3, 1.7.9 sys-devel/binutils: 2.15.92.0.2-r2 sys-devel/libtool: 1.5.10-r1 virtual/os-headers: 2.6.8.1-r1 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-O2 -pipe -fomit-frame-pointer -funroll-loops -msse2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -pipe -fomit-frame-pointer -funroll-loops -msse2" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox" GENTOO_MIRRORS="ftp:///ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ http://ftp-mirror.internap.com/pub/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acpi alsa amd64 berkdb bitmap-fonts cdr crypt cups dvd esd f77 flac fortran gdbm gif gnome gpm gstreamer gtk2 hal imagemagick imlib ipv6 java jp2 jpeg junit lzw lzw-tiff mad mikmod motif mozilla moznoirc multilib ncurses nls oggvorbis opengl pam perl png python readline samba sdl slang ssl svg tcpd tiff truetype usb userlocales xine xml2 xmms xpm xrandr xv zlib"
I've got exactly the same problem: checking whether the C compiler works... configure: error: cannot run C compiled programs. If you meant to cross compile, use `--host'. See `config.log' for more details. make: *** [configure-target-libstdc++-v3] Error 1
post the whole config.log from the libstdc++ directory please
Created attachment 46600 [details] config.log for libstdc++. As requested.
Try looking at bug #75236. It seems to be the same problem and it suggests a solution, worked for me.
Actually this seems to be a problem with the sandbox and gcc. Check out bug #72379 for more info.
This issue did, in fact, get resolved by disabling sandboxing. This bug should not be closed until sandboxing is properly handled on amd64 then. Perhaps it should be marked a duplicate though. *** This bug has been marked as a duplicate of 72379 ***