Difference between revisions of "2.6.x Kernel Compilation Problems"

From KoanSoftware Wiki
Jump to: navigation, search
(Created page with "= 2.6.x Kernel Compilation Problems = With Ubuntu 12 is no longer possible to build old 2.6 kernels (2.6.30 in my case). The problem is that gcc 4.6 doesn't support anymore link…")
 
Line 5: Line 5:
  
 
PROBLEM:
 
PROBLEM:
------------------------------------------------------------------------------------------------------
+
 
gcc: error: elf_i386: No such file or directory
+
gcc: error: elf_i386: No such file or directory
  OBJCOPY arch/x86/vdso/vdso32-int80.so
+
  OBJCOPY arch/x86/vdso/vdso32-int80.so
objcopy: 'arch/x86/vdso/vdso32-int80.so.dbg': No such file
+
objcopy: 'arch/x86/vdso/vdso32-int80.so.dbg': No such file
make[2]: *** [arch/x86/vdso/vdso32-int80.so] Error 1
+
make[2]: *** [arch/x86/vdso/vdso32-int80.so] Error 1
make[1]: *** [arch/x86/vdso] Error 2
+
make[1]: *** [arch/x86/vdso] Error 2
make: *** [arch/x86] Error 2
+
make: *** [arch/x86] Error 2
------------------------------------------------------------------------------------------------------
+
 
  
 
SOLUTION:
 
SOLUTION:
Line 21: Line 21:
  
 
replace "-m elf_x86_64" by "-m64" on the line starting with VDSO_LDFLAGS_vdso.lds
 
replace "-m elf_x86_64" by "-m64" on the line starting with VDSO_LDFLAGS_vdso.lds
 +
 
replace "-m elf_i386" by "-m32" on the line starting with VDSO_LDFLAGS_vdso32.lds
 
replace "-m elf_i386" by "-m32" on the line starting with VDSO_LDFLAGS_vdso32.lds

Revision as of 13:58, 8 February 2013

2.6.x Kernel Compilation Problems

With Ubuntu 12 is no longer possible to build old 2.6 kernels (2.6.30 in my case). The problem is that gcc 4.6 doesn't support anymore linker-style architecture options.

PROBLEM:

gcc: error: elf_i386: No such file or directory
  OBJCOPY arch/x86/vdso/vdso32-int80.so
objcopy: 'arch/x86/vdso/vdso32-int80.so.dbg': No such file
make[2]: *** [arch/x86/vdso/vdso32-int80.so] Error 1
make[1]: *** [arch/x86/vdso] Error 2
make: *** [arch/x86] Error 2


SOLUTION:


Apply the following changes to solve the problem :

In arch/x86/vdso/Makefile :

replace "-m elf_x86_64" by "-m64" on the line starting with VDSO_LDFLAGS_vdso.lds

replace "-m elf_i386" by "-m32" on the line starting with VDSO_LDFLAGS_vdso32.lds