about the invalid format error...

Installation, configuration and troubleshooting of the Cisco VPN Client on Linux systems

about the invalid format error...

Postby danson » Tue Jun 24, 2008 5:05 am

I read this thread:

viewtopic.php?f=15&t=576

which accurately describes my problem, but I don't understand the solution. Do I need a different version of gcc? If so, how do I determine the version I might need? I'm running Ubuntu with kernel version 2.6.24-19-386.
danson
Private
Private
 
Posts: 3
Joined: Tue Jun 24, 2008 4:58 am

Re: about the invalid format error...

Postby tuxx-home.at » Tue Jun 24, 2008 8:25 am

If you compile a kernel module it has to be compiled using the exact sources of the binary kernel you are currently running plus it needs to be compiled with the exactly same version of gcc your kernel has been built with.

That said, you probably got an update of gcc during one of your system updates and that's still a thing I don't understand: If distributions ship a new gcc version they should definetly update the kernel image too so that such problems can't arise.

Invalid module format errors may also show up if the kernel you're currently running differs from the kernel sources used to compile the vpn module, so to make sure what blocks the loading of cisco_ipsec.ko on your system, use the commands shown in the above mentioned topic:

Code: Select all
dmesg -c
/etc/init.d/vpnclient_init start
dmesg


The first command (dmesg -c) clears the kernel's ringbuffer. The second command tries to load the cisco_ipsec.ko kernel module and will get you the "invalid module format" error message.
The last command (dmesg) shows you the exact error message (usually it contains the necessary version numbers too), so please let me see the output of the last `dmesg` run.
User avatar
tuxx-home.at
Supreme Commander
Supreme Commander
 
Posts: 2199
Joined: Mon Jan 01, 2007 12:51 pm
Location: Vassach - Austria - Europe

Re: about the invalid format error...

Postby danson » Sat Jul 19, 2008 6:06 am

Thanks for the advice, I understand what you're saying, but still haven't puzzled out the solution.

I followed your instructions, here is the out put of the second dmesg:

[14312.710068] cisco_ipsec: disagrees about version of symbol struct_module
danson
Private
Private
 
Posts: 3
Joined: Tue Jun 24, 2008 4:58 am

SOLUTION: Re: about the invalid format error...

Postby danson » Sat Jul 19, 2008 6:25 am

Here is a little more info:

danson$ cat /proc/version
Linux version 2.6.24-19-386 (buildd@terranova) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 Fri Jul 11 22:45:14 UTC 2008
danson$ gcc --version
gcc (GCC) 4.2.3 (Ubuntu 4.2.3-2ubuntu7)

So it appears my gcc version is the same version used for the kernel. The above gave me the necessary clue:

danson$ ls /usr/src
linux
linux-headers-2.6.20-15
linux-headers-2.6.20-15-386
linux-headers-2.6.20-15-generic
linux-headers-2.6.24-19
linux-headers-2.6.24-19-generic
modules

Notice there is no linux-headers-2.6.24-19-386 directory. I installed the correct headers, did a "make clean" in my vpnclient directory, then ran vpn_install, and all is well.

Thanks again for the help!
danson
Private
Private
 
Posts: 3
Joined: Tue Jun 24, 2008 4:58 am

Re: about the invalid format error...

Postby tuxx-home.at » Wed Dec 24, 2008 11:20 am

Forgot to close this one, doing that now.
User avatar
tuxx-home.at
Supreme Commander
Supreme Commander
 
Posts: 2199
Joined: Mon Jan 01, 2007 12:51 pm
Location: Vassach - Austria - Europe


Return to Cisco VPN Client on Linux systems

Who is online

Users browsing this forum: No registered users and 2 guests

cron