nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=14)
-   -   gcc-3.2.2 & nv drivers4191 (http://www.nvnews.net/vbulletin/showthread.php?t=7358)

maynon 02-10-03 01:18 AM

gcc-3.2.2 & nv drivers4191
 
homebased distro compiled with gcc-3.2.2.distro works well. NV drivers 4191 compile well but cannot load modules.Says modules have no symbols.
Same distro based on gcc-3.2.1 works well.
Modules present in lib/modules and usr/X11R6xxxx. please comment and help. Gcc-3.2.2 just out.

bwkaz 02-10-03 09:13 AM

Post what you get when doing a make from a clean 4191 source tree. It may be that the "no symbols" message you referred to (side note: what is the EXACT text of the error?) is a mismatch between the kernel headers that were used and the running kernel. Which might be caused by the NVIDIA_kernel make using the wrong include path. Maybe.

maynon 02-10-03 07:21 PM

gcc-3.2.2 & nv drivers
 
thanks BWKAZ. my distro is based on lfs and slackware. Lfs installs headers without symlinks permanently -kernel -2.4.20. I will remove the headers and symlink to the kernel I am using- again 2.4.20 and try and compile the drivers. If again errors will post exact messages.'Thanks again.

bwkaz 02-10-03 10:05 PM

Yeah, LFS does some strange things with the headers that get put into /usr/include/linux. You have to make sure that you're booted into your LFS kernel (not in chroot), and that the /lib/modules/<kernel version>/build symlink exists and points to the correct, configured, and built kernel source tree (mine, for reference, is /usr/src/linux-2.4.20). The nVidia Makefile looks for include files in /lib/modules/$(uname -r)/build/include, then in /usr/src/linux/include (which might still work, but isn't as foolproof), then in /usr/include, which is almost always wrong. I've noticed that sometimes, I have to recompile my kernel after booting to the LFS kernel for the first time, too, and I'm not positive why. Maybe the build symlink is broken? I don't know.

maynon 02-11-03 11:04 AM

gcc-3.2.2 & nv drivers problem solved
 
It was as you said. i deleted asm, asm-generic, and linux in /usr/include and symlinked to kernel in /usr/src/linux and compiled the drivers successfully. and it works. many thanks again , bwkaz

bwkaz 02-11-03 11:21 AM

Re: gcc-3.2.2 & nv drivers problem solved
 
Quote:

Originally posted by maynon
It was as you said. i deleted asm, asm-generic, and linux in /usr/include and symlinked to kernel in /usr/src/linux
Uh... that's not what a lot of things are expecting, though. Most stuff that needs the "kernel headers" in /usr/include is not really looking for the headers of the currently-running kernel. Most packages that look in /usr/include/asm require the headers that glibc was compiled against. See the part of the LFS book that comes right before the part where the headers get copied over.

What you need to do is make actual directories, /usr/include/asm and /usr/include/linux, that have the kernel headers that were there when glibc was compiled. Then, make sure that NOTHING in /usr/include points at your kernel source. Then, make sure that /lib/modules/<kernel version>/build DOES point at your current kernel source. Once that's set up, recompile the nVidia drivers (with a make clean, then a make), and they should find the right directory.

What you did will work, but only for the moment. It will fail as soon as you change kernels, then compile something else (i.e. NOT the nVidia drivers) that needs to know what the kernel looked like when glibc was compiled. And to make things even worse, that other thing probably will compile correctly, but will segfault (or worse) when it's run.

maynon 02-11-03 10:40 PM

gcc-3.2.2 & nv drivers
 
thanks once again bwkaz. I have taken note and will adjust accordingly. Will do another lfs just for practise including what you said. I have retired and taken up linux for a hobby to keep my mental processes going. Regards and best wishes.

bwkaz 02-12-03 07:54 AM

Re: gcc-3.2.2 & nv drivers
 
Quote:

Originally posted by maynon
Will do another lfs...
I know the feeling... it took three or four times installing it before I got things the way I wanted them.

Good luck!

:)


All times are GMT -5. The time now is 08:17 PM.

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