PDA

View Full Version : make install error for the NVIDIA_kernel-1.0-3123


yetouse
10-23-02, 06:41 PM
here is my shell :
------------------------------------------------------------------------------

root@yannick src]#> cd NVIDIA_kernel-1.0-3123

root@yannick NVIDIA_kernel-1.0-3123]#> ls
Makefile README nv-ids.h nv-misc.h nv.h nvtypes.h os-interface.h rmretval.h
Module-nvkernel makedevices.sh nv-linux.h nv.c nv_ref.h os-interface.c os-registry.c

root@yannick NVIDIA_kernel-1.0-3123]#> make install

echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -1`\" > nv_compiler.h
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 -DRM_HEAPMGR -D_LOOSE_KERNEL_NAMES -D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHLEVEL=3123 -DNV_UNIX -DNV_LINUX -DNVCPU_X86 -I. -I/usr/src/linux/include -Wno-cast-qual nv.c
In file included from /usr/include/linux/prefetch.h:13,
from /usr/include/linux/list.h:6,
from /usr/include/linux/module.h:12,
from nv-linux.h:28,
from nv.c:14:
/usr/include/asm/processor.h:56: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/asm/processor.h:56: requested alignment is not a constant
In file included from /usr/include/asm/hardirq.h:6,
from /usr/include/linux/interrupt.h:45,
from nv-linux.h:64,
from nv.c:14:
/usr/include/linux/irq.h:65: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/linux/irq.h:65: requested alignment is not a constant
In file included from /usr/include/linux/interrupt.h:45,
from nv-linux.h:64,
from nv.c:14:
/usr/include/asm/hardirq.h:16: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/asm/hardirq.h:16: requested alignment is not a constant
In file included from nv-linux.h:64,
from nv.c:14:
/usr/include/linux/interrupt.h:128: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
/usr/include/linux/interrupt.h:128: requested alignment is not a constant
make: *** [nv.o] Error 1
root@yannick NVIDIA_kernel-1.0-3123]#>
-------------------------------------------------------------------------

What can i do ?

i use the kernel linux-2.4.19.tar.bz2

I have no probl witn the NVIDIA_GLX-1.0-3123 package ...


THX

YeToUsE

bwkaz
10-23-02, 07:37 PM
Have you touched your kernel source directory since you built the kernel? If not, you can try putting the #define that it's looking for in one of the kernel source files, but I believe it should have gotten put there by either {menu,x}config or dep.

yetouse
10-24-02, 03:45 AM
bwkaz - Could you be more explicit .

What are the exact options i need in the kernel (config) ?
In witch subfolder (folder) i keep the kernel src?
What are the exact options in the host.def before compiling the XFree 4.2.1?
When should i put (make install) the NVidia binaries?

Thx

yannick

bwkaz
10-24-02, 08:47 AM
Originally posted by yetouse
What are the exact options i need in the kernel (config) ?This depends entirely on your hardware and what you want your kernel to be able to do. As a minimum requirement for this driver, I'd say enable AGP support (as a module), and say yes to whichever chipset you have. But I can't tell you about anything else there, because a lot of it depends on what you have, and how your distro's init scripts are going to do stuff. And please don't post the init scripts or anything like that, because that kind of thing doesn't affect the nVidia drivers.

In witch subfolder (folder) i keep the kernel src?You keep kernel-source in the directory it put itself in when you installed it. It really doesn't matter. However, most people put it in /usr/src/linux-<version>, and then symlink /usr/src/linux to that directory. ln -sf linux-whatever linux

What are the exact options in the host.def before compiling the XFree 4.2.1?I have no idea. It depends on your hardware, again, and what optimizing options you want, and what other libraries (like zlib) you have installed, and a myriad other things. You also don't need XFree86's source for the nVidia drivers, so I'm not quite sure what you're trying to do here.

When should i put (make install) the NVidia binaries? When you type "make install", the Makefile tells make where to put the binaries. You don't really have to know or, really, care -- unless it's wrong. But I haven't seen it be wrong in quite some time, perhaps never. It will copy the NVdriver file into /lib/modules/<your kernel version goes here>/kernel/drivers/video, probably, but that depends a little on your distro as well.

Oh, wait a minute, I think I misread that. You're asking when to type "make install"? That would be after you've done the following:

1) Extracted the NVIDIA_kernel-whatever-it-is.tar.gz file.

2) cd'ed into the new directory that got created.

3) Done a make as your normal user (NOT as root), and made sure no errors were reported (however, I believe this is where you're seeing the "CONFIG_X86_L1_CACHE_SHIFT" message, so you will get errors here until you fix that problem).

4) Done a su and typed in your root password when asked.

For the NVIDIA_GLX-whatever-it-is.tar.gz, just extract it, cd into the directory, su to root, and make install.

To fix the CACHE_SHIFT problem with #3 above, it would seem that you need to make the driver look for your include files in the correct place. To do this, you need to first, make sure that /lib/modules/<whatever kernel version you're running>/build is a symlink to the correct kernel source tree. ls -l /lib/modules/$(uname -r)/build will tell you where it's pointing -- it should be a cyan color, not flashing on a red background. If it's flashing on a red background, that means you need to reinstall the proper kernel-source in wherever it's looking for it, and reconfigure that kernel the same way you configured the kernel that you're running.

Once that happens, if it still complains, then try a make clean followed by a make EXTRA_DEFINES=-nostdinc, that might help.