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

Newegg Daily Deals

Reply
 
Thread Tools
Old 09-21-02, 02:39 AM   #1
Scorched
Registered User
 
Join Date: Sep 2002
Posts: 8
Send a message via AIM to Scorched
Question Compiling Errors In Debian

The first error I received occurred when I tried to compile the kernel module tarball. It was the compiler mismatch error. I remedied this problem by installing the correct compiler version, and putting CC=gcc272 into the command line. However, the module still isn't compiling , and I don't have a clue why. I have a Geforce 3 Ti 500, and I'm using Debian 3.0. Here's the script I recorded of of the errors.

debian:/nvidia/NVIDIA_kernel-1.0-3123# CC=gcc272 make install
gcc272 -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 nv.c:14:
nv-linux.h:24: linux/modversions.h: No such file or directory
make: *** [nv.o] Error 1
debian:/nvidia/NVIDIA_kernel-1.0-3123#
Scorched is offline   Reply With Quote
Old 09-21-02, 09:57 AM   #2
Richard999
Registered User
 
Join Date: Aug 2002
Posts: 22
Default

The problem is, in order for the NV package to compile it requires the kernel headers.

$uname -r

This will give you information about the kernel you are using.

$su
$(password)

#apt-get install kernel-headers-(given by uname -r)

example...
#apt-get install kernel-headers-2.4.18-686

Once you have the headers installed on your machine you can soft link the /usr/src/kernel-headers-2.4.foo-bar to linux

#ln -s /usr/src/kernel-headers-2.4.foo-bar /usr/src/linux

Now do a make clean in the NVIDIA dir. And make install.

You also have the option of doing the following.

~/NVIDIA_kernel-1.0-3123#make SYSINCLUDE=/usr/src/kernel-headers-2.4.foo-bar/include


Hope this helps.
Richard999 is offline   Reply With Quote
Old 09-23-02, 05:14 PM   #3
Scorched
Registered User
 
Join Date: Sep 2002
Posts: 8
Send a message via AIM to Scorched
Default

Ok, I followed your directions, but I'm getting new errors:

debian:/nvidia/NVIDIA_kernel-1.0-3123# CC=gcc272 make install
gcc272 -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
cc1: Invalid option `-Wreturn-type'
cc1: Invalid option `-Wno-multichar'
make: *** [nv.o] Error 1
debian:/nvidia/NVIDIA_kernel-1.0-3123#

The default nv driver in XFree86 4.1.0 doesn't work at all. When I type startx, it says "no screens found." I've tried installing these nvidia drivers in the *.deb packages, but that involves re-compiling the kernel, and I keep getting errors while doing that as well. Do you know any helpful guides that thoroughly explain kernel-package, or another simplistic way to compile kernels?
Scorched is offline   Reply With Quote
Old 09-23-02, 09:11 PM   #4
bwkaz
Registered User
 
Join Date: Sep 2002
Posts: 2,262
Default

Maybe if you upgrade your compiler? I see you're using the 2.7.2 version of gcc... the kernel for one, and probably some other things as well, are no longer working around bugs in the 2.7 series of gcc's. Perhaps an update to 2.95.3 is in order? I know that will compile the kernel, and my guess is that using that compiler will fix the problems with the nVidia kernel as well...

If all else fails, get rid of 2.7.2 completely and install 2.95.3, then recompile your kernel, then recompile the nVidia driver. My guess is that you're using the special CC because otherwise the versions won't match?
__________________
Registered Linux User #219692
bwkaz is offline   Reply With Quote
Old 09-23-02, 09:28 PM   #5
Scorched
Registered User
 
Join Date: Sep 2002
Posts: 8
Send a message via AIM to Scorched
Default

I got rid of gcc 2.7.2 all together. That's why I re-compiled the kernel so I wouldn't have to mess with the older version.
Scorched is offline   Reply With Quote
Old 09-23-02, 09:29 PM   #6
Scorched
Registered User
 
Join Date: Sep 2002
Posts: 8
Send a message via AIM to Scorched
Default

Here's an update of my current situation.

