Error compiling NVIDIA kernel module on 2.6.23.1 kernel
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Error compiling NVIDIA kernel module on 2.6.23.1 kernel
Hi all,
I have trouble compiling the NVIDIA 1.0-9625 beta drivers downloaded from their website. Basically, during the portion in the install where it says it is compiling the kernel module, the progress bar would reach 100%, then it would abruptly stop with the error message: "ERROR: Unable to build the NVIDIA kernel module". Here is the install log:
Code:
nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Mon Oct 29 22:08:01 2007
option status:
license pre-accepted : false
update : false
force update : false
expert : false
uninstall : false
driver info : false
precompiled interfaces : true
no ncurses color : false
query latest version : false
OpenGL header files : true
no questions : false
silent : false
no recursion : false
no backup : false
kernel module only : false
sanity : false
add this kernel : false
no runlevel check : false
no network : false
no ABI note : false
no RPMs : false
no kernel module : false
force SELinux : default
no X server check : false
force tls : (not specified)
X install prefix : (not specified)
X library install path : (not specified)
X module install path : (not specified)
OpenGL install prefix : (not specified)
OpenGL install libdir : (not specified)
utility install prefix : (not specified)
utility install libdir : (not specified)
doc install prefix : (not specified)
kernel name : (not specified)
kernel include path : (not specified)
kernel source path : (not specified)
kernel output path : (not specified)
kernel install path : (not specified)
proc mount point : /proc
ui : (not specified)
tmpdir : /tmp
ftp mirror : ftp://download.nvidia.com
RPM file list : (not specified)
Using: nvidia-installer ncurses user interface
-> License accepted.
-> No precompiled kernel interface was found to match your kernel; would you li
ke the installer to attempt to download a kernel interface for your kernel f
rom the NVIDIA ftp site (ftp://download.nvidia.com)? (Answer: No)
-> No precompiled kernel interface was found to match your kernel; this means
that the installer will need to compile a new kernel interface.
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
-> Kernel source path: '/lib/modules/2.6.23.1/source'
-> Kernel output path: '/lib/modules/2.6.23.1/build'
-> Performing rivafb check.
-> Performing nvidiafb check.
-> Cleaning kernel module build directory.
executing: 'cd ./usr/src/nv; make clean'...
rm -f -f nv.o nv-vm.o os-agp.o os-interface.o os-registry.o nv-i2c.o nv.o nv
-vm.o os-agp.o os-interface.o os-registry.o nv-i2c.o nvidia.mod.o
rm -f -f build-in.o nv-linux.o *.d .*.{cmd,flags}
rm -f -f nvidia.{o,ko,mod.{o,c}} nv_compiler.h *~
rm -f -f stprof stprof.o symtab.h Modules.symvers
rm -f -rf .tmp_versions
-> Building kernel module:
executing: 'cd ./usr/src/nv; make module SYSSRC=/lib/modules/2.6.23.1/source
SYSOUT=/lib/modules/2.6.23.1/build'...
NVIDIA: calling KBUILD...
make CC=cc KBUILD_OUTPUT=/lib/modules/2.6.23.1/build KBUILD_VERBOSE=1 -C /li
b/modules/2.6.23.1/source SUBDIRS=/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-
pkg1/usr/src/nv modules
make -C /lib/modules/2.6.23.1/build \
KBUILD_SRC=/usr/src/linux-2.6.23 \
KBUILD_EXTMOD="/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv" -
f /usr/src/linux-2.6.23/Makefile modules
test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
echo; \
echo " ERROR: Kernel configuration is invalid."; \
echo " include/linux/autoconf.h or include/config/auto.conf are mis
sing."; \
echo " Run 'make oldconfig && make prepare' on kernel src to fix it
."; \
echo; \
/bin/false)
mkdir -p /tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/.tmp_vers
ions
rm -f /tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/.tmp_version
s/*
make -f /usr/src/linux-2.6.23/scripts/Makefile.build obj=/tmp/selfgz5645/NVI
DIA-Linux-x86-1.0-9625-pkg1/usr/src/nv
echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -n 1`\" > /tmp/selfgz5645/NVI
DIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv_compiler.h
cc -Wp,-MD,/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/.nv.o
.d -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.1.3/include -D__KERNEL_
_ -Iinclude -Iinclude2 -I/usr/src/linux-2.6.23/include -include include/linu
x/autoconf.h -I/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv -W
all -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-com
mon -Werror-implicit-function-declaration -O2 -pipe -msoft-float -mregparm=3
-freg-struct-return -mpreferred-stack-boundary=2 -march=athlon -mtune=generi
c -ffreestanding -maccumulate-outgoing-args -I/usr/src/linux-2.6.23/include/
asm-i386/mach-default -Iinclude/asm-i386/mach-default -fomit-frame-pointer -
g -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -I/t
mp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv -Wall -Wimplicit -Wr
eturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-a
rith -Wno-multichar -Werror -O -fno-common -msoft-float -MD -Wsign-compare -
Wno-cast-qual -Wno-error -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNVRM
-DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=9625 -UDEBUG -U_DE
BUG -DNDEBUG -DNV_SIGNAL_STRUCT_RLIM -DNV_MULTIPLE_BRIDGE_AGPGART_PRESENT -D
NV_PCI_GET_CLASS_PRESENT -DNV_SYSCTL_MAX_MAP_COUNT_PRESENT -DNV_PM_MESSAGE_T
_PRESENT -DNV_PCI_CHOOSE_STATE_PRESENT -DNV_VM_INSERT_PAGE_PRESENT -DNV_OLD_
MM_KGDB_BREAKPOINT_PRESENT -DNV_REMAP_PFN_RANGE_PRESENT -DNV_CHANGE_PAGE_ATT
R_PRESENT -DNV_VMAP_4_PRESENT -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENA
ME=KBUILD_STR(nv)" -D"KBUILD_MODNAME=KBUILD_STR(nvidia)" -c -o /tmp/selfgz5
645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/.tmp_nv.o /tmp/selfgz5645/NVID
IA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c
In file included from /tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src
/nv/nv.c:14:
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv-linux.h:17:26:
error: linux/config.h: No such file or directory
In file included from include/linux/list.h:8,
from include/linux/preempt.h:11,
from include/linux/spinlock.h:49,
from include/linux/seqlock.h:29,
from include/linux/time.h:8,
from include/linux/timex.h:57,
from include/linux/sched.h:53,
from include/linux/utsname.h:35,
from /tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src
/nv/nv-linux.h:19,
from /tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src
/nv/nv.c:14:
include/linux/prefetch.h: In function ‘prefetch_range’:
include/linux/prefetch.h:62: warning: pointer of type ‘void *’ used in a
rithmetic
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c: At top level
:
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c:110: error: e
xpected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before â
€˜*’ token
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c: In function
‘nvos_create_alloc’:
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c:450: error: â
€˜nv_pte_t_cache’ undeclared (first use in this function)
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c:450: error: (
Each undeclared identifier is reported only once
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c:450: error: f
or each function it appears in.)
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c: In function
‘nvos_free_alloc’:
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c:482: error: â
€˜nv_pte_t_cache’ undeclared (first use in this function)
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c: In function
‘nvidia_init_module’:
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c:1368: error:
‘nv_pte_t_cache’ undeclared (first use in this function)
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c:1368: error:
too many arguments to function ‘kmem_cache_create’
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c:1489: error:
void value not ignored as it ought to be
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c: In function
‘nvidia_exit_module’:
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c:1516: error:
void value not ignored as it ought to be
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c:1617: error:
‘nv_pte_t_cache’ undeclared (first use in this function)
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c: In function
‘nv_kern_open’:
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c:1844: warning
: ‘deprecated_irq_flag’ is deprecated (declared at include/linux/interru
pt.h:64)
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c:1844: warning
: ‘deprecated_irq_flag’ is deprecated (declared at include/linux/interru
pt.h:64)
/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.c:1845: warning
: passing argument 2 of ‘request_irq’ from incompatible pointer type
make[4]: *** [/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src/nv/nv.o
] Error 1
make[3]: *** [_module_/tmp/selfgz5645/NVIDIA-Linux-x86-1.0-9625-pkg1/usr/src
/nv] Error 2
make[2]: *** [modules] Error 2
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [module] Error 1
make: *** [module] Error 2
-> Error.
ERROR: Unable to build the NVIDIA kernel module.
ERROR: Installation has failed. Please see the file
'/var/log/nvidia-installer.log' for details. You may find suggestions
on fixing installation problems in the README available on the Linux
driver download page at www.nvidia.com.
Here is the result for the command "uname -a":
Code:
ben@ben-desktop:~$ uname -a
Linux ben-desktop 2.6.23.1 #1 Mon Oct 29 19:19:24 PDT 2007 i686 GNU/Linux
Just to give a bit more information, I'm currently running Ubuntu Gutsy Gibbon, on a custom compiled kernel downloaded from <kernel.org>.
Snap. I had exactly the same Problem as I also dual boot Ubuntu 7.10 and have my own custom 2.6.23.1 kernel.
Make sure you have your kernel source in /usr/src/linux, (as has been already suggested) and autoconf installed.
This however still would not compile until I downloaded the Nvidia x86 100.14.11 driver, my archietecture is 32 bit Intel so may be different to yours, but try and download the alternate nvidia driver and see if that compiles.
Snap. I had exactly the same Problem as I also dual boot Ubuntu 7.10 and have my own custom 2.6.23.1 kernel.
Make sure you have your kernel source in /usr/src/linux, (as has been already suggested) and autoconf installed.
This however still would not compile until I downloaded the Nvidia x86 100.14.11 driver, my archietecture is 32 bit Intel so may be different to yours, but try and download the alternate nvidia driver and see if that compiles.
I'm pretty sure I have autoconf and my kernel headers installed. I'll give compiling the 100.14.11 drivers a shot, but I would prefer to have 1.0-9625 version.
Thanks for your responses guys!
EDIT: Ok, compiling the 100.14.11 driver fails with the same error.
But, I'm running a 2.6.21.5 system, and I was able to compile the 100.14.19 version without any issues.
Are you certain you have the correct kernel source loaded, as well as the correct headers.
Cheers.
Okay, I gather that my problem supposedly stems from the removal of the config.h file from the newer kernels. What exactly do I do? The last post mentions a possible workaround for this issue, but I have no idea what the "module.c" file refers to! I am quite new to linux, so I would appreciate some reasonably detailed instructions.
Again, thanks for your reply!
P.S. If this doesn't work out, I may just end up dumping Ubuntu and moving to something else...
But, I'm running a 2.6.21.5 system, and I was able to compile the 100.14.19 version without any issues.
Here's a snippet from my nVidia install:
Code:
make -C /lib/modules/2.6.21.5-smp/build \
KBUILD_SRC=/usr/src/linux-2.6.21.5 \
KBUILD_EXTMOD="/tmp/selfgz5132/NVIDIA-Linux-x86-100.14.19-pkg1/usr/src/nv"
You can see I'm running a kernel that doesn't have linux/config.h and nVidia drivers 100.14.19. Everything compiled cleanly.
Quote:
Originally Posted by MQMan
Are you certain you have the correct kernel source loaded, as well as the correct headers.
**Update** Looking at your log, it appears that you do have the correct files loaded. But I didn't spot that you tried 100.14.11, not 100.14.19. Try dowloading the latest version.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.