gnat is failing to build with the following error: checking whether the C compiler (/var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work/usr/bin/gnatgcc -O2 -march=core2 -pipe -L/var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work/usr/lib/gnatgcc/i686-pc-linux-gnu/4.1) works... no configure: error: installation or configuration problem: C compiler cannot create executables. Reproducible: Always Steps to Reproduce: 1. emerge dev-lang/gnat-gcc Actual Results: fails to emerge Expected Results: emerge cleanly ==== emerge --info =dev-lang/gnat-gcc-4.2.3 ==== Portage 2.1.7.16 (default/linux/x86/10.0/desktop, gcc-4.3.4, glibc-2.10.1-r1, 2.6.31-gentoo-r6 i686) ================================================================= System Settings ================================================================= System uname: Linux-2.6.31-gentoo-r6-i686-Intel-R-_Core-TM-2_Duo_CPU_T7500_@_2.20GHz-with-gentoo-1.12.13 Timestamp of tree: Wed, 24 Feb 2010 11:45:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 4.0_p35 dev-lang/python: 2.6.4 dev-util/ccache: 2.4-r7 dev-util/cmake: 2.6.4-r3 sys-apps/baselayout: 1.12.13 sys-apps/sandbox: 1.6-r2 sys-devel/autoconf: 2.13, 2.63-r1 sys-devel/automake: 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.18-r3 sys-devel/gcc: 4.3.4 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.6b virtual/os-headers: 2.6.30-r1 ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=core2 -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/X11/xkb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -march=core2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="assume-digests ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch" GENTOO_MIRRORS="ftp://trumpetti.atm.tut.fi/gentoo/ http://trumpetti.atm.tut.fi/gentoo/ " LANG="en_US.UTF-8" LDFLAGS="-Wl,-O1" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" 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://rsync.europe.gentoo.org/gentoo-portage" USE="X a52 aac acl acpi alsa berkdb bluetooth branding bzip2 cairo cdr cli consolekit cracklib crypt cups cxx dbus dri dts dvd dvdr eds emboss encode evo extras fam firefox flac fortran gdbm gif gnome gnutls gpg gpm gstreamer gtk hal iconv imap ipv6 jpeg ldap libnotify mad mbox mikmod mng modules mp3 mp4 mpeg mudflap nautilus ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support quicktime readline reflection sasl sdl session smtp spell spl ssl startup-notification svg sysfs tcpd thunar tiff truetype unicode usb vorbis win32codecs x264 x86 xcb xml xorg xulrunner xv xvid 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="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" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY ==== emerge -pqv =dev-lang/gnat-gcc-4.2.3 ==== [ebuild N ] dev-lang/gnat-gcc-4.2.3 USE="nls" ==== build log ==== cat /var/tmp/portage/dev-lang/gnat-gcc-4.2.3/temp/build.log * CPV: dev-lang/gnat-gcc-4.2.3 * REPO: gentoo * USE: elibc_glibc kernel_linux nls userland_GNU x86 >>> Unpacking source... >>> Unpacking gcc-core-4.2.3.tar.bz2 to /var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work >>> Unpacking gcc-ada-4.2.3.tar.bz2 to /var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work >>> Unpacking gnatboot-4.1-i386.tar.bz2 to /var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work * Fallback PaX marking -E * /var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work/usr/bin/gnat1 TYPE PAX FILE ET_EXEC ---xE- /var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work/usr/bin/gnat1 * Replacing obsolete head/tail with POSIX compliant ones * - fixed fixincludes/configure * - fixed gcc/configure * - fixed gnattools/configure * - fixed intl/configure * - fixed libada/configure * - fixed libcpp/configure * - fixed libdecnumber/configure * - fixed libgomp/configure * - fixed libiberty/configure * - fixed libmudflap/configure * - fixed libssp/configure * Running elibtoolize in: gcc-4.2.3 * Applying install-sh-1.5.4.patch ... * Applying ltmain-1.5.patch ... * Applying portage-1.5.10.patch ... * Applying sed-1.5.6.patch ... * Applying test-1.4.0.patch ... * Applying tmp-1.3.5.patch ... * Applying as-needed-1.5.patch ... * Using GNU config files from /usr/share/gnuconfig * Updating config.sub [ ok ] * Updating config.guess [ ok ] * Fixing misc issues in configure files * Updating /var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work/gcc-4.2.3/configure ... [ ok ] >>> Source unpacked in /var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work >>> Compiling source in /var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work/gcc-4.2.3 ... creating cache ./config.cache checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu checking build system type... i686-pc-linux-gnu checking for a BSD compatible install... /usr/bin/install -c checking whether ln works... yes checking whether ln -s works... yes checking for gcc... /var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work/usr/bin/gnatgcc checking whether the C compiler (/var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work/usr/bin/gnatgcc -O2 -march=core2 -pipe -L/var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work/usr/lib/gnatgcc/i686-pc-linux-gnu/4.1) works... no configure: error: installation or configuration problem: C compiler cannot create executables. * ERROR: dev-lang/gnat-gcc-4.2.3 failed: * configure failed * * Call stack: * ebuild.sh, line 54: Called src_compile * environment, line 3937: Called gnatbuild_src_compile 'configure' 'make-tools' 'bootstrap' * environment, line 2804: Called die * The specific snippet of code: * CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" "${S}"/configure --prefix=${PREFIX} --bindir=${BINPATH} --includedir=${INCLUDEPATH} --libdir="${LIBPATH}" --libexecdir="${LIBEXECPATH}" --datadir=${DATAPATH} --mandir=${DATAPATH}/man --infodir=${DATAPATH}/info --program-prefix=gnat --enable-languages="c,ada" --with-gcc --enable-threads=posix --enable-shared --with-system-zlib ${confgcc} || die "configure failed" * * If you need support, post the output of 'emerge --info =dev-lang/gnat-gcc-4.2.3', * the complete build log and the output of 'emerge -pqv =dev-lang/gnat-gcc-4.2.3'. * The complete build log is located at '/var/tmp/portage/dev-lang/gnat-gcc-4.2.3/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-lang/gnat-gcc-4.2.3/temp/environment'. * S: '/var/tmp/portage/dev-lang/gnat-gcc-4.2.3/work/gcc-4.2.3'
Please attach the entire config.log and build log and reopen this bug report.
Created attachment 221097 [details] build.log The same happens with gnat-gcc-4.3.2
Created attachment 221099 [details] config.log also happens with 4.3.2
There you have it :-) sorry for the long delay.
and here's the issue, gnatgcc doesn't understand core2 arch: configure:3197: /var/tmp/portage/dev-lang/gnat-gcc-4.3.2/work/usr/bin/gnatgcc -O2 -march=core2 -pipe -L/var/tmp/portage/dev-lang/gnat-gcc-4.3.2/work/usr/lib/gnatgcc/i686-pc-linux-gnu/4.1 conftest.c >&5 conftest.c:1: error: bad value (core2) for -march= switch conftest.c:1: error: bad value (core2) for -mtune= switch and because of that, it fails when trying to compile anything: configure:3239: error: C compiler cannot create executables
(In reply to comment #5) > and here's the issue, gnatgcc doesn't understand core2 arch: > > configure:3197: /var/tmp/portage/dev-lang/gnat-gcc-4.3.2/work/usr/bin/gnatgcc > -O2 -march=core2 -pipe > -L/var/tmp/portage/dev-lang/gnat-gcc-4.3.2/work/usr/lib/gnatgcc/i686-pc-linux-gnu/4.1 > conftest.c >&5 > conftest.c:1: error: bad value (core2) for -march= switch > conftest.c:1: error: bad value (core2) for -mtune= switch > > and because of that, it fails when trying to compile anything: > > configure:3239: error: C compiler cannot create executables changing core2 to i686 works fine: CFLAGS="-O2 -march=i686 -pipe" emerge dev-lang/gnat-gcc
So you shouldn't use invalid cflags for older compilers.
*** Bug 316917 has been marked as a duplicate of this bug. ***