Debian 3.0
Linux version 2.4.18
XFree86 4.1.0
GeForce 3 Ti 500

The first error I received was the compiler mismatch error. I remedied this by re-compiling the kernel. This was my first time so I'm not sure if I did it correctly, but I didn't receive any errors. The next error was:

In file included from nv.c:14:
nv-linux.h:24: linux/modversions.h: No such file or directory
make: *** [nv.o] Error 1

Someone told me on a forum that I needed the kernel header files. I installed the kernel-headers-2.4.18 package, but I wasn't sure where to go from there, so I copied the directory /usr/src/kernel-headers-2.4.18/include/linux to the nvidia directory. I did this because it contained the modversions.h file, along with other headers. When I entered make install, it compiled for a little while, then gave the error:

depmod: *** Unresolved symbols in /lib/modules/2.4.18/kernel/drivers/video/NVdriver
make: *** [package-install] Error 1

So I don't have a clue what to do anymore. I don't want to crawl back to Red Hat. Debian is a very efficient system, and I just want my graphics to work correctly.
Scorched is offline   Reply With Quote
Old 09-24-02, 03:43 AM   #7
Neko
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Scorched
Here's an update of my current situation.

Debian 3.0
Linux version 2.4.18
XFree86 4.1.0
GeForce 3 Ti 500

[...]
So I don't have a clue what to do anymore.
OK, here's what to do in easy steps. At least it worked for me

I assume you did not kompile a fresh kernel - if you did so, the steps are a little bit different.

Get the kernel-headers of the kernel you use. Be sure to pick the right flavor (e.g. I needed 2.4.18-k7). Get the nvidia-packages from Debian. Get the fakeroot package. Get the pgpgpg-package and by typing "gpg --gen-key" generate a key if you do not already have one.

Now be sure to be connected to the internet. Set a proxy if necessary by typing "export http_proxy=http://<fill in your proxy address>

Install MesaGL and MesaGL-dev:
$ apt-get install xlibmesa3
$ apt-get install xlibmesa3-dev

Remove any Glide-packages:
$ apt-get remove '.*glide.*'

Now unpack the Nvidia-kernel-source-package:
$ tar zxvf nvidia-kernel-src.tar.gz

That's it for preparation. Now let's build the packages. Caution : your internet connection has still to be up!

$ cd /usr/src/nvidia-glx-1*
$ dpkg-buildpackage -us -uc -rfakeroot

This should start a script that downloads the binary from Nvidia and builds a GLX-driver-package.

When you unpacked the nvidia-kenel-source-package you might have noticed that you now have a directory called "modules":

$ cd /usr/src/modules/nvidia-kernel-*
$ debian/rules kdist KSRC=/usr/src/kernel-headers-2.4.18-<flavor> KVERS=2.4.18-<flavor>

If everything went right you should now have 3 *.deb-packages in /usr/src.
Now just install them by typing

$ dpkg -i /usr/src/nvidia-*deb

Done
  Reply With Quote
Old 09-24-02, 06:20 AM   #8
Scorched
Registered User
 
Join Date: Sep 2002
Posts: 8
Send a message via AIM to Scorched
Default

I read the /usr/share/doc on the latest drivers, and it described something similar to your method. I tried it, and I still received:

depmod: *** Unresolved symbols in /lib/modules/2.4.19/kernel/drivers/video/NVdriver

but without the make: *** [nv.o] Error 1

I turned off the frame buffer, so now the default drivers that come with XFree86 are allowing me to use X Windows. But I still want the accelerated graphics drivers. I'm getting closer.

I'm not sure which of these methods I'm supposed to follow though:

------> README.Debian.gz <------
nvidia-kernel-src for Debian
----------------------------

*** INPORTANT BUILDING INSTRUCTIONS AND INFORMATION ***

There are TWO ways to build the nvidia-kernel package. Which one depends on
your situation with your kernel.

METHOD #1: You are running a Debian suppiled kernel or built a
kernel-headers package along with your own self-built kernel.

METHOD #2: You are running your own self-built kernel built from kernel
source.

