PDA

View Full Version : Trouble rebuilding the NVIDIA_kernel..SRPM


treinar
09-28-02, 07:20 AM
I have downloaded the kernel SRPM and GLX RPM. When trying rpm --rebuild NVIDIA_kernel...SRPM, I receive this error (excerpt - whole error message attached (result.txt)):


/usr/include/linux/version.h:3:2: #error "You should not include /usr/include/{linux,asm}/ header"
/usr/include/linux/version.h:4:2: #error "files directly for the compilation of kernel modules."
/usr/include/linux/version.h:5:2: #error ""
/usr/include/linux/version.h:6:2: #error "glibc now uses kernel header files from a well-defined"
/usr/include/linux/version.h:7:2: #error "working kernel version (as recommended by Linus Torvalds)"
/usr/include/linux/version.h:8:2: #error "These files are glibc internal and may not match the"
/usr/include/linux/version.h:9:2: #error "currently running kernel. They should only be"
/usr/include/linux/version.h:10:2: #error "included via other system header files - user space"
/usr/include/linux/version.h:11:2: #error "programs should not directly include <linux/*.h> or"
/usr/include/linux/version.h:12:2: #error "<asm/*.h> as well."
/usr/include/linux/version.h:13:2:

..then follows an explanation of what I should do with the makefile (see attached file result.txt).

I am not an expert on this. What is wrong? What should I do? Is there only to wait for the prebuild RPM from NVIDIA?

treinar
09-28-02, 07:21 AM
...I forgot: this is regarding the NVIDIA GeForce2Go, on a freshly installed Mandrake Linux 9.0.

bwkaz
09-28-02, 07:53 AM
There seem to be a lot of people getting this error.

Do you have kernel-source installed? rpm -qa | grep kernel should have it listed.

treinar
09-28-02, 08:20 AM
...rpm -qa | grep kernel gave this output

kernel-2.4.19.16mdk-1-1mdk
kernel-headers-2.4.18-41mdk

...does that mean that the source is installed?

Locklear93
09-28-02, 10:30 AM
I believe it does. And add me to the list of people suffering from this error. :/

mtrr
09-28-02, 10:49 AM
install the kernel-source as suggested. you have the
headers, and the kernel-image, but no sources...

do a "ls -lad /lib/modules/`uname -r`/build" what do you see?


cheers

Locklear93
09-28-02, 11:04 AM
Well, if that's not the whole problem, it's a big honkin' chunk of it. When I did as you asked, I got information that build was a symbolic link, and pointed to "../../../usr/src/linux-2.4.19-16mdk" Sensing something was amiss (the symlink had a red background--broken) I went to /usr/src/ and found only an RPM directory, no linux anything.

This really irritates the crap out of me, as I specifically selected development when installing Mandrake 9, and got 500 MB worth of files. I've always had kernel sources installed before when installing Mandrake, and don't know why, with 9, I wouldn't. Well, I'm off to try and install those sources... thanks very much, and I'll come back and whine some more if this doesn't help. :rolleyes:

mtrr
09-28-02, 12:05 PM
devel environment doesn't necessarily mean kernel sources to be included.
if you're curious about the kernel version mandrake (and probably RH) took to
build glibc do "/lib/libc.so.6".

they also changed some content of those includes, therefore the error messages during compile.

cheers

Locklear93
09-28-02, 12:52 PM
Well, after looking all over both CD-ROMs, I haven't been able to locate the source for the kernel... which could explain why it wasn't installed. RPMfind.net appears to be down, so I can't find the kernel source package there, and Mandrake's website doesn't seem to be helpful either. I could get the 2.4.19 source code elsewhere, but it wouldn't be the mdk version, and I don't really want to be using sources from a different version of the kernel for compiling--and I'm DEFINITELY not comfortable building and replacing my kernel myself to make it match...

So, anyone have an idea of where I can find the source for 2.4.19-16mdk?

treinar
09-28-02, 04:58 PM
The kernel-source rpm is found on the 3rd download ISO. if you do urpmi -ivh kernel-source..blabla.rpm, then you see that libncurses-develop-something.rpm is needed too. You find it on CD #2. After the kernel-source was installed, the NVIDIA-kernel-rpm built just fine. So it works great!

Thanks a lot for your help!:D

Locklear93
09-28-02, 07:59 PM
I second that. Installing the kernel sources solved all of the problems, thanks all for your help. What I wanna know is why, on an operating system where a LOT of software is compiled by the end user, they'd not make the source install by default. :p

Thanks again!

mtrr
09-28-02, 09:37 PM
easy answer: the "end user" is not meant to build/compile software
that tinkers with the hardware, way toooo complicated :)


seems to be the way distributors think (nb: kernel sources are not
default on RH, SuSE, Debian...)


cheers

Locklear93
09-28-02, 10:35 PM
Blah, then they think wrong. :) Provided the hardware manufacturer does a decent job, compiling a module to drive a piece of hardware is usually EASIER (in my experience) than compiling a program from a CVS tree or the like. Hell, in my first six months of Linux use, a few years back, I was able to compile a module to drive a Realtek ethernet card, back before that hardware was supported by Slackware (which I was using at the time). If a TOTAL Linux newbie (I'm now an experienced idiot...) can do it, they ought not consider it too hard. Nonetheless, thanks again for the help and the info. I've now got the UT demo working nicely in Linux, except for messy sound, which they blame on ALSA and suggest I use SDL for sound. Not that they tell me how, but neither this thread nor this forum is about sound concerns. :)

