Hello LinuxQuestions.org community,
I'm attempting to build modern-ish kernels under 32bit Slackware 11.
I've compiled new tool chain currently gcc-4.6.4, perl-5.16.3, openssl-3.0.16, wget-2.15.0, binutils-2.25.1, flex-2.5.39
(rest of the packages are old from the Slackware 11)
I've also updated the LILO to 24.2
and the latest kernel I've managed to build was 4.19.325 in which I just had to copy some headers to correct locations and than it pretty much just built.
I'm running Slackware in VMware Workstation 17 Pro, under a Windows 10 host.
I'm tackling Linux kernel 5.4.293 next, and I hit a snag
here is the error message (make -j6):
Code:
HOSTCC arch/x86/tools/relocs_64.o
In file included from arch/x86/tools/relocs_64.c:18:0:
arch/x86/tools/relocs.c: In function 'rel_type':
arch/x86/tools/relocs.c:201:3: error: 'R_X86_64_PC64' undeclared (first use in this function)
arch/x86/tools/relocs.c:201:3: note: each undeclared identifier is reported only once for each function it appears in
arch/x86/tools/relocs.c:201:3: error: array index in initializer not of integer type
arch/x86/tools/relocs.c:201:3: error: (near initialization for 'type_name')
arch/x86/tools/relocs.c: In function 'do_reloc64':
arch/x86/tools/relocs.c:819:7: error: 'R_X86_64_PC64' undeclared (first use in this function)
make[2]: *** [arch/x86/tools/relocs_64.o] Error 1
make[1]: *** [archscripts] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [sub-make] Error 2
here is my .config
https://pastebin.com/hnTEeNnr
I think it's trying to build something 64bit and failing but I'm not really sure.
I originally got a warning `You are building kernel with a non-retpoline compiler. Please update your compiler`
I got around that by disabling "Avoid speculation indirect branches in kernel"
So no specre or meltdown patches if I understand that correctly? But I don't mind.
I also tried looking up relocs_64 in the arch/x86/tools/Makefile and removing that but that only got me a different error
arch/x86/tools/Makefile (near the bottom):
Code:
HOST_EXTRACFLAGS += -I$(srctree)/tools/include
hostprogs-y += relocs
relocs-objs := relocs_32.o relocs_64.o relocs_common.o
PHONY += relocs
relocs: $(obj)/relocs
I removed the relocs_64.o and got this (make -j6):
Code:
HOSTCC scripts/basic/fixdep
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
arch/x86/tools/relocs_common.o: In function `main':
relocs_common.c:(.text.startup+0x1db): undefined reference to `process_64'
collect2: ld returned 1 exit status
make[2]: *** [arch/x86/tools/relocs] Error 1
make[1]: *** [archscripts] Error 2
make: *** [sub-make] Error 2
I'm not really skilled at building kernels I've built a few kernel-next's on a modern distro's like Fedora and Arch and my Slackware 11 currently has:
2.4.33.3, 2.6.16.62, 2.6.27.62, 3.0.101, 4.1.52, 4.14.336, 4.19.325
If I said something incorrectly I'm sorry. If you have questions or want me to runs some commands. Please let me know!