Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 01-10-2004, 02:03 AM   #1
LQ Newbie
Registered: Dec 2003
Location: Phoenix suburbs
Distribution: Debian (Etch/Sid)
Posts: 16

Rep: Reputation: 0
Question Kernel 2.6.0: what's up with modversions.h?


I'm really confused by modversions.h. It didn't get created in my custom build, despite the CONFIG_MODVERSIONS being set to 1 in my .config file. This is for kernel version 2.6.0. I'm running Debian testing.

I've done some searching through the entire kernel hierarchy, and I can't see how this is ever created, although there are about 16 module compiles that reference .../include/linux/modversions.h. For example:

./drivers/block/paride/jumbo:MODI="-include ../../../include/linux/modversions.h"
./drivers/cdrom/cm206.c: * compile-command: "gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -fno-strength-reduce -m486 -DMODULE -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h -c -o cm206.o cm206.c"
./drivers/net/acenic.c: * compile-command: "gcc -D__SMP__ -D__KERNEL__ -DMODULE -I../../include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -pipe -fno-strength-reduce -DMODVERSIONS -include ../../include/linux/modversions.h -c -o acenic.o acenic.c"

I've spent about 3 hours scouring the net for any relevent information, and have had no luck. So I come to this forum hoping for answers.

I see lots of posts here that mention someone's missing modversions.h, but none of the replies ever talk about what to do about that situation -- they mostly say make mrproper and download the latest drivers.

Well, that would be great, except that I'm trying to get a legacy driver (Cisco VPN 5000 client) to compile, and so I'm largely stuck with what I cannot do.

There is a significant possibility that the driver could be made to work without modversions.h, but I'd really rather know what it is I'm missing!

Please, if someone out there can tell me either how to create this file or why this file should not be used (and a workaround...) I'd really appreciate it.

(BTW, I have the driver working with 2.4.22 of the kernel, so compiling it is not a mega issue, but I do want to be able to use the latest kernel, too...

-- Mario
Old 01-10-2004, 11:13 AM   #2
Registered: Sep 2003
Location: Pennsylvania
Distribution: Debian Squeeze
Posts: 106

Rep: Reputation: 15
I wish I had an answer to your question because I can't get my winmodem working without that file & I really like the new kernels speed & whatnot, but until I can get the modem working (or verizon finally activates my dsl) I'll just have to wait
Old 01-25-2004, 05:36 AM   #3
LQ Newbie
Registered: Jan 2004
Posts: 1

Rep: Reputation: 0
This caused me grief too after I upgraded to SuSE v9.0 and I tried to recompile my Cisco VPN 5000 client. Your post at least gave me the hint as to how modversions.h might be generated.

For SuSE v9.0 you can create modversion.h by running the following:
cd /usr/src/linux
make update-modverfile

The rules for making this are in Rules.make and, obviously, you need the kernel-source rpm loaded.

This successfully generates the modversions.h file. Unfortunately, it didn't solve my problem because although I can now compile the vpnmod module, it won't load because it says that the kernel was compiled with gcc 3.x, while the module was compiled with 2.x!

I'm not sure why this is so because gcc --version gives 3.3.0, so I assume that it must be some of the libraries it links in. Fortunately for me, I have a colleague who has compiled the module, so being lazy I've just used his version :-)

Old 01-26-2004, 11:46 PM   #4
LQ Newbie
Registered: Dec 2003
Location: Phoenix suburbs
Distribution: Debian (Etch/Sid)
Posts: 16

Original Poster
Rep: Reputation: 0
I've seen this, too. I think what's happening is that the .lib file Cisco supplies is compiled with older gcc. Cisco wasn't real willing to help out, either. I tried modload -f and it complained, but loaded and worked.

Did you get the VPN client to compile right out of the box?

-- Mario
Old 02-08-2004, 08:30 AM   #5
LQ Newbie
Registered: Feb 2004
Posts: 1

Rep: Reputation: 0
Re : modversions.h

Hi folks !

i have the same problem compiling a driver for the Bewan PCI ST adsl modem.

They say in the README file to do a make and make install in the directory /usr/src/unicorn/unicorn_atm and /usr/src/unicorn/unicorn_bus

When i do the make commend, here is Gcc's reply:

gcc -DVERS=0 -O2 -fno-exceptions -fno-gnu-linker -Wstrict-prototypes -fomit-frame-pointer -fno-strict-aliasing -pipe -fno-strength-reduce -Wall -D__KERNEL__ -DMODULE -DLINUX -D_ATM_DRIVER -DDEBUG=1 -I/usr/src/linux/include -I../include/ -I../ -c -o unicorn_atmdrv.o unicorn_atmdrv.c
unicorn_atmdrv.c:12: linux/modversions.h: No such file or directory....

the reason is that there is NO file named modversions.h....neither in an another directory....

I've just read this post locating at :

" If your kernel was built with CONFIG_MODVERSIONS=y then add these
flags to the build for this module

-DMODVERSIONS -include kernel_source_tree/linux/modversions.h

In any case, modversions.h will disappear in kbuild 2.5. "

But in which file does "DMODVERSION..." must be write ?

somebody have a solution ?

PS: i m running Debian 2.6.0 and it is running fine !

Last edited by TazMan_FR; 02-08-2004 at 09:51 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with modversions.h Roger Almenar Linux - Hardware 0 07-21-2004 04:22 PM
modversions.h JanDeMan Linux - Newbie 3 06-14-2004 06:48 AM
modversions.h and my sanity! stcinifeic Mandriva 1 05-28-2004 05:12 PM
can't find modversions.h talonnb Linux - Newbie 2 08-03-2003 04:43 AM
modversions.h not there closet geek Linux - Software 4 06-02-2003 02:00 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:37 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration