Comment 9 for bug 233950

Revision history for this message
Kirk Sayre (sayre) wrote :

I was getting the same '*** No rule to make target `arch/x86/kernel/asm-offsets.c', needed by `arch/x86/kernel/asm-offsets.s'.' error reported here. After digging into the problem a bit I think I found the problem and how to fix it. In the file /usr/src/linux-headers-x.x.x/Kbuild there are references to arch/x86/kernel/asm-offsets.c and arch/x86/kernel/asm-offsets.s. Kbuild is included in /usr/src/linux-headers-x.x.x/Makefile. When attempting to build asm-offsets.s using the build rules in Kbuild the working directory for Make is /usr/src/linux-headers-x.x.x. The directory 'arch/x86/kernel/' is not in /usr/src/linux-headers-x.x.x, it is in /usr/src/linux.

To fix Kbuild I changed all references to 'arch/x86/kernel/asm-offsets.c' to '../linux/arch/x86/kernel/asm-offsets.c' and changed all references to 'arch/x86/kernel/asm-offsets.s' to '../linux/arch/x86/kernel/asm-offsets.s'.

This may not be the best solution but it seems to make sense and work.