Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 420341 - sys-devel/gcc-4.6.3 - conftest.c:1:0: error: CPU you selected does not support x86-64 instruction set
Summary: sys-devel/gcc-4.6.3 - conftest.c:1:0: error: CPU you selected does not suppor...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High blocker (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-09 00:47 UTC by Charlie Page
Modified: 2012-06-09 20:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
config.log for gcc 4.6.3 (config.log,12.93 KB, text/plain)
2012-06-09 00:47 UTC, Charlie Page
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Page 2012-06-09 00:47:38 UTC
Created attachment 314743 [details]
config.log for gcc 4.6.3

This has happened for gcc 4.5 and 4.6 on a KVM virtual machine.  On the base machine it works.  I believe the setups are the same though, as the VMs are more or less clones of the base machine's initial config.
The config file is attached.


checking for x86_64-pc-linux-gnu-gcc... /var/tmp/portage/sys-devel/gcc-4.6.3/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.6.3/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
checking for suffix of object files... configure: error: in `/var/tmp/portage/sys-devel/gcc-4.6.3/work/build/x86_64-pc-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[2]: *** [configure-stage1-target-libgcc] Error 1
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.6.3/work/build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.6.3/work/build'
make: *** [bootstrap-lean] Error 2
emake failed
 * ERROR: sys-devel/gcc-4.6.3 failed (compile phase):
 *   emake failed with bootstrap-lean
 *
 * Call stack:
 *     ebuild.sh, line   85:  Called src_compile
 *   environment, line 3985:  Called toolchain_src_compile
 *   environment, line 4616:  Called gcc_do_make
 *   environment, line 2300:  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}";
 *
 * If you need support, post the output of 'emerge --info =sys-devel/gcc-4.6.3',
 * the complete build log and the output of 'emerge -pqv =sys-devel/gcc-4.6.3'.
 *
 * Please include /var/tmp/portage/sys-devel/gcc-4.6.3/work/build/gcc-build-logs.tar.bz2 in your bug report
 *
 * The complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.6.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.6.3/temp/environment'.
 * S: '/var/tmp/portage/sys-devel/gcc-4.6.3/work/build'

>>> Failed to emerge sys-devel/gcc-4.6.3, Log file:

>>>  '/var/tmp/portage/sys-devel/gcc-4.6.3/temp/build.log'

 * Messages for package sys-devel/gcc-4.6.3:

 *
 * LTO support is still experimental and unstable.
 * Any bugs resulting from the use of LTO will not be fixed.
 *
 * ERROR: sys-devel/gcc-4.6.3 failed (compile phase):
 *   emake failed with bootstrap-lean
 *
 * Call stack:
 *     ebuild.sh, line   85:  Called src_compile
 *   environment, line 3985:  Called toolchain_src_compile
 *   environment, line 4616:  Called gcc_do_make
 *   environment, line 2300:  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}";
 *
 * If you need support, post the output of 'emerge --info =sys-devel/gcc-4.6.3',
 * the complete build log and the output of 'emerge -pqv =sys-devel/gcc-4.6.3'.
 *
 * Please include /var/tmp/portage/sys-devel/gcc-4.6.3/work/build/gcc-build-logs.tar.bz2 in your bug report
 *
 * The complete build log is located at '/var/tmp/portage/sys-devel/gcc-4.6.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-4.6.3/temp/environment'.
 * S: '/var/tmp/portage/sys-devel/gcc-4.6.3/work/build'
Comment 1 Rafał Mużyło 2012-06-09 05:43:07 UTC
conftest.c:1:0: error: CPU you selected does not support x86-64 instruction set

So, technically INVALID, check your KVM settings.
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2012-06-09 14:02:59 UTC
Please post your `emerge --info' output in a comment.
Comment 3 Charlie Page 2012-06-09 15:03:53 UTC
My VM is running gcc-4.4.6-r1 which compiled all the packages(including itself) on the system successfully in/for a 64 bit environment.  Additionally `qemu-system-x86_64 -cpu ?dump` for the CPU in use:
x86         [qemu64]  QEMU Virtual CPU version 1.0
  family 6 model 2 stepping 3 level 4 xlevel 0x8000000a vendor "AuthenticAMD"
  feature_edx 078bfbfd (sse2 sse fxsr mmx clflush pse36 pat cmov mca pge mtrr sep apic cx8 mce pae msr tsc pse de fpu)
  feature_ecx 00802001 (popcnt cx16 pni|sse3)
  extfeature_edx 2191abfd (lm fxsr mmx nx pat cmov pge syscall apic cx8 mce pae msr tsc pse de fpu)
  extfeature_ecx 00000065 (sse4a abm svm lahf_lm)

If I understand correctly the lm flag means it supports 64 bits (so the compiler should see that?).

Here is emerge info:
Portage 2.1.10.49 (default/linux/amd64/10.0, gcc-4.4.6, glibc-2.14.1-r3, 3.2.12-gentoo x86_64)
=================================================================
System uname: Linux-3.2.12-gentoo-x86_64-QEMU_Virtual_CPU_version_1.0-with-gentoo-2.0.3
Timestamp of tree: Sat, 09 Jun 2012 04:35:01 +0000
ccache version 3.1.6 [enabled]
app-shells/bash:          4.2_p20
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r3, 3.2.2
dev-util/ccache:          3.1.6
dev-util/cmake:           2.8.6-r4
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.9.8.4
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.4.6-r1
sys-devel/gcc-config:     1.5-r2
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 3.1 (virtual/os-headers)
sys-libs/glibc:           2.14.1-r3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/init.d /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch xattr"
FFLAGS=""
GENTOO_MIRRORS="ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://mirror.mcs.anl.gov/pub/gentoo/ ftp://mirror.iawnet.sandia.gov/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apache2 apng automount bash-completion berkdb bzip2 caps chroot cli colordiff consolekit cracklib crypt cups curl cxx dahdi dbus declarative device-mapper dnotify dri exiscan-acl expat extras fam firefox fortran gdbm gpm gtk gudev hpn hwdb iconv idn inotify iproute2 jabber java javascript jbig jpeg jpeg2k kde kvm ldap logrotate lua lzo mjpeg mmx mng modplug modules mp3 mp4 mpeg mpeg2 mudflap multilib mysql nas ncurses network newt nls nptl nsplugin ogg opengl openmp pam pcre pda pdf png policykit posix postgres pppd python qt3support qt4 readline samba sdl server session sftp sndfile speex spell sql sse sse2 ssl static-libs svg syslog tcpd tiff unicode utempter utils vde vnc vorbis wav webkit winbind xattr xml xorg xprint xvid 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 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 cgi cgid 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" QEMU_SOFTMMU_TARGETS="x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="dummy fbdev radeon vesa vga" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 4 Rafał Mużyło 2012-06-09 16:01:43 UTC
My guess is that combining '-march=native' with KVM might be more than a little tricky. Compare that cpuinfo with specs that gcc produces with '-march=native' while run in KVM.
Comment 5 Charlie Page 2012-06-09 20:32:30 UTC
Thank, you are right.  GCC no longer hands -march native with a KVM cpu.