[OpenAFS-devel] Build system tweak required for SUSE

Greg Hudson ghudson@mit.edu
Sat, 4 Nov 2006 10:37:27 -0500


I'm building OpenAFS 1.4.2 (or 1.5.10, doesn't matter) on SLED 10.  As
documented in /usr/src/linux/README.SUSE, I want to use
/lib/modules/<version>/build instead of /usr/src/linux as my kernel
linux kernel headers directory, as one would do on RHEL or Fedora
Core.

Unlike RHEL or FC, however, SUSE's /lib/modules/<version>/build
contains only a skeleton with the autogenerated files from the kernel
build.  I've included the output of "find" there for reference.  In
particular, scripts/Makefile.build is not present, so AC_TRY_KBUILD
erroneously uses AC_TRY_KBUILD24, causing all of the configure tests
to return negatively.  (The build then bombs out because it doesn't
know what to do with rlim.)  As far as I know at this time, that's the
*only* thing wrong with what the build system is doing; if I create a
dummy /lib/modules/<version>/build/scripts/Makefile.build, the
AC_TRY_KBUILD26 macro works beautifully and the build succeeds.

So, I think AC_TRY_KBUILD needs to be looking for a different file in
order to detect a 2.6 tree in order to work out of the box on SUSE.
I'm not immediately sure what would work.

----

error-messages:/lib/modules/2.6.16.21-0.25-smp/build # find
.
./arch
./arch/i386
./arch/i386/kernel
./include
./include/asm-i386
./include/asm-i386/asm-offsets.h
./include/asm
./include/linux
./include/linux/autoconf.h
./include/linux/version.h
./Module.symvers
./.config
./.kernelrelease
./Makefile
./include2
./include2/asm
./scripts
./scripts/basic
./scripts/basic/split-include
./scripts/basic/fixdep
./scripts/basic/docproc
./scripts/genksyms
./scripts/genksyms/keywords.c
./scripts/genksyms/parse.h
./scripts/genksyms/parse.c
./scripts/genksyms/lex.c
./scripts/genksyms/genksyms
./scripts/kconfig
./scripts/kconfig/zconf.hash.c
./scripts/kconfig/zconf.tab.c
./scripts/kconfig/lex.zconf.c
./scripts/kconfig/conf
./scripts/mod
./scripts/mod/mk_elfconfig
./scripts/mod/modpost
./scripts/mod/elfconfig.h
./scripts/kallsyms
./scripts/conmakehash
./scripts/bin2c