mtrr
09-28-02, 11:23 PM
this should do the trick for sdl-sound:

echo -n "(define devices '(sdl))" ~/.openalrc

cheers


btw: /me never uses a prebuild kernel,
sometimes not even for bootstrapping a machine.
and _no_ chip is worse than rtl81x, fscked
design, look in the etherboot driver source :)

Locklear93
09-29-02, 01:29 AM
Thanks! I'll give that a try in the morning, when the sound won't get me shot by my wife, instead of the UT2k3 bots. ;)

As for not using a pre-built kernel, I'd build my own if I were competant to do so, but until I have a spare partition to set up a seperate boot that I can play with, it's not worth the effort to me. And I'm no longer using the Realtek ethernet card--it was a cheap POS my father was willing to shell out for before I went to college. ;)

Current project: Codecs for mplayer... that's what I love about Linux--always something to learn. :)

flanger
09-29-02, 05:25 AM
Originally posted by treinar
The kernel-source rpm is found on the 3rd download ISO. if you do urpmi -ivh kernel-source..blabla.rpm, then you see that libncurses-develop-something.rpm is needed too. You find it on CD #2. After the kernel-source was installed, the NVIDIA-kernel-rpm built just fine. So it works great!

Thanks a lot for your help!:D

Alright, the kernel source did seem to built fine (no error messages), but when i do rpm -i /home/lieven/Desktop/NVIDIA_GLX-1.0-3123.i386.rpm
it gives me this error message:

error: failed dependencies:
NVIDIA_kernel is needed by NVIDIA_GLX-1.0-3123

i installed the kernel-source and libncurses correctly

Anyone that can help? :)

bwkaz
09-29-02, 07:47 AM
Originally posted by flanger
i installed the kernel-source and libncurses correctlyDid you also install the NVIDIA_kernel RPM, before the NVIDIA_GLX one? If you installed the nVidia kernel package from .tar.gz rather than RPM, then you have to install the GLX from source as well. If you haven't installed it at all, do it.

treinar
09-30-02, 01:49 PM
Alright, the kernel source did seem to built fine (no error messages), but when i do rpm -i /home/lieven/Desktop/NVIDIA_GLX-1.0-3123.i386.rpm it gives me this error message:

error: failed dependencies:
NVIDIA_kernel is needed by NVIDIA_GLX-1.0-3123

i installed the kernel-source and libncurses correctly

Anyone that can help?

After the kernel source and libncurses is installed, you must do four things:
1. rpm --rebuild NVIDIA_kernel-1.0-3123.src.rpm
2. Check for output from that command, look after "Wrote [somepath]/NVIDIA_kernel-1.0-3123[something].rpm"
3. rpm -ivh [somepath]/NVIDIA_kernel-1.0-3123[something].rpm
4. rpm -ivh NVIDIA_GLX-1.0-3123.i386.rpm

Hope this helps

SubTexel
09-30-02, 01:52 PM
Ok for those of you who do wish to install the nvidia drivers using the SOURCE rpms heres what you do:

First you need rpmbuild installed, as well as your kernel source files...If not, it wont work (most all distros come with rpmbuild installed already, so you shouldnt have to worry about that one..) If you dont have the kernel source files install them (located on your distro's cd somewhere

Ok, download the source files (glx, and kernel) This part is a no brainer.

1: Load up (place your choice of terminal here) and log in as root (su root) if you arent already.

2: Go to the directory where you downloaded the files and type:

rpmbuild --rebuild NVIDIA*

Now this will save the files to /usr/src/RPM/RPMS/i586/ so you'll need to change to that directory to install the compiled sources.

3: Once in /usr/src/RPM/RPMS/i586/
(note: It might also save them in a different directory under /RPMS/ eg:Athlon, i486, i686 etc.. depending on your processor)

Type the following:

rpm -ivh NVIDIA*

If you get an errror saying that they are already installed type the following:

rpm -ivh --replacepkgs NVIDIA*

and watch it install...

4: Next you need to modify your XF86Config-4 file... Change to /etc/X11/ and either pico (or emacs) XF86Config-4 and put these in:

Find the Modules Section:
and type Load "/usr/X11R6/lib/modules/extensions/libglx.so"
You can also do as the other people have posted and put

Load "glx"
But I perfer putting the whole path as to avoid any problems.

Next go to the "Drivers" part of the file and replace whatever is in the Driver section and put "nvidia"

5: Now you can run either gdm (if you have GNOME) or startx (if in command line mode, wouldnt do it if your still in X hehe, just a little warning...)

And enjoy!

Now for those people who have the enterprise kernel you need to recompile the sources.. and then run
rpm -ivh --replacepkgs NVIDIA* command to reinstall the new packages for your enterprise kernel.

Locklear93
09-30-02, 02:05 PM
Actually, it seems to work just fine with rpm's --rebuild argument. Didn't need rpmbuild here.

SubTexel
09-30-02, 03:15 PM
Yeah, either way will work...