We just got a copy of the Linux client for our Cisco VPN router at work, but I'm having trouble compiling it. The script it calls to compile the kernel module it needs has these lines: INCLUDES="-I. -I${KSRCDIR}/include" CFLAGS="-O2 -DCNI_LINUX_INTERFACE -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -\ DHAVE_CONFIG_H" $CC $CFLAGS $INCLUDES -c linuxcniapi.c $CC $CFLAGS $INCLUDES -c interceptor.c $CC $CFLAGS $INCLUDES -c IPSecDrvOS_linux.c $LD -r -o cisco_ipsec linuxcniapi.o IPSecDrvOS_linux.o interceptor.o libdriver.\ so which trigger some #error text like this:
You should not include /usr/include/{linux,asm}/ header files directly for the compilation of kernel modules. ... To build kernel modules please do the following:
o Have the kernel sources installed
o Make sure that the symbolic link /lib/modules/`uname -r`/build exists and points to the matching kernel source directory
o Now copy /boot/vmlinuz.version.h to /lib/modules/`uname -r`/build/include/linux/version.h
o When compiling, make sure to use the following compiler option to use the correct include files:
-I/lib/modules/`uname -r`/build/include
instead of
-I/usr/include/linux
I'm not sure how to correct this, since the include when the script runs actually expands to /usr/src/linux/include and not /usr/include/linux. Can anyone offer a suggestion? -- =========================================================== Glenn Holmer (gholmer@ameritech.net) ----------------------------------------------------------- Performing music well is a matter of distorting the score to produce the desired illusion, namely the existence of the score in a pure state. ----------------------------------------------------------- -Shadow, 1975 ===========================================================
Did you do this?
o Now copy /boot/vmlinuz.version.h to /lib/modules/`uname -r`/build/include/linux/version.h
By default, there is no version.h in the /usr/src/linux/include/linux directory, so the version under /usr/include/linux gets included, and if you look at it, all it does is echo the messages you got. If you follow the above directions, it *should* work, provided you actually have the kernel headers installed. regards Anders On Sunday 16 September 2001 17.59, Glenn Holmer wrote:
We just got a copy of the Linux client for our Cisco VPN router at work, but I'm having trouble compiling it. The script it calls to compile the kernel module it needs has these lines:
INCLUDES="-I. -I${KSRCDIR}/include" CFLAGS="-O2 -DCNI_LINUX_INTERFACE -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -\ DHAVE_CONFIG_H"
$CC $CFLAGS $INCLUDES -c linuxcniapi.c $CC $CFLAGS $INCLUDES -c interceptor.c $CC $CFLAGS $INCLUDES -c IPSecDrvOS_linux.c $LD -r -o cisco_ipsec linuxcniapi.o IPSecDrvOS_linux.o interceptor.o libdriver.\ so
which trigger some #error text like this:
You should not include /usr/include/{linux,asm}/ header files directly for the compilation of kernel modules.
...
To build kernel modules please do the following:
o Have the kernel sources installed
o Make sure that the symbolic link /lib/modules/`uname -r`/build exists and points to the matching kernel source directory
o Now copy /boot/vmlinuz.version.h to /lib/modules/`uname -r`/build/include/linux/version.h
o When compiling, make sure to use the following compiler option to use the correct include files:
-I/lib/modules/`uname -r`/build/include
instead of
-I/usr/include/linux
I'm not sure how to correct this, since the include when the script runs actually expands to /usr/src/linux/include and not /usr/include/linux. Can anyone offer a suggestion?
Anders Johansson wrote:
Did you do this?
o Now copy /boot/vmlinuz.version.h to /lib/modules/`uname -r`/build/include/linux/version.h
By default, there is no version.h in the /usr/src/linux/include/linux directory, so the version under /usr/include/linux gets included, and if you look at it, all it does is echo the messages you got. If you follow the above directions, it *should* work, provided you actually have the kernel headers installed.
regards Anders
Yes, thanks; someone else pointed out that you also need to run "make cloneconfig" and "make dep" to sync your kernel sources with your running kernel if you are using a SuSE kernel that hasn't been re-compiled. -- =========================================================== Glenn Holmer (gholmer@ameritech.net) ----------------------------------------------------------- Performing music well is a matter of distorting the score to produce the desired illusion, namely the existence of the score in a pure state. ----------------------------------------------------------- -Shadow, 1975 ===========================================================
participants (2)
-
Anders Johansson
-
Glenn Holmer