nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Compile fails with linux 2.6.18 (-rc1) (http://www.nvnews.net/vbulletin/showthread.php?t=73252)

chtitux 07-11-06 06:27 AM

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

Dragoran 07-11-06 06:54 AM

Re: Compile fails with linux 2.6.18 (-rc1)
 
no patch is needed just compile the kernel without the lock validator

JaXXoN 07-11-06 07:09 AM

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

Dwaine 07-30-06 06:15 AM

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 07-30-06 06:29 AM

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.

Dragoran 07-30-06 06:51 AM

Re: Compile fails with linux 2.6.18 (-rc1)
 
no because nobody would use a lockdep enabled kernel in a productive environment.

Dwaine 08-04-06 10:39 PM

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

Tinitus 08-07-06 10:36 AM

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


All times are GMT -5. The time now is 09:24 AM.

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