PDA

View Full Version : Redhat 9 kernel-2.4.20.13.9 problem


volteic
05-15-03, 03:04 PM
Hello,
This is my first time using Linux and choose to use redhat 9.
I did the kernel update to 2.4.2.0-13.9 from redhat.
I'm trying to install NVIDIA-Linux-x86-1.0-4363 followed the directions in the readme file, exited X and typed the command and I get this:

ERROR: Unable to find the kernel header files for the currently running kernel.
Please make sure you have installed the kernel header files for your
kernel; on Red Hat Linux systems, for example, be sure you have the
'kernel-source' rpm installed. If you know the correct kernel header
files are installed, you may specify the kernel include path with the
'--kernel-include-path' commandline option.
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.

I looked for the kerner-header but unable to find, also looked in redhat ftp for a kerner-header.rpm but they dont have one.

Any ideas? Any help would be great.

volteic
05-15-03, 03:50 PM
Could some one tell me where to get the kernel-header rpm? or a way to build it?
Please help.

bwkaz
05-15-03, 04:04 PM
You don't use kernel-headers on RH, you use kernel-source instead.

After finding and installing the kernel-source-2.4.20-13.9 package (note that the version has to EXACTLY match your running kernel's version), you will also have to configure the kernel sources -- this is something only RH users have to do. Fun, isn't it? ;)

Anyway, look around in /usr/src/linux-<version>/configs for a config file that matches your running kernel (or, there might well be one in /boot; look there too). Copy it to /usr/src/linux-<version>/.config, then cd into /usr/src/linux-<version> and run make clean oldconfig dep -- the clean may not be necessary, but oh well. After doing that, the sources should be configured -- try the installer again.

volteic
05-15-03, 04:40 PM
Thanx for the post ... I intalled the source and the driver install worked like it should. Wow now I can play tuxracer ^^.

DJSpaceMouse
05-15-03, 07:38 PM
May I ask where you found that kernel-source rpm? I can't seem to find it.

sloncho
05-15-03, 09:53 PM
Hi, its very strange. I have made:
rpm -i kernel-2.4.20-13.9.src.rpm

and strange, it created /usr/src/redhat/SOURCE and SPEC directories
in SOURCE there are some .patch files ?!?! and tar.bz2

but I do not have /usr/src/linux ... and so on ..

where are the headers?
please help

actualy the "problem" is :) lets say - deeper :)

i have had running 20-9 kerlnel. And I do not remember how, but I have installed the sources (maybe) and I have succeded to install nVidia drivers.
But now ... after update ... I have to start the machine with the old kernel to use them. I can not remember what happened, but I thing that in the past I decided that I do not need headers any more and I have deleted everything in /usr/src ... (how smart, uh?)

rflor
05-16-03, 04:43 AM
kernel-2.4.20-13.9.src.rpm is the source rpm,
the rpm used to rebuild the kernel.

You must download

kernel-source-2.4.20-13.9.i386.rpm

the rpm with source kernel.

And by the way don't remove manually
files installed with rpm.
You should use

rpm -e kernel-source

to do a clean package removal.

I think you have to use

rpm -U kernel-source-2.4.20-13.9.i386.rpm

to install the new package.

duvvid
05-16-03, 08:20 AM
Originally posted by bwkaz

After finding and installing the kernel-source-2.4.20-13.9 package (note that the version has to EXACTLY match your running kernel's version), you will also have to configure the kernel sources -- this is something only RH users have to do. Fun, isn't it? ;)


This is not true.

This was only required for one (now outdated) kernel release, due to a packaging bug. The details are in the FAQ section of the NVidia README file.

DJSpaceMouse
05-16-03, 09:31 AM
I finally found the kernel source. It's right here (ftp://updates.redhat.com/9/en/os/i386/kernel-source-2.4.20-13.9.i386.rpm) for anyone else that may be having trouble locating it.

dpw2atox
05-16-03, 11:20 AM
hi I have the same problem as the user above but mine is still not compiling. I installed the Athlon version of the kernel and the kernel-source as well and copied the proper arch for the config file and made it also. Here is the error output.

-> License accepted.
-> There appears to already be a driver installed on your system (version: 1.0-
4363). As part of installing this driver (version: 1.0-4363), the existing
driver will be uninstalled. Are you sure you want to continue? ('no' will a
bort installation) (Answer: Yes)
-> 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: Yes)
-> No matching precompiled kernel interface was found on the NVIDIA ftp site;
this means that the installer will need to compile a kernel interface for
your kernel.
-> Kernel include path: '/lib/modules/2.4.20-13.9/build/include'
-> Cleaning kernel module build directory.
executing: 'cd ./usr/src/nv; make clean'...
rm -f nv.o os-agp.o os-interface.o os-registry.o nv-linux.o nv_compiler.h *
.d NVdriver nvidia.o
-> Building kernel module:
executing: 'cd ./usr/src/nv; make nvidia.o SYSINCLUDE=/lib/modules/2.4.20-13
.9/build/include'...

You appear to be compiling the NVIDIA kernel module with
a compiler different from the one that was used to compile
the running kernel. This may be perfectly fine, but there
are cases where this can lead to unexpected behaviour and
system crashes.

If you know what you are doing and want to override this
check, you can do so by setting IGNORE_CC_MISMATCH.

In any other case, set the CC environment variable to the
name of the compiler that was used to compile the kernel.

*** Failed cc sanity check. Bailing out! ***
make: *** [gcc-check] Error 1
-> 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.
@

alien999999999
05-16-03, 11:56 AM
read what the log says!!!

either set the CC variable or set the IGNORE_CC_MISMATCH variable, else the installation won't do anything...

dpw2atox
05-16-03, 12:04 PM
i don't know how to do that. I upgraded my compiler to 3.2.3 from 3.2.2 and I think thats what is causing my problem. Anyone know how I can make installing the driver work or do I have to manually compile a kernel to make it work?

bwkaz
05-16-03, 01:39 PM
Originally posted by duvvid
This is not true.

This was only required for one (now outdated) kernel release, due to a packaging bug. The details are in the FAQ section of the NVidia README file. I've read that section, and despite what it says, there are different processor architectures that RedHat builds kernels for. They include a config file for each of them in the configs directory.

However, it is completely impossible to configure the actual sources (what make *config does) for more than one architecture at a time. If the sources as you install them are configured for i386 (I don't know if they are or not, but if so), and your running kernel was built against a .config for i686, or whatever, then the driver you build with those sources WILL NOT WORK.

Originally posted by dpw2atox
I upgraded my compiler to 3.2.3 from 3.2.2 and I think thats what is causing my problem. Anyone know how I can make installing the driver work or do I have to manually compile a kernel to make it work? Yes, this is what's causing the problem. Your kernel was compiled with 3.2.3 (or whatever RedHat used...), and your current system compiler is 3.2.2. In this specific case (assuming the numbers as posted were correct, and you downgraded one version), then doing export IGNORE_CC_MISMATCH=1 and then rerunning the installer should work.

However, if anyone in the future reads this and thinks "oh, I can just export IGNORE_CC_MISMATCH", no, you probably can't. There are MAJOR differences between compiler versions, especially gcc 2 to gcc 3, but even between 3.1 and 3.2, that will cause driver problems. The correct solution is to recompile the kernel with the system compiler, then boot to it, but if (and ONLY if) the two compilers in question are similar enough, you can ignore the mismatch.

dpw2atox
05-16-03, 01:52 PM
thanks for the info. Im at work right now and will try that when I get home. Only thing was you got what I said reversed. I have Gcc 3.2.3 and redhat compiled the kernel with 3.2.2 thats all. I got the update from rawhide because it has some bug fixes and I got tired of waiting on redhat to release 3.2.3 for redhat 9 officially.

dpw2atox
05-16-03, 03:19 PM
it worked thanks a bunch man

duvvid
05-16-03, 10:24 PM
Originally posted by bwkaz
I've read that section, and despite what it says, there are different processor architectures that RedHat builds kernels for. They include a config file for each of them in the configs directory.

They're provided as a starting point for newbies, and to satisfy peoples curiosity.


However, it is completely impossible to configure the actual sources (what make *config does) for more than one architecture at a time. If the sources as you install them are configured for i386 (I don't know if they are or not, but if so), and your running kernel was built against a .config for i686, or whatever, then the driver you build with those sources WILL NOT WORK.

With the Red Hat kernel tree from the kernel-source RPM, IT DOES WORK. It has been patched to ensure it works.

But don't take my word for it - go download (http://updates.redhat.com/9/en/os/i386/kernel-source-2.4.20-13.9.i386.rpm) the Red Hat kernel-source RPM and see for yourself. Pay close attention to include/linux/rhconfig and what it does.

bwkaz
05-17-03, 09:09 AM
I can't install RPMs.

Anyway, OK, maybe you don't have to do it now. Who's to say it doesn't get screwed up again in the future?