Bug#650085: Packaged headers do not include generated .h files
Package: linux-2.6
Version: 3.1.1-1
Severity: serious
Justification: breaks building of out-of-tree modules
Hello,
I'm unable to build any out-of-tree modules on sparc against headers
provided by a combination of linux-headers-3.1.0-1-common and
linux-headers-3.1.0-1-sparc64-smp packages (version 3.1.1-1). Typical
error messages:
jurij@debian:~/tmp/linux-3.1.1/samples/kprobes$ make -C /lib/modules/3.1.0-1-sparc64-smp/build M=${PWD}
make: Entering directory `/usr/src/linux-headers-3.1.0-1-sparc64-smp'
CC [M] /home/jurij/tmp/linux-3.1.1/samples/kprobes/kprobe_example.o
In file included from /usr/src/linux-headers-3.1.0-1-common/include/linux/time.h:9:0,
from /usr/src/linux-headers-3.1.0-1-common/include/linux/stat.h:60,
from /usr/src/linux-headers-3.1.0-1-common/include/linux/module.h:10,
from /home/jurij/tmp/linux-3.1.1/samples/kprobes/kprobe_example.c:14:
/usr/src/linux-headers-3.1.0-1-common/include/linux/math64.h:5:23: fatal error: asm/div64.h: No such file or directory
compilation terminated.
make[3]: *** [/home/jurij/tmp/linux-3.1.1/samples/kprobes/kprobe_example.o] Error 1
make[2]: *** [_module_/home/jurij/tmp/linux-3.1.1/samples/kprobes] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
make: Leaving directory `/usr/src/linux-headers-3.1.0-1-sparc64-smp'
jurij@debian:~/tmp/linux-3.1.1/samples/kprobes$
It appears that asm/div64.h (along with some other headers) is
dynamically generated during the kernel build and it's
sufficient to invoke 'make prepare' target to get it done, for
example:
jurij@debian:~/tmp/linux-3.1.1$ make prepare
scripts/kconfig/conf --silentoldconfig Kconfig
WRAP arch/sparc/include/generated/asm/div64.h
WRAP arch/sparc/include/generated/asm/local64.h
WRAP arch/sparc/include/generated/asm/irq_regs.h
WRAP arch/sparc/include/generated/asm/local.h
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/generated/utsrelease.h
UPD include/generated/utsrelease.h
CC kernel/bounds.s
GEN include/generated/bounds.h
CC arch/sparc/kernel/asm-offsets.s
GEN include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
jurij@debian:~/tmp/linux-3.1.1$
I guess that packaged headers are copied from a directory where this
command (or kernel build) was not run, and as a result they are not
included in the packages.
Best regards,
--
Jurij Smakov jurij@wooyd.org
Key: http://www.wooyd.org/pgpkey/ KeyID: C99E03CC
Reply to: