When I try to emerge sys-devel/gcc fails. I've tried with these diferent settings in /etc/make.conf CFLAGS="-march=athlon64 -O2 -pipe -msse3" CFLAGS="-O2 -pipe" CFLAGS="" The machine has 2GB RAM and more than 200GB disk free. And always the same error Reproducible: Always Steps to Reproduce: 1. emerge gcc .... .... checking for sys/resource.h... yes checking for RLIMIT_DATA... yes checking for RLIMIT_RSS... yes checking for RLIMIT_VMEM... no checking for RLIMIT_AS... yes checking for RLIMIT_FSIZE... yes checking for testsuite resource limits support... yes checking for setenv declaration... yes checking for setenv... yes updating cache ./config.cache checking for gxx-include-dir... /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4 checking for --enable-version-specific-runtime-libs... no checking for install location... /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/include/g++-v4 configure: creating ./config.status config.status: creating Makefile config.status: creating include/Makefile config.status: creating libmath/Makefile config.status: creating libsupc++/Makefile config.status: creating src/Makefile config.status: creating po/Makefile config.status: creating testsuite/Makefile config.status: creating scripts/testsuite_flags config.status: creating config.h config.status: executing default-1 commands Adding multilib support to Makefile in /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/libstdc++-v3 multidirs=32 with_multisubdir= Running configure in multilib subdirs 32 pwd: /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/x86_64-pc-linux-gnu/libstdc++-v3 Running configure in multilib subdir 32 pwd: /var/tmp/portage/sys-devel/gcc-4.1.2/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... /usr/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/sys-devel/gcc-4.1.2/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.1.2/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[2]: *** [configure-target-libstdc++-v3] Error 1 make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.1.2/work/build' make[1]: *** [all] Error 2 make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.1.2/work/build' make: *** [profiledbootstrap] Error 2 * * ERROR: sys-devel/gcc-4.1.2 failed. * Call stack: * ebuild.sh, line 49: Called src_compile * environment, line 4592: Called toolchain_src_compile * environment, line 5063: Called gcc_src_compile * environment, line 2915: Called gcc_do_make * environment, line 2745: Called die * The specific snippet of code: * emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}"; * The die message: * emake failed with profiledbootstrap * * If you need support, post the topmost build error, and the call stack if relevant. * A complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.1.2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.1.2/temp/environment'. * Expected Results: gcc should compile. emerge --info Portage 2.1.4.4 (default-linux/amd64/2007.0, gcc-4.1.1, glibc-2.5-r0, 2.6.24-gentoo-r8 x86_64) ================================================================= System uname: 2.6.24-gentoo-r8 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ Timestamp of tree: Fri, 23 May 2008 23:00:01 +0000 app-shells/bash: 3.2_p33 dev-lang/python: 2.4.4-r9 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.9 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.61-r1 sys-devel/automake: 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.23-r3 ACCEPT_KEYWORDS="amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O2 -pipe -msse3" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/terminfo" CXXFLAGS="-march=athlon64 -O2 -pipe -msse3" DISTDIR="/usr/portage/distfiles" FEATURES="distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" 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="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://192.168.0.25/gentoo-portage" USE="acl amd64 apache2 berkdb bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv ipv6 isdnlog midi mmx mudflap ncurses nls nptl nptlonly openmp pam pcre perl php postgres pppd python readline reflection session spl sse sse2 ssl subversion tcpd unicode xorg 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 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="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 mach64 mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
*** Bug 223421 has been marked as a duplicate of this bug. ***
you might want to run gcc-config, then env-update & source /etc/profile.
Please attach the config.log too.
Somebody please attach a config.log and reopen this bug. :)
Created attachment 154289 [details] /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/config.log
Attached config.log from work/build directory
I've tried gcc-config, env-update & source /etc/profile host ~ # gcc-config -l [1] x86_64-pc-linux-gnu-4.1.1 * host ~ # gcc-config x86_64-pc-linux-gnu-4.1.1 * Switching native-compiler to x86_64-pc-linux-gnu-4.1.1 ... host ~ # env-update >>> Regenerating /etc/ld.so.cache... host ~ # source /etc/profile host ~ # emerge -p gcc These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild U ] sys-devel/gcc-4.1.2 [4.1.1-r3] USE="mudflap* -d% -libffi%" host ~ # emerge gcc And fails another time.
(In reply to comment #6) > Attached config.log from work/build directory Are you sure you posted all of it?
Created attachment 154295 [details] /var/tmp/portage/sys-devel/gcc-4.1.2/temp/build.log /var/tmp/portage/sys-devel/gcc-4.1.2/temp/build.log
Created attachment 154297 [details] /var/tmp/portage/sys-devel/gcc-4.1.2/temp/environment /var/tmp/portage/sys-devel/gcc-4.1.2/temp/environment
Yes Jeroen, the file config.log is correct I've attached the build.log and the environment files located in /var/tmp/portage/sys-devel/gcc-4.1.2/temp/
Please post /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/x86_64-pc-linux-gnu/config.log as that seems to be the one that failed.
/var/tmp/portage/sys-devel/gcc-4.1.2/work/build/x86_64-pc-linux-gnu/config.log doesn't exist. host x86_64-pc-linux-gnu # pwd /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/x86_64-pc-linux-gnu host x86_64-pc-linux-gnu # find . | grep config\.log ./32/libstdc++-v3/config.log ./libstdc++-v3/config.log These are the existing "config.log" file list. host x86_64-pc-linux-gnu # find /var/tmp/portage/sys-devel/gcc-4.1.2/work/ | grep config\.log /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/libiberty/config.log /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/config.log /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/x86_64-pc-linux-gnu/libstdc++-v3/config.log /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/build-x86_64-pc-linux-gnu/libiberty/config.log /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/build-x86_64-pc-linux-gnu/fixincludes/config.log /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/libcpp/config.log /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/gcc/config.log /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/intl/config.log /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/config.log /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/fixincludes/config.log
The complete /var/tmp/portage/sys-devel/gcc-4.1.2/ tree with all the files is available in http://www.domotiker.com/gcc-bug/emerge_gcc-4.1.2.tar.bz2 (big file 110M)
i'm guessing your multilib is broken on your system ... the error in question is coming when trying to build 32bit code and executing it you can test on your system by doing: echo 'int main(){puts("HI");}' > test.c gcc test.c -m32 ./a.out the relevant snippet from build/x86_64-pc-linux-gnu/32/libstdc++-v3/config.log configure:2443: checking for C compiler default output file name configure:2446: /var/tmp/portage/sys-devel/gcc-4.1.2/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.1.2/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 -O2 -march=athlon64 -O2 -pipe conftest.c >&5 configure:2449: $? = 0 configure:2495: result: a.out configure:2500: checking whether the C compiler works configure:2506: ./a.out /var/tmp/portage/sys-devel/gcc-4.1.2/work/gcc-4.1.2/libstdc++-v3/configure: line 2507: ./a.out: cannot execute binary file configure:2509: $? = 126 configure:2518: error: cannot run C compiled programs. If you meant to cross compile, use `--host'.