DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi everybody. I'm running Debian Sid for some months now, and for me it's really impressive, it has nothing of unstable and you have the latest packages.
However, today I had some problems. As usual I upgraded my system and I was surprised that the kernel 2.6.14 was already available, I download it, and as usual I have to compile again the nvidia driver. Unfortunately, I couldn't do it, at booting with the new kernel everything went alright until it wanted to start the X system (predictable), so I login as root and went through all the process of compiling the driver: install the latest nvidia-kernel-source (v. ***7174), nvidia-glx, as well as the linux-headers using apt-get. I setup the following
I just compiled 2.6.14 and nvidia without any hickups. I also can't see anything wrong in your post, so did you execute the command from the kernel source dir, did you make a typo, did you forget to unpack the nvidia sources???
Can you post relevant parts of the error generated. Till then I'll go looking for a site which had a really good way of compiling the nividia kernel modules on Debian.
Thanks for your replies, I have more info so maybe you can spot what went wrong, I copy some of the errors that appear in the terminal, there are a lot. I tried to redirect the output of the terminal to a file using:
Code:
debian/rules binary_modules > log_nvidia
but it didn't copy the errors just some parts of the output, I insert the errors manually. Can somebody explain me a better way to do this?
Code:
# select which makefile to use.
rm -f /usr/src/modules/nvidia-kernel/nv/Makefile || true
if [ 6 = 6 ]; then \
cd /usr/src/modules/nvidia-kernel/nv ; \
ln -s Makefile.kbuild Makefile ; \
cd .. ; \
if [ 0 = 1 ] ; then \
dpatch apply 04_minion ; \
fi ; \
if [ 0 = 1 ]; then \
dpatch apply 01_sysfs ; \
dpatch status 01_sysfs >patch-stamp ; \
dpatch apply 02_pcialias ; \
dpatch status 02_pcialias >>patch-stamp ; \
fi ; \
fi
if [ 6 = 4 ]; then \
cd /usr/src/modules/nvidia-kernel/nv ; \
ln -s Makefile.nvidia Makefile ; \
cd .. ; \
fi
#nothing here anymore
touch configure-stamp
if [ -f /usr/src/modules/nvidia-kernel/debian/control.template ]; then \
cp /usr/src/modules/nvidia-kernel/debian/control.template /usr/src/modules/nvidia-kernel/debian/control; \
fi
dh_testdir
dh_testroot
PATCHLEVEL = 6
Kernel compiler version : 4.0.2
Detected compiler version : 4.0.2
Using compiler gcc-4.0 version 4.0.2
touch /usr/src/modules/nvidia-kernel/nv/gcc-check
touch /usr/src/modules/nvidia-kernel/nv/cc-sanity-check
## Main Make ##
IGNORE_CC_MISMATCH=1 CC="gcc-4.0" /usr/bin/make -C /usr/src/modules/nvidia-kernel/nv -f Makefile SYSSRC=/usr/src/linux-headers-2.6.14-1-686 KBUILD_PARAMS="-C /usr/src/linux-headers-2.6.14-1-686 SUBDIRS=/usr/src/modules/nvidia-kernel/nv" module;
make[1]: Entering directory `/usr/src/modules/nvidia-kernel/nv'
NVIDIA: calling KBUILD...
make CC=gcc-4.0 -C /usr/src/linux-headers-2.6.14-1-686 SUBDIRS=/usr/src/modules/nvidia-kernel/nv modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.14-1-686'
CC [M] /usr/src/modules/nvidia-kernel/nv/nv.o
/usr/src/modules/nvidia-kernel/nv/nv.c:3094: error: too few arguments to function 'agp_backend_release'
/usr/src/modules/nvidia-kernel/nv/nv.c:3254: error: dereferencing pointer to incomplete type
/usr/src/modules/nvidia-kernel/nv/nv.c: At top level: sintax error before 'u32'
/usr/src/modules/nvidia-kernel/nv/nv.c:3478: error: request for member 'nv_state' in something not a structure o union
make[3]: *** [/usr/src/modules/nvidia-kernel/nv.o] Error 1
make[2]: *** [_module/usr/src/modules/nvidia-kernel/nv] Error 2
make[2]: Leaving directory `/usr/src/linux-headers-2.6.14-1-686'
NVIDIA: left KBUILD.
nvidia.ko failed to build!
make[1]: *** [module] Error 1
make[1]: Leaving directory `/usr/src/modules/nvidia-kernel/nv'
make *** [build-stamp] Error 2
Thanks for your reply Moloko, I check what you said: I execute the command from the directory /usr/src/modules/nvidia-kernel, as I did several times before. Yes I unpack the nvidia-kernel source with the following command in the directory /usr/src/:
Code:
tar -zxf nvidia-kernel-source-tar-gz
I reinstall this package nvidia-kernel-source version 1.0.7174-4 in hope that it could be the reason. The same result...
Right now I'm in the phase of porting all my programs to Linux, and of course I'm learning the tools available in Linux and programming in C/C++. From what I've learned till now, I believe that the problem arises when the file nv.c is being compiled and it needs the modules available in the kernel-headers, somehow it can't find them or they have changed some names of some functions , somebody knows why this is happening? I notice also that it's using a makefile called Makefile.Kbuild to compile the module is this ok?
Did somebody follow other procedure, or is this the most adequate? Maybe I can compile the latest Nvidia package downloaded from its website? I just want to follow the Debian way, but if it's not possible maybe I could follow other procedures?
As you can see I have a lot of questions, I guess this is why I like Linux, you don't stop learning ....
Thanks Yanik for your help, I followed your instructions and unfortunately it does not finish correctly, and said that it can't create the driver, if I remember well...
I also tried downloading the latest nvidia driver, NVIDIA-Linux-x86-1.0-7676-pkg1.run, and follow the typical procedure: become root, obviously X is not running, done
Code:
sh NVIDIA-Linux-x86-1.0-7676-pkg1.run
and again it fails, it creates the nvidia-installler-log located in /var/log, these are the first lines:
Code:
nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Tue Nov 1 17:19:34 2005
option status:
license pre-accepted : false
update : false
force update : false
expert : false
uninstall : false
driver info : false
no precompiled interface: false
no ncurses color : false
query latest driver ver : false
OpenGL header files : true
no questions : false
silent : false
no backup : false
kernel module only : false
sanity : false
add this kernel : false
no runlevel check : false
no network : false
no ABI note : false
no RPMs : false
force tls : (not specified)
force compat32 tls : (not specified)
X install prefix : /usr/X11R6
OpenGL install prefix : /usr
compat32 install prefix : (not specified)
installer install prefix: /usr
utility install prefix : /usr
kernel name : (not specified)
kernel include path : (not specified)
kernel source path : (not specified)
kernel output path : (not specified)
kernel install path : (not specified)
proc mount point : /proc
ui : (not specified)
tmpdir : /tmp
ftp mirror : ftp://download.nvidia.com
RPM file list : (not specified)
Using: nvidia-installer ncurses user interface
-> License accepted.
-> 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 source path: '/lib/modules/2.6.14-1-686/build'
-> Performing CC test with CC="cc".
-> Performing rivafb check.
-> Cleaning kernel module build directory.
executing: 'cd ./usr/src/nv; make clean'...
rm -f -f nv.o nv-vm.o os-agp.o os-interface.o os-registry.o nv.o nv-vm.o os-
agp.o os-interface.o os-registry.o nvidia.mod.o
rm -f -f build-in.o nv-linux.o *.d .*.{cmd,flags}
rm -f -f nvidia.{o,ko,mod.{o,c}} nv_compiler.h *~
rm -f -rf .tmp_versions
-> Building kernel module:
executing: 'cd ./usr/src/nv; make module SYSSRC=/lib/modules/2.6.14-1-686/bu
ild SYSOUT=/lib/modules/2.6.14-1-686/build'...
NVIDIA: calling KBUILD...
and again it repeats almost the same errors that I had before, but this time it also highlights the kernel source and its modules. I don't think it is a compiler problem nor any missing package installed. It seems for me that the nvidia sources do not go well with the kernel 2.6.14-1-686 (both the headers and the kernel sources)
Your compilation problem appears to be with the function "agp_backend_release". The prototype for this function is found in agp_backend.h. For linux 2.6.13 the prototype is as follows:
However, the nvidia module compiles just fine on my machine. This is because the preprocessing directives exclude the function from being used (AGPART is not defined):
Notice that I am explicitly asking for the nvidia agp driver - NvAGP. Perhaps if you add this line to your xorg.conf file it will disregard the use of agp_backend_acquire and will compile. Perhaps this is NVidia's way of telling us to stop using agpart. ;-)
Thanks for your insights nfrum, and definitely you are right on the errors in the header app_backend.h. However the same errors also occurs for other headers. I review again the file /var/log/nvidia-installer.log, and I'll copy some other lines:
Code:
NVIDIA: calling KBUILD...
make CC=cc KBUILD_VERBOSE=1 -C /lib/modules/2.6.14-1-686/build SUBDIRS=/tmp
/selfgz4289/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv modules
mkdir -p /tmp/selfgz4289/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/.tmp_vers
ions
make -f scripts/Makefile.build obj=/tmp/selfgz4289/NVIDIA-Linux-x86-1.0-7676
-pkg1/usr/src/nv
echo \#define NV_COMPILER \"`cc -v 2>&1 | tail -n 1`\" > /tmp/selfgz4289/NVI
DIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv_compiler.h
cc -Wp,-MD,/tmp/selfgz4289/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/.nv.o
.d -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.0.3/include -D__KERNEL_
_ -Iinclude -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-al
iasing -fno-common -ffreestanding -O2 -fomit-frame-pointer -pipe -msoft-
float -mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686 -Iinclude
/asm-i386/mach-default -Wdeclaration-after-statement -Wno-pointer-sign -I/tm
p/selfgz4289/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv -Wall -Wimplicit -Wre
turn-type -Wswitch -Wfo
rmat -Wchar-subscripts -Wparentheses -Wpointer-arith -Wno-multichar -Werro
r -O -fno-common -MD -Wsign-compare -Wno-cast-qual -Wno-error -D_LOOSE_KER
NEL_NAMES -D__KERNEL__ -DMODULE -DNTRM -D_GNU_SOURCE -D_LOOSE_KERNEL_NAMES
-D__KERNEL__ -DMODULE -DNV_MAJOR_VERSION=1 -DNV_MINOR_VERSION=0 -DNV_PATCHL
EVEL=7676 -UDEBUG -U_DEBUG -DNDEBUG -DNV_CHANGE_PAGE_ATTR_PRESENT -DNV_PCI_
DISABLE_DEVICE_PRESENT -DMODULE -DKBUILD_BASENAME=nv -DKBUILD_MODNAME=nvidi
a -c -o /tmp/selfgz4289/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/.tmp_nv.o
/tmp/selfgz4289/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src/nv/nv.c
In file included from include/linux/kernel.h:11,
from /tmp/selfgz4289/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src
/nv/nv-linux.h:45,
from /tmp/selfgz4289/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src
/nv/nv.c:14:
include/linux/linkage.h :5:25: error: asm/linkage.h: No such file or director
y
In file included from include/linux/posix_types.h:47,
from include/linux/types.h:13,
from include/linux/kernel.h:13,
from /tmp/selfgz4289/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src
/nv/nv-linux.h:45,
from /tmp/selfgz4289/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src
/nv/nv.c:14:
/usr/lib/gcc/i486-linux-gnu/4.0.3/include/asm/posix_types.h:13:22: error: fe
atures.h: No such file or directory
/usr/lib/gcc/i486-linux-gnu/4.0.3/include/asm/posix_types.h:14:35: error: no
include path in which to search for asm/posix_types.h
In file included from include/linux/kernel.h:13,
from /tmp/selfgz4289/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src
/nv/nv-linux.h:45,
from /tmp/selfgz4289/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src
/nv/nv.c:14:
include/linux/types.h:14:23: error: asm/types.h: No such file or directory
In file included from include/linux/kernel.h:13,
from /tmp/selfgz4289/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src
/nv/nv-linux.h:45,
from /tmp/selfgz4289/NVIDIA-Linux-x86-1.0-7676-pkg1/usr/src
/nv/nv.c:14:
include/linux/types.h:18: error: syntax error before '__kernel_dev_t'
include/linux/types.h:18: warning: type defaults to 'int' in declaration of
'__kernel_dev_t'
include/linux/types.h:18: warning: data definition has no type or storage cl
ass
include/linux/types.h:21: error: syntax error before 'dev_t'
include/linux/types.h:21: warning: type defaults to 'int' in declaration of
'dev_t'
include/linux/types.h:21: warning: data definition has no type or storage cl
ass
include/linux/types.h:22: error: syntax error before 'ino_t'
include/linux/types.h:22: warning: type defaults to 'int' in declaration of
'ino_t'
include/linux/types.h:22: warning: data definition has no type or storage cl
ass
include/linux/types.h:23: error: syntax error before 'mode_t'
include/linux/types.h:23: warning: type defaults to 'int' in declaration of
'mode_t'
include/linux/types.h:23: warning: data definition has no type or storage cl
ass
include/linux/types.h:24: error: syntax error before 'nlink_t'
include/linux/types.h:24: warning: type defaults to 'int' in declaration of
'nlink_t'
include/linux/types.h:24: warning: data definition has no type or storage cl
ass
include/linux/types.h:25: error: syntax error before 'off_t'
include/linux/types.h:25: warning: type defaults to 'int' in declaration of
'off_t'
include/linux/types.h:25: warning: data definition has no type or storage cl
ass
include/linux/types.h:26: error: syntax error before 'pid_t'
include/linux/types.h:26: warning: type defaults to 'int' in declaration of
'pid_t'
include/linux/types.h:26: warning: data definition has no type or storage cl
ass
include/linux/types.h:27: error: syntax error before 'daddr_t'
include/linux/types.h:27: warning: type defaults to 'int' in declaration of
'daddr_t'
include/linux/types.h:27: warning: data definition has no type or storage cl
ass
include/linux/types.h:29: error: syntax error before 'suseconds_t'
include/linux/types.h:29: warning: type defaults to 'int' in declaration of
'suseconds_t'
include/linux/types.h:29: warning: data definition has no type or storage cl
ass
include/linux/types.h:30: error: syntax error before 'timer_t'
include/linux/types.h:30: warning: type defaults to 'int' in declaration of
'timer_t'
include/linux/types.h:30: warning: data definition has no type or storage cl
ass
include/linux/types.h:31: error: syntax error before 'clockid_t'
include/linux/types.h:31: warning: type defaults to 'int' in declaration of
'clockid_t'
include/linux/types.h:31: warning: data definition has no type or storage cl
ass
include/linux/types.h:35: error: syntax error before 'uid_t'
include/linux/types.h:35: warning: type defaults to 'int' in declaration of
'uid_t'
include/linux/types.h:35: warning: data definition has no type or storage cl
ass
include/linux/types.h:36: error: syntax error before 'gid_t'
include/linux/types.h:36: warning: type defaults to 'int' in declaration of
'gid_t'
include/linux/types.h:36: warning: data definition has no type or storage cl
ass
include/linux/types.h:37: error: syntax error before 'uid16_t'
include/linux/types.h:37: warning: type defaults to 'int' in declaration of
'uid16_t'
include/linux/types.h:37: warning: data definition has no type or storage cl
ass
include/linux/types.h:38: error: syntax error before 'gid16_t'
include/linux/types.h:38: warning: type defaults to 'int' in declaration of
'gid16_t'
include/linux/types.h:38: warning: data definition has no type or storage cl
ass
So the problems of compiling generalizes to many other c headers located in the directory /usr/lib/gcc/i486-gnu-linux/4.0.3/include which is the directory of the libraries of the latest gcc compiler. Could this be the problem?.
I believe that the kernel 2.6.14.1-686 was compiled with the version 4.0.2, but I don't thinks this could be a reason that the nvidia kernel sources can't compile with the 4.0.3 gcc version. Furthermore there is no explicit error about this. Correct me if I'm wrong, in the meantime still trying to find the way to make the nvidia driver works in my box...
That's what debian unstable is all about. Sometimes it breaks, and usually, you just wait a few days and it gets fix. As a normal user, I found it useless to try too much to fix something that broke.
As usual, today's dist-upgrade did the trick. The module now compiles cleanly.
Try extracting the nvidia packege like so:
sh NVIDIA-Linux-x86-1.0-7676-pkg1.run -x
Then run nvidia-installer by entering the created directory and typing:
make install
or
make install > my_own_log.txt 2>&1 (if you want to save the output)
You should be root to do this.
When the build fails, try changing the last cc command for nv.c with one that has the same defines (-D...) as the line above, or just add -DNV_MULTIPLE_BRIDGE_AGPGART_PRESENT. See what happens.
Thanks nfrum for your suggestions. It's nice to learn more options when something does not go well, and I'll keep your suggestions for future reference. I took the advice of Yan and did apt-get dist-upgrade this morning, and from the list of packages to update I found the linux-image and the linux headers 2.6.14.1-1-686.
Yan you are absolutely right!, maybe there were some bugs on these packages, and when I finished downloading, I proceed to install the nvidia-driver, and besides some warnings everything went right this time!, so right now I'm typing from my Debian Sid box with the 2.6.14-1-686 kernel!.
Well, besides this problem, my Debian Sid is very stable, even more than other distros. This really surprises me, I didn't have a single crash of the system in several months, just some programs that in some circumstances don't function properly, I really like Debian Sid.
Thanks again nfrum, Yan, Moloko and Valerie Tux, I appreciate your valuable help when somethings go wrong and most importantly I'm happy being part of this community.
Well, folks-I just had to tell you. I tried installing kernel 2.6.14 on my AMD Athlon 64 3400 system with Synaptic/Apt and when I rebooted it failed partway through the boot. I tried numerous times uninstalling and reinstalling it with Synaptic/Apt and it still failed partway through the boot. I tried downloading it from www.kernel.org and compiling but after finishing the "make" command it would have errors "seg fault" I think. It was compiled with gcc 4 so I tried gcc 3.4 and still the same fault. I was beginning to think it would compile fine on FC2-i386 [I was getting paranoid?] but not Debian maybe because it was something about the way Debian was designed and built? Anyway I tried one more time to compile it again but this time with gcc 3.3 and it compiled fine and I finished compiling it and rebooted and it worked FINE FINE FINE!!! It was gcc 3.4 and gcc 4 that was the problem. I am typing this under kernel 2.6.14 downloaded from www.kernel.org and compiled by me with gcc 3.3 on my x86_64 system and installed by me and it works so good. The kernel images installed by Synaptic are probably defective or riddled with errors because of gcc 4 and/or gcc 3.4; but it seems to compile the www.kernel.org kernel especially good without errors with gcc 3.3. Just had to tell someone to spare them the headache and the errors with gcc 4 and gcc 3.4.
Sincerely,
Jean Brown Harrell
Last edited by JeanBrownHarrel; 11-04-2005 at 02:20 AM.
I have an Nvidia GeForce FX 5200 256 MB agp8x video card...
I have an Nvidia GeForce FX 5200 256 MB agp8x video card with Debian "Etch" amd64 with DMA enabled and I use packages from both "testing" and "unstable" and I am not using the Nvidia drivers. I am using the X driver "nv" as this works fine for my purposes. I have not tried to use the Nvidia driver; maybe soon? Anyway I had also been having problems with my Debian Sarge & Etch amd64 installations [both of them] where the Gnome or Xserver steadily ate up more and more of my RAM [memory leak?] until it had consumed all of it and could not figure out what it was. I reinstalled Debian "Etch" amd64 but was very careful of what I installed that would run in memory as memory-resident and so far I have not had any problems with my RAM being steadily consumed [memory leak?] more & more by either Xserver [both xfree86 & xorg did this] and/or Gnome & KDE also I think....anyway I have an awesome system and it works great. I also pay attention to the bug reports on the updates when Synaptic goes to install them I don't install anything that has a memory leak big as Texas. If I have any problems with any program I don't install it and that helps also. I tried Ubuntu Breezy 5.10-amd64 and it won't boot; it fails partway through the boot. I reported it as a bug and it is being worked on but is not fixed yet. I cannot stomach Fedora Core 4-any version-as they took out apt and synaptic and I can't stand yumex as it has a memory leak as big as Texas and is too slow and a pain in the butt. So I tried Debian and am trying to work out the bugs. If I don't use Debian my only alternatives are Red Hat Linux 9, 8, or 7.3 or Fedora Core 2 or even 1. Hope my comments helped.
Thanks for the answer. I can run kernel 2.6.14 with the nv driver, but it is the nvidia driver (3d support) that is causing me headaches. I have a visitor sometimes who demands bzflag and tuxracer :-)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.