Which method you choose really depends on what kernel headers you wish to
use, those from a kernel-headers package or those from kernel
source (from which you built your own kernel).

As mentioned above, if you are running a Debian suppiled kernel you will
probably want to choose METHOD #1. If you compile your own kernels, METHOD #2.


PRELIMINARY:
- Decide where you want to build your module. By default it
will build under /usr/src like other kernel modules but you may choose
to build it under your home directory as some people prefer and writing to
/usr violates the FHS.

- During the building step the file NVIDIA_kernel-1.0-3123.tar.gz will be
downloaded via wget from NVIDIA's website to
<YOUR BUILD LOCATION>/modules/nvidia-kernel-1.0.3123 if it isn't there
already. This file contains the actual driver files.
If you don't have network access on the machine you are building on
you need to download from
http://download.nvidia.com/XFree86_4....0-3123.tar.gz
and put the file in <YOUR BUILD LOCATION>/modules/nvidia-kernel-src-1.0.3123
before building.

- You may specify another location to place the downloaded file with
the DOWNLOAD_DIR environment variable.


METHOD #1 Using a kernel-headers package
************************************************** *********************

As root (or using fakeroot)
1. cd /usr/src
tar xzvf nvidia-kernel-src.tar.gz -C <YOUR BUILD LOCATION>
(It will install in <YOU BUILD LOCATION>/modules)
- or -
tar xzvf nvidia-kernel-src.tar.gz (if building in /usr/src)

3. Find out your kernel version:

uname -r For example: 2.4.18-k7

4. Download and install package: kernel-headers-2.4.18-k7
It will install in /usr/src/

5. Set some environment variables (if bash is your shell):

export KSRC=/usr/src/kernel-headers-2.4.18-k7
export KVERS=2.4.18-k7

6. Then build nvidia-kernel package:

cd <YOUR BUILD LOCATION>/modules/nvidia-kernel-1.0.3123
debian/rules binary_modules

7. Install the nvidia-kernel package:

dpkg -i ../../nvidia-kernel-2.4.18-k7_1.0.3123-1+_.Custom_i386.deb
( or similar filename )

METHOD #2: Using your own kernel source headers
************************************************** *********************

To build the nvidia-kernel deb you need to first make sure you have
kernel-package installed, then do the following:

As root
1. cd /usr/src
tar xzvf nvidia-kernel-src.tar.gz -C <YOUR BUILD LOCATION>
(It will install in <YOU BUILD LOCATION>/modules)
- or -
tar xzvf nvidia-kernel-src.tar.gz (if building in /usr/src)

2. If you are NOT using the default modules location /usr/src/modules
then you must set an environment variable that points to your modules
location.

export MODULE_LOC=<YOUR BUILD LOCATION>/modules

This is needed by make-kpkg which is used later. If
<YOUR BUILD LOCATION> is /usr/src there is no need to set this.

3. Build the modules under MODULE_LOC i.e. <YOU BUILD LOCATION>/modules

cd linux (or your kernel source directory)
make-kpkg modules_image

4. Install the nvidia-kernel package:

cd <YOUR BUILD LOCATION> (e.g. /usr/src)
dpkg -i nvidia-kernel-KVER*.deb

Notes for method #2:
- If you are building a kernel and the nvidia module at the same time AND
are running a kernel built with a different version the NVIDIA kernel module
build will fail on a compiler check UNLESS the environment variable
IGNORE_CC_MISMATCH is set. The check is to prevent users from compiling the
module with a different compiler than that which compiled the kernel. But if
you are building a kernel you plan on running set the variable.

- It is advised not to clean the kernel source tree between
"make-kpkg kernel_image" and "make-kpkg modules_image".

- The Riva framebuffer is known to conflict with the nvidia X driver. If you
are using X it would be wise not to compile it in. The vesa framebuffer is
known to work slow but fine.

GENERAL NOTES:

Also you must add any users who wish to use OpenGL applications to the group
video. You can do this with:

adduser username video

Also note for AGP issues and further information please see the NVIDIA
README file (README.gz) in the nvidia-glx package that is built from
nvidia-glx-src

