With a little side of applesauce...

Monday, February 5, 2007

Cisco vpnclient - Linux kernel 2.6.20 linux/config.h missing

The source code provided with:
Cisco Systems VPN Client Version 4.8.00 (0490)

looks for linux/config.h, but that file was replaced in kernel 2.6.19 with linux/autoconf.h, which gives the following error:

Making module
make -C /lib/modules/2.6.20-6-generic/build SUBDIRS=/home/speeves/downloads/vpnclient modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-6-generic'
CC [M] /home/speeves/downloads/vpnclient/linuxcniapi.o
/home/speeves/downloads/vpnclient/linuxcniapi.c:12:26: error: linux/config.h: No such file or directory
In file included from /home/speeves/downloads/vpnclient/Cniapi.h:15,
from /home/speeves/downloads/vpnclient/linuxcniapi.c:27:
/home/speeves/downloads/vpnclient/GenDefs.h:110:2: warning: #warning 64 bit
make[2]: *** [/home/speeves/downloads/vpnclient/linuxcniapi.o] Error 1
make[1]: *** [_module_/home/speeves/downloads/vpnclient] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-6-generic'
make: *** [default] Error 2
Copying module to directory "/lib/modules/2.6.20-6-generic/CiscoVPN".


You can fix this by:

$ cd /path/to/vpnclient
$ for f in $(grep -r -l config.h *); do \
> sed -i "s?linux/config.h?linux/autoconf.h?" $f ; done
$ sudo ./vpn_install

1 comment:

Tyler said...

Thanks for the little grep&sed one-liner. Solved my problem compiling a wireless driver (zd1211 chipset).