LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-26-2007, 07:47 PM   #1
davimint
Member
 
Registered: Jan 2006
Distribution: Slackware Current
Posts: 272

Rep: Reputation: 33
Nivida problem with gcc


Hi all,
Been wanting to try out a 64 bit distro and decided to give debian a try. Netinstall was great and quick but when I first booted my screen was terrible with 600x400 resolution. So, after hacking at the xorg.config file and figuring out how to get out of gdm back to a true console I was ready to tackle the Nvidia driver part of my system with always seems to give me trouble. So i'm stuck and need some help.

So far I've downloaded the x86_64 drive from nvidia.

I used the "Synaptic Package Manager" to download the source that matched my installed kernel.

Note: It only downloaded the bz2 file. I unpacked it and linked it so I guess that's what I was suppose to do.

Now, I think i've gotten things headed in the right direction but I figured there would be something else and guess what it was.

After sh NVIDIA***** I get a message that says that the development tool "cc" in not in my path....

I'm learning so need some help.
 
Old 05-26-2007, 11:06 PM   #2
vtel57
Member
 
Registered: Jul 2006
Location: VPN Tunnel, USA
Distribution: Slackware64
Posts: 939

Rep: Reputation: 117Reputation: 117
The things required for the Nvidia compiler script to create you a custom kernel module:

1) the compiler script from the Nvidia site

2) installed kernel headers for your booting kernel

3) gcc installed on your system

Looks like you need to install the appropriate kernel headers and gcc. You can find both in Synaptic using the search feature. After you've installed the appropriate linux-headers for your kernel and gcc w/ all its accompanying dependent software (it'll do it automatically in synaptic... don't worry), kill X, drop down into RL 3 and run your Nvidia script again.

Luck!
 
Old 05-27-2007, 12:33 AM   #3
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
This guy here will tell you exactly how to do them in two methods:
http://www.debiantutorials.org/content/view/152/212/
The part about configuring xorg.conf with command: 'dpkg-reconfigure xserver-xorg' is probably more needed for installing nvidia drivers the Debian way. Both of these methods work great with out of the box kernel 2.6.18 for Etch.

Last edited by Junior Hacker; 05-27-2007 at 12:36 AM.
 
Old 05-27-2007, 10:18 AM   #4
davimint
Member
 
Registered: Jan 2006
Distribution: Slackware Current
Posts: 272

Original Poster
Rep: Reputation: 33
Thank you both,
Got it working with the nVidia binaries before I read your post. Like I say everything is good except I have two questions.

So far in my reading I guess I see two different styles of package managers synaptic & apt-get. Looks like synaptic is a gui-based & apt-get is ncurse-based. Is it acceptable to use both or do I need to stick with one ?

Using synaptic I installed the following packages to get the nVidia binary driver to work or atleast is did work after they were installed.
1) linux-headers-2.6.18-4
2) linux-headers-2.6.18-4-amd64
3) linux-source-2.6.18.tar.bz2 (did not unpack or link )
4) linux-kbuild-2.6.18

This is weird compared to what I thought which maybe someone just needs to explain this to me ??? I always though that the headers files were suppose to inside the kernel source file & by building your own kernel from source you build a custom kernel it linked or built against the gcc your using. So, I looked at the directory "linux-headers-2.6.18-4-amd64" & it looks like the source file with a different directory name ?????

Anyway, Thanks....
 
Old 05-27-2007, 12:32 PM   #5
vtel57
Member
 
Registered: Jul 2006
Location: VPN Tunnel, USA
Distribution: Slackware64
Posts: 939

Rep: Reputation: 117Reputation: 117
I'm not sure what the technical differences between headers and source are.

As far as APT and Synaptic, they are the same package manager. Synaptic is just a GUI frontend for APT.

Glad you got it working!
 
Old 05-27-2007, 05:20 PM   #6
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
I believe the source package has everything required to build a kernel, and modules. The header packages are used for compiling modules only. You did not need to install the source package, only header packages. Synaptic, as stated above is just the GUI to apt, the better part of Synaptic is being able to see all available packages in various group forms, which can be listed the same way via apt in CLI, but you avoid running commands.
I'm not sure what's the deal with gcc, for my laptop I have the i386 Debian testing, I installed kernel 2.6.21 from Debian unstable and then tried both methods to try installing nvidia drivers and got errors regarding the wrong version of gcc. The errors tell me the kernel was compiled with gcc-4.1.1 but when that kernel was installed, apt also installed gcc-4.1.3 as a dependency. Go figure!. So I installed nvidia the Debian way with the out of box kernel 2.6.18-4 then installed the 2.6.21 kernel and booted to CLI only, no graphics. So for now I'm using the 2.6.18 kernel till I find time to sort it out.
 
Old 05-27-2007, 10:41 PM   #7
davimint
Member
 
Registered: Jan 2006
Distribution: Slackware Current
Posts: 272