An old NVdriver might be already loaded (run 'lsmod' to check) so
do 'rmmod NVdriver' to remove the module from memory.

For any news on this package check http://people.debian.org/~rdonald and
http://bugs.debian.org/nvidia-kernel-src
Scorched is offline   Reply With Quote

Old 09-24-02, 07:32 AM   #9
Neko
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Scorched
I read the /usr/share/doc on the latest drivers, and it described something similar to your method. I tried it, and I still received:

depmod: *** Unresolved symbols in /lib/modules/2.4.19/kernel/drivers/video/NVdriver

but without the make: *** [nv.o] Error 1

I turned off the frame buffer, so now the default drivers that come with XFree86 are allowing me to use X Windows. But I still want the accelerated graphics drivers. I'm getting closer.

I'm not sure which of these methods I'm supposed to follow though:
That's strange - it worked on two machines (Geforce2 and Geforce4) where I tried it...

The method to use depends on your kernel: is it Debian-supplied (unlikely , as you have a 2.4.19) or did you compile it yourself?

With a self-compiled kernel you have to do
$ cd /usr/src/kernel-source-2.4.1x-<flavor if any>
$ make-kpkg modules_image

instead of the "$ debian/rules"-thingy in /usr/source/modules

Does that work for you?

If you still get unresolved symbols try
$ depmod -a
  Reply With Quote
Old 09-25-02, 12:29 AM   #10
Scorched
Registered User
 
Join Date: Sep 2002
Posts: 8
Send a message via AIM to Scorched
Default

Do I need to run depmod -a in any particular directory, such as my kernel source?

Someone reported the same bug to the debian team, and they classify it as important. Perhaps he needs to run depmod -a. I just hope it's as simple as that.

http://bugs.debian.org/nvidia-kernel-src

I think modules are what's the most confusing to me. When I used the command "make modules_image" a while back, it never produced the nvidia-kernel-src-KVER*.deb file they refer to in the instructions. I don't have time to mess with it right now, but hopefull I"ll get it resolved. I'm just happy I have X working. Thanks for your help.
Scorched is offline   Reply With Quote
Old 09-25-02, 01:12 AM   #11
Neko
Guest
 
Posts: n/a
Default

Quote:
Originally posted by Scorched
Do I need to run depmod -a in any particular directory, such as my kernel source?

Someone reported the same bug to the debian team, and they classify it as important. Perhaps he needs to run depmod -a. I just hope it's as simple as that.

http://bugs.debian.org/nvidia-kernel-src

I think modules are what's the most confusing to me. When I used the command "make modules_image" a while back, it never produced the nvidia-kernel-src-KVER*.deb file they refer to in the instructions. I don't have time to mess with it right now, but hopefull I"ll get it resolved. I'm just happy I have X working. Thanks for your help.
You can run depmod -a anywhere as long as it is the right machine.

As for the debian-bug: I just read about it. Kind of strange that this never happened to me: I seem to have a habit of coming across every bug you can have when installing something.

On the other hand I never compiled a 2.4.19 kernel, and the bug might as well be related to that particular kernel version *shrug*

One last question: Did you compile your kernel the debian way? I don't believe it makes much of a difference but it may be worth a try.
  Reply With Quote
Old 09-25-02, 11:02 AM   #12
Scorched
Registered User
 
Join Date: Sep 2002
Posts: 8
Send a message via AIM to Scorched
Default

I compiled the debian way the first time, but after reading the kernel-howto, it seemed the traditional way was more efficient. So I'm using that way now.
Scorched 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
Graphic errors and hangs after standby reini122 NVIDIA Linux 4 05-07-12 03:37 AM
Getting the proprietary nvidia driver to run with Debian 3.0 r0 (woody) Katchina404 NVIDIA Linux 9 01-12-03 08:49 AM
Compiling problems with Debian 3.0, 2.4.19 Sleepwalker NVIDIA Linux 2 09-28-02 09:00 AM
Problems with a GeForce4 MX 440 under Debian Iainuki NVIDIA Linux 1 09-24-02 09:27 PM

All times are GMT -5. The time now is 09:19 PM.


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