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

Newegg Daily Deals

Reply
 
Thread Tools
Old 12-17-02, 08:22 AM   #1
saqer
Registered User
 
Join Date: Dec 2002
Location: USA
Posts: 81
Default 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 is offline   Reply With Quote
Old 12-17-02, 01:05 PM   #2
saqer
Registered User
 
Join Date: Dec 2002
Location: USA
Posts: 81
Default

helpppp
saqer is offline   Reply With Quote
Old 12-17-02, 01:18 PM   #3
bwkaz
Registered User
 
Join Date: Sep 2002
Posts: 2,262
Default

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.
__________________
Registered Linux User #219692
bwkaz is offline   Reply With Quote
Old 12-17-02, 02:17 PM   #4
saqer
Registered User
 
Join Date: Dec 2002
Location: USA
Posts: 81
Default

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
saqer is offline   Reply With Quote
Old 12-17-02, 02:29 PM   #5
mtrr
Registered User
 
Join Date: Jul 2002
Location: Germany
Posts: 234
Send a message via ICQ to mtrr
Default

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
mtrr is offline   Reply With Quote
Old 12-17-02, 03:48 PM   #6
bwkaz
Registered User
 
Join Date: Sep 2002
Posts: 2,262
Default

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...
__________________
Registered Linux User #219692
bwkaz 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 Showcases GPU Breakthroughs at IBC 2012 News Archived News Items 0 09-07-12 10:10 AM
NVIDIA and J├╝lich Join Forces to Drive GPU Computing Innovation News Archived News Items 0 06-18-12 09:50 PM
Problem connecting Pioneer VSX-S300 to Nvidia Ion - flat panel scaling solves it? wild_oscar NVIDIA Linux 3 06-17-12 07:18 AM
Rumor regarding lack of 680 availability ViN86 Rumor Mill 6 05-09-12 04:48 PM
Nvidia Go on laptop, black border within XFree86 problem raxip NVIDIA Linux 3 07-31-02 10:58 AM

All times are GMT -5. The time now is 12:59 AM.


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