nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   Nvidia drive Compilation problem. (http://www.nvnews.net/vbulletin/showthread.php?t=5269)

saqer 12-17-02 09:22 AM

Nvidia drive Compilation problem.
 
Hi.
I have this problem while trying to compile the sorce of the nvidia kernel. The error log is listed below.

The kernel source is already installed in my machine, what else I need to have before the 'make install' ?

with regards
--------------------------------------------
cc -c -Wall -Wimplicit -Wreturn-type -Wswitch -Wformat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wcast-qual -Wno-multichar -O -MD -D__KERNEL__ -DMODULE -D_LOOSE_KERNEL_NAMES -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=4191 -DNV_UNIX -DNV_LINUX -DNV_INT64_OK -DNVCPU_X86 -I. -I/lib/modules/2.4.18-18.8.0/build/include -Wno-cast-qual nv.c
In file included from /lib/modules/2.4.18-18.8.0/build/include/linux/config.h:4,
from nv-linux.h:17,
from nv.c:14:
/usr/include/linux/autoconf.h:1:2: #error Invalid kernel header included in userspace
In file included from /lib/modules/2.4.18-18.8.0/build/include/linux/prefetch.h:13,
from /lib/modules/2.4.18-18.8.0/build/include/linux/list.h:6,
from /lib/modules/2.4.18-18.8.0/build/include/linux/module.h:12,
from nv-linux.h:28,
from nv.c:14:
/lib/modules/2.4.18-18.8.0/build/include/asm/processor.h:56: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/lib/modules/2.4.18-18.8.0/build/include/asm/processor.h:56: requested alignment is not a constant
In file included from /lib/modules/2.4.18-18.8.0/build/include/linux/rwsem.h:29,
from /lib/modules/2.4.18-18.8.0/build/include/asm/semaphore.h:42,
from /lib/modules/2.4.18-18.8.0/build/include/linux/fs.h:200,
from /lib/modules/2.4.18-18.8.0/build/include/linux/capability.h:17,
from /lib/modules/2.4.18-18.8.0/build/include/linux/binfmts.h:5,
from /lib/modules/2.4.18-18.8.0/build/include/linux/sched.h:9,
from /lib/modules/2.4.18-18.8.0/build/include/linux/mm.h:4,
from /lib/modules/2.4.18-18.8.0/build/include/linux/slab.h:14,
from nv-linux.h:63,
from nv.c:14:
/lib/modules/2.4.18-18.8.0/build/include/asm/rwsem.h: In function `__down_write_trylock':
/lib/modules/2.4.18-18.8.0/build/include/asm/rwsem.h:177: warning: implicit declaration of function `cmpxchg'
In file included from /lib/modules/2.4.18-18.8.0/build/include/linux/mm.h:12,
from /lib/modules/2.4.18-18.8.0/build/include/linux/slab.h:14,
from nv-linux.h:63,
from nv.c:14:
/lib/modules/2.4.18-18.8.0/build/include/linux/mmzone.h: At top level:
/lib/modules/2.4.18-18.8.0/build/include/linux/mmzone.h:39: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/lib/modules/2.4.18-18.8.0/build/include/linux/mmzone.h:39: requested alignment is not a constant
In file included from /lib/modules/2.4.18-18.8.0/build/include/asm/hardirq.h:6,
from /lib/modules/2.4.18-18.8.0/build/include/linux/interrupt.h:45,
from nv-linux.h:71,
from nv.c:14:
/lib/modules/2.4.18-18.8.0/build/include/linux/irq.h:65: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/lib/modules/2.4.18-18.8.0/build/include/linux/irq.h:65: requested alignment is not a constant
In file included from /lib/modules/2.4.18-18.8.0/build/include/linux/interrupt.h:45,
from nv-linux.h:71,
from nv.c:14:
/lib/modules/2.4.18-18.8.0/build/include/asm/hardirq.h:21: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/lib/modules/2.4.18-18.8.0/build/include/asm/hardirq.h:21: requested alignment is not a constant
In file included from nv-linux.h:71,
from nv.c:14:
/lib/modules/2.4.18-18.8.0/build/include/linux/interrupt.h:128: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/lib/modules/2.4.18-18.8.0/build/include/linux/interrupt.h:128: requested alignment is not a constant
make: *** [nv.o] Error 1
--------------------------------------------------------------------------------------

saqer 12-17-02 02:05 PM

helpppp

bwkaz 12-17-02 02:18 PM

You don't mention your distro, so I will assume that it's an RPM-based one.

Do an rpm -qa | grep source, and then a uname -r. Make sure that the versions of both of these match.

However, it appears from these messages:

Quote:

In file included from /lib/modules/2.4.18-18.8.0/build/include/linux/config.h:4
...
/usr/include/linux/autoconf.h
that your kernel-source package is including the wrong autoconf.h file. You can also try an export BUILD_PARAMS="-nostdinc -I/usr/lib/gcc-libi686-pc-linux-gnu/<gcc version here>/include" if you're using gcc 3 (though you can try it if you're not as well, I just don't know if gcc 2 recognizes the -nostdinc option), before running make. This will add those flags to the cc command line, which might help.

If all else fails, then you might be able to fix it with a kernel reconfigure. Do a make mrproper from the base of the kernel-source directory, then find the config file that matches your hardware and the kernel that you have installed (on RH, it's in the configs/ directory under the kernel-source), copy it to <kernel-source base>/.config, and run make oldconfig dep from the base of kernel-source. Then try the NVIDIA_kernel again.

saqer 12-17-02 03:17 PM

Thank you very much. I have RedHat8.0.

I did the later choice, and the compilation went much further, then an error emerged.


-------------------------------------------------
text data bss dec hex filename
1248089 92760 32940 1373789 14f65d nvidia.o
/lib/modules/2.4.18-18.8.0/kernel/drivers/video/nvidia.o: kernel-module version
mismatch
/lib/modules/2.4.18-18.8.0/kernel/drivers/video/nvidia.o was compiled for kernel version 2.4.18-18.8.0custom
while this kernel is version 2.4.18-18.8.0.
/lib/modules/2.4.18-18.8.0/kernel/drivers/video/nvidia.o: insmod /lib/modules/2.4.18-18.8.0/kernel/drivers/video/nvidi
a.o failed
/lib/modules/2.4.18-18.8.0/kernel/drivers/video/nvidia.o: insmod nvidia failed
make: *** [package-install] Error 255
------------------------------------------------------------------------


Regards

mtrr 12-17-02 03:29 PM

look in the Makefile in your kernel source dir

where it reads EXTRAVERSION = 18.8.0custom

remove the "custom" and repeat the steps bwkaz
advised you to do. (make oldconfig dep)

should work...

cheers

bwkaz 12-17-02 04:48 PM

Yep, remove the custom from the Linux kernel Makefile. You should not have to do anything else with the Linux kernel, either, though, unless you see other problems. In any case, try it and see.

The reaason your Linux kernel Makefile is set up like that is just another instance of RedHat trying not to let you shoot yourself in the foot, but causing other problems. FWIW...


All times are GMT -5. The time now is 09:03 PM.

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