Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kernel Compile Error: gcc: error: elf_i386: No such file or directory

I've got stuck in downgrade my kernel version to 2.6.22. The error message is :

SYSCALL arch/i386/kernel/vsyscall-int80.so gcc: error: elf_i386: No such file or directory make[1]: * [arch/i386/kernel/vsyscall-int80.so] Error 1 make: * [arch/i386/kernel] Error 2

I've tried to google for answers, like downgrade my gcc version, etc. But nothing happens. My OS is ubuntu 11.04 with kernel version 3.1.4 .

So what's wrong is it? Thanks for your answers.

like image 870
KMHook Avatar asked May 03 '12 05:05

KMHook


2 Answers

Can you check the vdso makefile which should be in arch/x86/vdso/Makefile.

find the line

 VDSO_LDFLAGS 
there exists two lines one for x64 and another for x32 bit systems.

it should have

 -m elf_x86_64 
and another one
 -m elf_x86 

replace them like

 -m64 
and
 -m32
respectively.

Reference to bug fix Link1 Lockergnome and Link2 ubuntu.

like image 173
czar x Avatar answered Jan 01 '23 22:01

czar x


I used this answer for this problem, and changed the -m elf_i386 part to -m32 in Makefile stored in arch/i386/kernel directory, and it solved the problem, for the future reference.

like image 23
ecem Avatar answered Jan 01 '23 22:01

ecem