Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux

Newegg Daily Deals

Reply
 
Thread Tools
Old 07-11-06, 07:27 AM   #1
chtitux
Registered User
 
Join Date: Jul 2006
Posts: 1
Exclamation Compile fails with linux 2.6.18 (-rc1)

When I try to compile nvidia module with linux 2.6.18-rc1 , I get :
Quote:
FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'lockdep_init_map'
Little context :
Quote:
make module[...]
Building modules, stage 2.
make -rR -f /usr/src/linux-2.6.16.2/scripts/Makefile.modpost
scripts/mod/modpost -i /usr/src/linux-2.6.16.2/Module.symvers -I /var/tmp/portage/nvidia-kernel-1.0.8762-r1/work/NVIDIA-Linux-x86-1.0-pkg1/usr/src/nv/Modules.symvers -o /var/tmp/portage/nvidia-kernel-1.0.8762-r1/work/NVIDIA-Linux-x86-1.0-8762-pkg1/usr/src/nv/Modules.symvelinux /var/tmp/portage/nvidia-kernel-1.0.8762-r1/work/NVIDIA-Linux-x86-1.0-8762-pkg1/usr/src/nv/nvidia.o
FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'lockdep_init_map'
make[4]: *** [__modpost] Erreur 1
make[3]: *** [modules] Erreur 2
make[2]: *** [modules] Erreur 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [mdl] Erreur 1
make: *** [module] Erreur 2
Is there any patch to solve that ?
Thanks
chtitux is offline   Reply With Quote
Old 07-11-06, 07:54 AM   #2
Dragoran
Registered User
 
Join Date: May 2004
Posts: 711
Default Re: Compile fails with linux 2.6.18 (-rc1)

no patch is needed just compile the kernel without the lock validator
Dragoran is offline   Reply With Quote
Old 07-11-06, 08:09 AM   #3
JaXXoN
Registered User
 
Join Date: Jul 2005
Location: Munich
Posts: 910
Default Re: Compile fails with linux 2.6.18 (-rc1)

The compilation actually went ok, but the module fails to load, because GPL-only symbols are not exported to non-GPL modules.

There are two solutions: either, modify EXPORT_SYMBOL_GPL(lockdep_init_map) in the kernel sources (kernel/lockdep.c:1940) to EXPORT_SYMBOL(lockdep_init_map) and recompile/install the kernel, or manually add the symbol information to the nvidia driver module:

Code:
cd <nvidia driver sources>
make module
SYMBOL=`grep lockdep_init_map$ /boot/System.map-2.6.18-rc1 | colrm 9`
ld -m elf_i386 --defsym lockdep_init_map=0x$SYMBOL -r -o nvidia.ko nvidia.o nvidia.mod.o
On x86_64, you have to use "colrm 17" instead of "colrm 9" in the third line!

I didn't yet actually tried if the driver will then work on 2.6.18-rc1, but the above method(s) to get rid of missing symbols works nice for nvidia drivers on top of xen-enabled linux kernels.

regards

Bernhard
JaXXoN is offline   Reply With Quote
Old 07-30-06, 07:15 AM   #4
Dwaine
Registered User
 
Join Date: Apr 2003
Posts: 37
Default Re: Compile fails with linux 2.6.18 (-rc1)

Quote:
Originally Posted by JaXXoN
The compilation actually went ok, but the module fails to load, because GPL-only symbols are not exported to non-GPL modules.

There are two solutions: either, modify EXPORT_SYMBOL_GPL(lockdep_init_map) in the kernel sources (kernel/lockdep.c:1940) to EXPORT_SYMBOL(lockdep_init_map) and recompile/install the kernel, or manually add the symbol information to the nvidia driver module:

Code:
cd <nvidia driver sources>
make module
SYMBOL=`grep lockdep_init_map$ /boot/System.map-2.6.18-rc1 | colrm 9`
ld -m elf_i386 --defsym lockdep_init_map=0x$SYMBOL -r -o nvidia.ko nvidia.o nvidia.mod.o
On x86_64, you have to use "colrm 17" instead of "colrm 9" in the third line!

I didn't yet actually tried if the driver will then work on 2.6.18-rc1, but the above method(s) to get rid of missing symbols works nice for nvidia drivers on top of xen-enabled linux kernels.

regards

Bernhard
I tried this it does not work. Getting the same error message.
Dwaine is offline   Reply With Quote
Old 07-30-06, 07:29 AM   #5
Dwaine
Registered User
 
Join Date: Apr 2003
Posts: 37
Default Re: Compile fails with linux 2.6.18 (-rc1)

I think we should have nvidia create a patch so this problem does not cause grief for people.
Dwaine is offline   Reply With Quote
Old 07-30-06, 07:51 AM   #6
Dragoran
Registered User
 
Join Date: May 2004
Posts: 711
Default Re: Compile fails with linux 2.6.18 (-rc1)

no because nobody would use a lockdep enabled kernel in a productive environment.
Dragoran is offline   Reply With Quote
Old 08-04-06, 11:39 PM   #7
Dwaine
Registered User
 
Join Date: Apr 2003
Posts: 37
Default Re: Compile fails with linux 2.6.18 (-rc1)

I'm getting the following error trying to include the smybol into the nvidia module.

It's on LD line.

ld: c0660f2c: No such file: No such file or directory.


What am I doing wrong? The make module and smpbol statement went ok.

Dwaine
Dwaine is offline   Reply With Quote
Old 08-07-06, 11:36 AM   #8
Tinitus
Registered User
 
Join Date: Oct 2005
Posts: 10
Default Re: Compile fails with linux 2.6.18 (-rc1)

Quote:
Originally Posted by JaXXoN
The compilation actually went ok, but the module fails to load, because GPL-only symbols are not exported to non-GPL modules.

There are two solutions: either, modify EXPORT_SYMBOL_GPL(lockdep_init_map) in the kernel sources (kernel/lockdep.c:1940) to EXPORT_SYMBOL(lockdep_init_map) and recompile/install the kernel, or manually add the symbol information to the nvidia driver module:

Code:
cd <nvidia driver sources>
make module
SYMBOL=`grep lockdep_init_map$ /boot/System.map-2.6.18-rc1 | colrm 9`
ld -m elf_i386 --defsym lockdep_init_map=0x$SYMBOL -r -o nvidia.ko nvidia.o nvidia.mod.o
On x86_64, you have to use "colrm 17" instead of "colrm 9" in the third line!

I didn't yet actually tried if the driver will then work on 2.6.18-rc1, but the above method(s) to get rid of missing symbols works nice for nvidia drivers on top of xen-enabled linux kernels.

regards

Bernhard


Hello,

which xen enabled Kernel will work with which nvidia Driver?

Regards Roland
Tinitus is offline   Reply With Quote

Reply


Thread Tools

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 On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
nVidia Linux drivers with Linux on Mac, help? Thetargos NVIDIA Linux 0 05-13-12 01:52 PM
Mandrake Linux 9.0 (Dolphin) now available | comments? volt General Linux 10 10-19-02 11:13 PM

All times are GMT -5. The time now is 05:01 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.