How-to: GCC 4.x.x and Cisco VPN Client


- So my current employer uses the Cisco VPN Client v4.8.
- I use linux at home.
- My kernel is compiled via GCC 4.1.1.
- Cisco compiles their proprietery portion of the VPN Client with GCC 3.3.


Follow other sites if you need to know how to compile the cisco client:
LINUX Cisco VPN Client Installation
Using Cisco VPN client on Linux
Google is your Friend

This difference in compilers causes a problem.

GCC will compile the portions of C code that connects to the kernel with GCC 4.1.1's toolset but then when linking it will link the GCC 3.3 code with the 4.1.1 libraries and well its basically downdgraded (for compatability reasons) to GCC 3.3.

AND that affects the kernel module. Since my kernel is compiled with GCC 4, and the module says GCC 3 in its magic section my kernel will thus refuse to load it.


YOUR COMPUTER COULD EXPLODE IF YOU DO ANYTHING BELOW THIS LINE


So I decided that since all the connecting code was compiled via 4.1.1 its probably ok to just manually change the magic via vi. So its really a simple idea... open up the kernel module after cisco's install script installs it, and then change the "vermagic=" value manually via vi.

Or if you are feeling particularly spunky that day... you could use sed.
I changed the following character string in /lib/modules/2.6.xx/CiscoVPN/cisco_ipsec.ko:
vermagic=2.6.21-wz SMP preempt mod_unload PENTIUM4 gcc-3.3
to:
vermagic=2.6.21-wz SMP preempt mod_unload PENTIUM4 gcc-4.1


Happily tell your kernel to load it up (via modprobe), and away you go. I haven't had a problem yet. Although your kernel may explode, it was worth it for me instead of recompiling the kernel (and everything else) with gcc-3.3. I'm sure this violates somebodies idea of something, but it works. Done and done.

-wz

Back - Home