Page 1 of 2

kernel build errors - help required

Posted: Sun Mar 11, 2018 5:12 pm
by anticapitalista
I have been building antiX kernels using the vanilla kernel.org tarballs and all has been ok for a while, until now.

I can build 4.15.9 kernel without issue on stretch
I cannot build 4.9.87 (and previous 4.9.86) on stretch, but 4.9.83 built ok.

Here is the error message I get

Code: Select all

LD      arch/x86/boot/compressed/vmlinux
ld: unrecognised emulation mode: elf_x86
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu i386linux elf_l1om elf_k1om i386pep i386pe
arch/x86/boot/compressed/Makefile:105: recipe for target 'arch/x86/boot/compressed/vmlinux' failed
make[4]: *** [arch/x86/boot/compressed/vmlinux] Error 1
arch/x86/boot/Makefile:112: recipe for target 'arch/x86/boot/compressed/vmlinux' failed
make[3]: *** [arch/x86/boot/compressed/vmlinux] Error 2
arch/x86/Makefile:253: recipe for target 'bzImage' failed
make[2]: *** [bzImage] Error 2
make[2]: *** Waiting for unfinished jobs....
Nothing turns up in a search.

Any ideas anyone..?

Re: kernel build errors - help required

Posted: Sun Mar 11, 2018 5:31 pm
by timkb4cq
Do you have libelf-dev installed? The newer kernels depend on it.

Re: kernel build errors - help required

Posted: Sun Mar 11, 2018 5:33 pm
by anticapitalista
timkb4cq wrote:Do you have libelf-dev installed? The newer kernels depend on it.
Yes, I do.

Code: Select all

libelf-dev is already the newest version (0.168-1).

Re: kernel build errors - help required

Posted: Sun Mar 11, 2018 7:02 pm
by antiX-Dave
My guess is that if you are building on a 64 bit install the emulation libraries for 32 bit are missing based off the ld unrecognized emulation mode...
Therefore the various x86 modules cannot be found and the build instructions fail.

But that is really a guess from following other build errors. I have not yet built a kernel.

Re: kernel build errors - help required

Posted: Sun Mar 11, 2018 7:04 pm
by anticapitalista
I think it is down to some very new Debian updates, since building the 4.9.83 version now does not build.

Re: kernel build errors - help required

Posted: Mon Mar 12, 2018 3:14 pm
by stsoh

Code: Select all

target 'bzImage' failed
probably need LOADLIN for bzimage.

Re: kernel build errors - help required

Posted: Mon Mar 12, 2018 4:31 pm
by anticapitalista
stsoh wrote:

Code: Select all

target 'bzImage' failed
probably need LOADLIN for bzimage.
Installed loadlin, rebuilt kernel and it fails again with the same message.
Building a 4.15.9 kernel works fine.

Re: kernel build errors - help required

Posted: Tue Mar 13, 2018 4:51 am
by stsoh
open terminal input

Code: Select all

ld -V

Re: kernel build errors - help required

Posted: Tue Mar 13, 2018 5:06 am
by anticapitalista

Code: Select all

ld -V
GNU ld (GNU Binutils for Debian) 2.28
  Supported emulations:
   elf_x86_64
   elf32_x86_64
   elf_i386
   elf_iamcu
   i386linux
   elf_l1om
   elf_k1om
   i386pep
   i386pe

Re: kernel build errors - help required

Posted: Tue Mar 13, 2018 5:52 am
by stsoh
try upgrade binutils 2.8 to 2.30-7 (sid repo).