# [Solved]CPU you selected does not support x86-64

## jordanwb

When trying to compile version 2.6.34-rc5 I get this error:

 *Quote:*   

> cc1: error: CPU you selected does not support x86-64 instruction set

 

I'm compiling the kernel for a 64 bit Athlon processor on a 64bit Core 2 Quad. I'm running a 64 bit OS and the CFLAG is set to 64 bit.

Here's my .config file: http://pastebin.org/215486

emerge --info

```
Portage 2.1.8.3 (default/linux/amd64/10.0/desktop/gnome, gcc-4.4.3, glibc-2.10.1-r1, 2.6.32-22-generic x86_64)

=================================================================

System uname: Linux-2.6.32-22-generic-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q8300_@_2.50GHz-with-gentoo-2.0.1

Timestamp of tree: Sat, 08 May 2010 19:30:01 +0000

app-shells/bash:     4.0_p37

dev-lang/python:     2.6.4-r1

dev-util/cmake:      2.6.4-r3

sys-apps/baselayout: 2.0.1

sys-apps/openrc:     0.6.0

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.4.3-r2

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6b

virtual/os-headers:  2.6.30-r1

ACCEPT_KEYWORDS="amd64"

ACCEPT_LICENSE="* -@EULA"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=k8 -O2 -pipe"

CHOST="x86_64-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/gentoo-release /etc/sandbox.d /etc/terminfo"

CXXFLAGS="-march=k8 -O2 -pipe"

DISTDIR="/usr/portage/distfiles"

FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"

GENTOO_MIRRORS="http://gentoo.mirrors.tera-byte.com/ http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ "

LANG="en_US.UTF-8"

LDFLAGS="-Wl,-O1"

MAKEOPTS="-j6"

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.gentoo.org/gentoo-portage"

USE="X a52 aac acl acpi alsa amd64 berkdb branding bzip2 cairo cdr cli consolekit cracklib crypt css cups curl cxx dbus device-mapper dri dts dvd dvdr eds emboss encode evo exif extras firefox flac fortran gdbm gdu gif glib gnome gnome-keyring gpm gstreamer gtk iconv ipv6 jpeg lcms libnotify mad mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib nautilus ncurses nls nptl nptlonly ogg opengl openmp pam pango pcre pdf perl png policykit ppds pppd python qt3support qt4 readline reflection sdl session spell spl sqlite sse sse2 ssl startup-notification svg sysfs tcpd threads tiff truetype unicode usb utils vorbis x264 xcb xml xorg xulrunner xv 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 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="radeon" 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, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
```

Last edited by jordanwb on Mon May 10, 2010 6:16 pm; edited 1 time in total

----------

## Hu

How did you create this .config?  Your immediate problem seems to be CONFIG_MK8=y, but I see lots of other things in here that I find odd.No swap on a laptop.SLUB debugging.MPParse enabled, but SMP disabled.Support for 32 UARTs on a laptop.

----------

## jordanwb

 *Hu wrote:*   

> How did you create this .config?

 

The same way I've made a .config the last 20 times: make menuconfig

 *Hu wrote:*   

> Your immediate problem seems to be CONFIG_MK8=y

 

Ok.   :Confused: 

 *Hu wrote:*   

> No swap on a laptop.

 

I've never used hibernation

 *Hu wrote:*   

> SLUB debugging.

 

I think I understand why I'd want that turned off.

 *Hu wrote:*   

> MPParse enabled, but SMP disabled.

 

Processor is single core. I think I have an idea what MPParse is

 *Hu wrote:*   

> Support for 32 UARTs on a laptop.

 

Ok.   :Confused: Last edited by jordanwb on Mon May 10, 2010 12:15 pm; edited 1 time in total

----------

## DaggyStyle

your CXXFLAGS are wrong. 

change them to core2 and retry.

not sure it will work thought but worth trying it.

----------

## jordanwb

But my laptop's processor is a Athlon64 single core processor.

I found SLUB debugging and disabled it

I think I found the bit about UART's. My laptop doesn't have any actual serial ports, however would 4 be safe?

I tried to recompile the kernel and this was the few lines before "CPU you have selected..."

```
CC arch/x86/kernel/acpi/boot.o

CC arch/x86/kernel/acpi/sleep.o

LDS arch/x86/kernel/acpi/realmode/wakeup.lds

AS arch/x86/kernel/acpi/realmode/wakeup.o

cc1: error CPU you selected does not support x86-64 instruction set

cc1: error CPU you selected does not support x86-64 instruction set

cc1: warning: -mregparm is ignored in 64-bit mode

make[4]: *** [arch/x86/kernel/acpi/realmode/wakeup.o] Error 1

make[3]: *** [arch/x86/kernel/acpi/realmode/wakeup.bin] Error 2

make[2]: *** [arch/x86/kernel/acpi] Error 2

make[1]: *** [arch/x86/kernel] Error 2

make: *** [arch/x86] Error 2
```

----------

## jordanwb

I tried gentoo-sources-2.6.33-r2 and it fails to build as well. Maybe gcc is hosed. That was one of the packages that I upgraded yesterday.

----------

## DaggyStyle

whats the output of gcc-config -l?

----------

## jordanwb

```
JORDAN-LAPTOP ~ # gcc-config -l

 [1] x86_64-pc-linux-gnu-4.4.3 *

JORDAN-LAPTOP ~ # 
```

----------

## Ant P.

You might be better off just using the "Generic x86-64" CPU setting. K8 is the oldest 64-bit x86 anyway so there won't be much difference.

----------

## jordanwb

Tried generic x86-64 and compilation failed too.

On the Gentoo IRC I was directed to this: https://bugs.gentoo.org/309691

Installing gcc 4.3.4 lets me compile the kernel. Let's see if this fixes my hwclock and sound card issues.

----------

