4.4.0-beta003 Can't build a kernel [Solved]

You can report problems, make suggestions, about the new BETA versions in this forum. For stuff related to final releases, please post a message in other forums
Posts: 85
Joined: 22 Jun 2012, 02:24

4.4.0-beta003 Can't build a kernel [Solved]

Postby vanepp » 10 Oct 2014, 04:40

I am unable to build a kernel on either 4.3.1 or 4.4.0-beta003 while booted from the iso. Its possible I'm doing something wrong (or perhaps not doing something right) but the same kernel source builds correctly on a stock (newer kernel though) gentoo system I have, so it seems the source is OK.

boot from stock 4.3.1.iso system

cat /proc/config.gz | gzip -d > /mnt/backup/4.3.1.config to get a valid kernel config file to use.

cd /mnt/custom/sources

wget -r http://kernel.sysresccd.org/sysresccd-4.3.1 -l1 -A xz --no-directories (note the kernel build web page is wrong here it still uses bz2 as the compression method which doesn't work)

tar xfp linux-3.10.tar.xz

ln -s linux-3.10 linux

cd linux

xzcat ../std-sources-3.10-01-stable-3.10.53.patch.xz | patch -p1

xzcat ../std-sources-3.10-02-fc18.patch.xz | patch -p1

xzcat ../std-sources-3.10-03-aufs.patch.xz | patch -p1

xzcat ../std-sources-3.10-04-reiser4.patch.xz | patch -p1

all the patches apply correctly some with offsets and fuzz but no apparent errors

cp /mnt/backup/4.3.1.config .config

cd /mnt/custom/sources

tar -cf /mnt/backup/kernel_base_4_3_1_source.tar linux-3.10 (save a copy of the unbuilt source for testing!)

mount -o bind /mnt/custom/sources /usr/src

cd /usr/src/linux

make menuconfig

general setup -> Initramfs source file(s)

and replace /var/tmp/genkernel/initramfs-3.10.53-std431-amd64.cpio

with blank

then save and exit


[email protected] /usr/src/linux % make menuconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/lxdialog/checklist.o
HOSTCC scripts/kconfig/lxdialog/inputbox.o
HOSTCC scripts/kconfig/lxdialog/menubox.o
HOSTCC scripts/kconfig/lxdialog/textbox.o
HOSTCC scripts/kconfig/lxdialog/util.o
HOSTCC scripts/kconfig/lxdialog/yesno.o
HOSTCC scripts/kconfig/mconf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/mconf
scripts/kconfig/mconf Kconfig
configuration written to .config

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

[email protected] /usr/src/linux % make
HOSTLD scripts/kconfig/conf
scripts/kconfig/conf --silentoldconfig Kconfig
# configuration written to .config
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h
SYSTBL arch/x86/syscalls/../include/generated/asm/syscalls_32.h
SYSHDR arch/x86/syscalls/../include/generated/asm/unistd_32_ia32.h
SYSHDR arch/x86/syscalls/../include/generated/asm/unistd_64_x32.h
SYSTBL arch/x86/syscalls/../include/generated/asm/syscalls_64.h
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
WRAP arch/x86/include/generated/asm/clkdev.h
CHK include/generated/uapi/linux/version.h
UPD include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
CC kernel/bounds.s
kernel/bounds.c:1: error: CPU you selected does not support x86-64 instruction set
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2
[email protected] /usr/src/linux %

The same thing happens on a 4.4.0-beta003 iso system

However on a non iso gentoo system (with the kernel manually configged to be the same as the rescue CD)
it builds correctly:

Linux localhost 3.12.21-gentoo-r1 #1 SMP Fri Jun 27 16:52:15 Local time zone must be set--see zic x86_64 AMD Phenom(tm) 9950 Quad-Core Processor AuthenticAMD GNU/Linux

cd /usr/src
tar -xf /mnt/backup/kernel_base_4_3_1_source.tar
cd linux-3.10
make menuconfig

and replace /var/tmp/genkernel/initramfs-3.10.53-std431-amd64.cpio
with blank
then save and exit

SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_32.h^M
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_64.h^M
SYSHDR arch/x86/syscalls/../include/generated/uapi/asm/unistd_x32.h^M
SYSTBL arch/x86/syscalls/../include/generated/asm/syscalls_32.h^M
SYSHDR arch/x86/syscalls/../include/generated/asm/unistd_32_ia32.h^M
SYSHDR arch/x86/syscalls/../include/generated/asm/unistd_64_x32.h^M
SYSTBL arch/x86/syscalls/../include/generated/asm/syscalls_64.h^M
HOSTCC arch/x86/tools/relocs_32.o^M
HOSTCC arch/x86/tools/relocs_64.o^M
HOSTCC arch/x86/tools/relocs_common.o^M
HOSTLD arch/x86/tools/relocs^M
WRAP arch/x86/include/generated/asm/clkdev.h^M
CHK include/generated/uapi/linux/version.h^M
UPD include/generated/uapi/linux/version.h^M
CHK include/generated/utsrelease.h^M
UPD include/generated/utsrelease.h^M
CC kernel/bounds.s^M
GEN include/generated/bounds.h^M
CC arch/x86/kernel/asm-offsets.s^M
GEN include/generated/asm-offsets.h^M
CALL scripts/checksyscalls.sh^M
IHEX2FW firmware/whiteheat.fw^M
IHEX2FW firmware/keyspan_pda/keyspan_pda.fw^M
IHEX2FW firmware/keyspan_pda/xircom_pgs.fw^M
IHEX firmware/yam/1200.bin^M
IHEX firmware/yam/9600.bin^M
[email protected]:/usr/src/linux-3.10#

Am I doing something wrong (and if so what?) or is the tool chain on the CD broken as it appears?

Peter Van Epp

Posts: 85
Joined: 22 Jun 2012, 02:24

Re: 4.4.0-beta003 Can't build a kernel [Solved]

Postby vanepp » 05 Nov 2014, 20:01

Solved, operator error again. I was missing the step

export ARCH=i386
sed -i -e '1i\ARCH=i386' Makefile

which is apparently already present in a stock gentoo system and thus the rescue CD build didn't know the architecture and failed
(with an unhelpful error message).

Return to “Beta versions (report a bug found in a beta)”

Who is online

Users browsing this forum: No registered users and 2 guests