Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 582318

Summary: genkernel: Compile failure with error: CPU you selected does not support x86-64 instruction set
Product: Gentoo Hosted Projects Reporter: John Stein <aksornsri1>
Component: genkernelAssignee: Gentoo Genkernel Maintainers <genkernel>
Status: RESOLVED FIXED    
Severity: normal CC: scott
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Log of error produced while attempting kernel compile

Description John Stein 2016-05-07 03:13:22 UTC
Created attachment 433474 [details]
Log of error produced while attempting kernel compile

Gentoo Linux Genkernel; Version 3.4.52.3
Linux Kernel 4.4.6-gentoo for x86
Compiled using "# genkernel all" while having used: "# chroot /mnt/gentoo /bin/bash; source /etc/profile" earlier.


error: CPU you selected does not support x86-64 instruction set
ERROR: Failed to compile the "prepare" target...

Compiled on 64bit Intel CPU Q6700 *(2007 release)
Used a stage3-i686-20160503.tar.bz2 tarball.

I chose x86 code base because I want to make LiveCD that will work on both x86 and AMD64 machines.
I tried compiling with recommended 'CFLAGS="-O2 -march=native -pipe"'
and also tried 'CFLAGS="-O2 -march=i386 -pipe"'
Received the same error messages with both.

/var/log/genkernel.log is attached.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-05-08 23:36:37 UTC
Can you you please inject these into the genkernel x86/generated-config file and tell me if they solve the problem:

CONFIG_64BIT=n
CONFIG_X86_64=n
CONFIG_X86=y

Auto-detection is working against you here.
Comment 2 John Stein 2016-05-12 15:50:56 UTC
CONFIG_64BIT=n
 CONFIG_X86_64=n
 CONFIG_X86=y
Yes, this solved the problem. Does the full, detailed kernel build solve this problem too?
Thanks, for your help.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-05-16 06:21:33 UTC
[master 8a78287] arch/x86/arch-config: bug #582318, explicitly set non-64bit so cross-compile works
 1 file changed, 3 insertions(+)
Comment 4 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-11-14 22:15:55 UTC
*** Bug 595432 has been marked as a duplicate of this bug. ***