Original Poster
Rep: Reputation: 33
Junior Hacker
Had the same effects with the slackware-current kernel's on my system. The way I got nVidia to work with the stock kernels was as follows.
Installed the source and linked it.
Copied the config-whatever to /usr/src/linux/.config
Ran make oldconfig
Ran make include/linux/version.h

Then it udated the kernel headers to the correct version of gcc.

It may work on debian, not sure.

davimint
 
Old 05-28-2007, 04:32 AM   #8
djcs
Member
 
Registered: Jun 2006
Posts: 43

Rep: Reputation: 15
Ok i have struggled installing nvidia on the debian systems, no matter what version, but i mainly only ever use the official nvidia installer for my system, ie x686(i386) and amd_64(unless i need a fast and dirty install and then i just use nv driver in xorg.conf).
I have found odd quirks every now and then, mainly to where xorg and nvidia wish to install drivers etc....

i use the follwing script currently:

nvidia_fixer_script.sh <- sudo chmod 777 on this, not sure if its right, but it makes the file work. Anyone feel free to correct me

#!/bin/sh
ln -s /usr/X11R6/lib/modules/extensions/libglx.so /usr/lib/xorg/modules/extensions/libglx.so



ln -s /usr/X11R6/lib/modules/drivers/nvidia_drv.so /usr/lib/xorg/modules/drivers/nvidia_drv.so

#EOF

on a 2.4.18-4 kernel running lenny with the 9755 amd_64 package from the nvidia website (the "official installer) and i have full glx support etc working for me.

I have always struggled with the nvidia installer, it seems for the most part to install ok, but probs for xorg loading the right .so files (the proper nvidia drivers ???), hence the symlinks above.

I have tried to use the "proper debian: packages, but they are sometimes 2 -3 months behind, and cause other probs with dependencies and i just really want it now.

If you hunt around, i have made other posts regarding the 2.6.20 kernel and the problems associated, i might sit down this weekend and try another kernel upgrade to see what happens, but last time i tried, twas a complete pain in the a$$ to get working as the only "solution" i could find was a customer kernel rebuild with the para_virt_ops disabled. Something to do with tainting the kernel. See http://www.linuxquestions.org/questi....php?p=2742061 .

I have linux-image-2.6.18-4-amd-64 and linux-headers-2.6.18-4-amd-64 instaled plus all and any suggested and recommended packages suggested from apt-get.
ie apt-get install linux-image-2.6.18-4-amd-64 linux-headers-2.6.18-4-amd-64 -d and anything it suggests or recommends from a gui, and then write or remember the basics of it and you will get it all installed. then try running the installer from the nvidia website.

Good luck, if there is anyway i can help, let me know, but make sure you can provide as much info as possible, ie error messages etc....

DJ

PS Just thought i would let you know that upgraded to a 2.6.21-1-amd64 kernel, ran the above script and everything is working fine.

QUOTE=davimint]Junior Hacker
Had the same effects with the slackware-current kernel's on my system. The way I got nVidia to work with the -stock kernels was as follows.
Installed the source and linked it.
Copied the config-whatever to /usr/src/linux/.config
Ran make oldconfig
Ran make include/linux/version.h

Then it udated the kernel headers to the correct version of gcc.

It may work on debian, not sure.

davimint[/QUOTE]

Last edited by djcs; 06-01-2007 at 02:57 AM.
 
Old 06-05-2007, 01:21 AM   #9
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'paravirt_ops'

Well
I found time today to play with my nvidia graphics with the 2.6.21 kernel, first thing I did was change the driver in /etc/X11/xorg.conf from 'nvidia' to 'nv', that got me shi..y graphics, but graphics none the less. davimint mentioned something about /usr/src/linux/.config, so I had a look in their and noticed it was for the original 2.6.18 kernel, so I renamed it to .config.bak and copied the .config file from the /lib/modules/2.6.21-1-686/build/ directory to the /usr/src/linux directory and compiled modem drivers without problems. Don't know if that made a difference, I removed the kernel-2.6.18 and any related packages which emptied the /usr/src/linux directory except for the .config.bak file and re-tried the nvidia .run from nvidia and got a different error as such:
Quote:
FATAL: modpost: GPL-incompatible module nvidia.ko uses GPL-only symbol 'paravirt_ops'
So I stuck that line in the google search field and found a patched nvidia driver here at the bottom of this page:
http://grizach.servebeer.com/nvpatch/index.php
Works all right.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nivida problem with gcc davimint Debian 3 05-27-2007 11:24 AM
gcc testing with nivida driver phatbastard Slackware 2 12-10-2005 08:30 AM
mandrivra nivida gfx problem Elspuddy Mandriva 0 10-25-2005 07:08 PM
any point in installing nivida drivers??? wisdom Linux - Software 10 02-19-2004 09:33 PM
Is it safe to install the new Nivida drivers waheedrafiq Linux - Hardware 4 01-03-2004 04:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 10:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration