LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 07-16-2009, 08:36 AM   #1
james100
Member
 
Registered: Apr 2009
Location: Melbourne Australia
Distribution: Trying out several to see which ones I like
Posts: 43

Rep: Reputation: 16
gcc 4.3 error when installing Quadro FX 540


I am currently installing a driver for my NVIDIA Quadro FX 540 graphics card on my PC, which is currently running Debian 5.0. I have downloaded the following driver from the Nvidia site, NVIDIA_Linux-x86_64-185.18.14-pkg2. When I start the run command I am able to accept the Nvidia licence.

The installer then finds that it does not have a precompiled kernel interface and offers to download one from the Nvidia site. This is my first problem as my PC is not connected to the internet, so I say No to this option. The installer then tries to compile a kernel interface, which is when my second problem occurs. The installer is unable to compile the interface because I then get an error message telling me that I am trying to compile the NVIDIA kernel module with a compiler different from the one that was used to compile the running kernel. Specifically the NVIDIA kernel module wants to use gcc 4.1 but my kernel has been built with gcc 4.3. Although the installer offers to use the incorrect compiler, I understand that at least for kernel 2.6.26 this is not advisable.

This is my first attempt at installing a graphics driver on a Linux PC, so I really do not know where to go from here. I have tried searching through the forums, and using Google, but I can't find any information that specifically addresses this problem. Any advice (but preferable constructive) at this stage will be most appreciated.
 
Old 07-17-2009, 04:39 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,925

Rep: Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327
You should use the same gcc version to compile kernel modules. If you have both gcc 4.1 and 4.3 installed, you have to change your PATH, so the path to the gcc 4.3 binary comes first.
Or you can recompile your kernel with gcc 4.1 and then build the nvidia kernel module.
Regarding the 1st "problem", it's not a problem actually, as it's very rare that the installer can find a precompiled module for your kernel.

Regards
 
Old 07-18-2009, 02:31 AM   #3
james100
Member
 
Registered: Apr 2009
Location: Melbourne Australia
Distribution: Trying out several to see which ones I like
Posts: 43

Original Poster
Rep: Reputation: 16
bathory

Thanks for your response.

Quote:
Originally Posted by bathory View Post
You should use the same gcc version to compile kernel modules. If you have both gcc 4.1 and 4.3 installed, you have to change your PATH, so the path to the gcc 4.3 binary comes first. Or you can recompile your kernel with gcc 4.1 and then build the nvidia kernel module.
I have checked my PC for gcc versions. Of the several dozen files that mention a gcc version, almost all of them referred to version number gcc 4.3. Three INFO file names referred to gcc 4.2 and there was one archive file named gcc-4.2-base_4.2.4-6_amd64.deb. I did not find any files with names that included gcc 4.1. I conclude from this that my system has been compiled using gcc 4.3 and that gcc 4.1 is not present on my system.

I do have some other Linux distros on DVD; it is possible that gcc 4.1 is present on one or other of those. Are gcc files distro specific, or can they be used on any Linux distro?

I am a bit unsure regarding your comment regarding whether or not I have gcc 4.1 and 4.3 installed. Do you mean that if I had gcc 4.1 installed then the nvidia installer would use that to compile the nvidia kernel module, and I could then use the graphics card with my current system without having to recomplile the Linux kernel and other kernel modules using gcc 4.1. (I wish there was a smiley for crossed fingers).

I suspect (but hope otherwise) that you are going to tell me that I either:
(a) need to find an nvidia driver for my graphics card that can be compiled using gcc 4.3. So far I have not been able to find any drivers that meet this requirement.

or

(b) I need to install gcc 4.1 and recompile my kernel, all other kernel modules, before I can compile the nvidia kernel using gcc 4.1. I will try this if I need to, but I must admit to being reluctant to do so for two reasons. First, I have never tried to compile the kernel before. Second, I assume that the kernel developers used gcc 4.3 instead of gcc 4.1 for a reason, so I do not know what unexpected effects the older version compiler may produce.

In any case, I will have to do something (even if it comes to a full reinstall of Debian). The partial install of the nvidia driver has caused problems with my X server, so I am unable to get any GUI working. I am able to log in as myself or "root" but only for CLI interactions.
 
Old 07-18-2009, 03:21 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,925

Rep: Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327
I'm also confused with your situation. nvidia-installer will use your current gcc to build its module. To me it looks like you've upgraded your kernel to a newer version compiled with gcc 4.3, but your system still has 4.1 installed.
To find your gcc version, use your distro's package manager, or run:
Code:
gcc -v
Anyway for (a) and (b) questions I've done a little search cause I don't use debian and came into the following post in debian forums:
Quote:
1. Purge any previously installed nVidia packages.
2. Enable the non-free component of your system binary repository and update the package list.
3. Install the packages nvidia-kernel-[equal to your kernel family] and nvidia-xconfig.
4. If the nVidia card is recent, install the package nvidia-glx. If it isn't, search for the proper legacy package in packages.debian.org and install it.
5. Run nvidia-xconfig as administrator and check the generated /etc/X11/xorg.conf (in my case, I had to copy the keyboard settings from the original file xorg.conf.backup).
6. Restart.

By [equal to your kernel family] I mean that if you use a meta-package to trace the kernel, say the meta-package linux-image-2.6-amd64, you should install the meta-package package nivida-kernel-2.6-amd64.
 
Old 07-19-2009, 05:17 AM   #5
james100
Member
 
Registered: Apr 2009
Location: Melbourne Australia
Distribution: Trying out several to see which ones I like
Posts: 43

Original Poster
Rep: Reputation: 16
bathory

Thank you for the information you have provided.

When I enter gcc -v I get the following response:

Code:
gcc version 4.3.2 (Debian 4.3.2-1.1)
this appears to confirm that my kernel was compiled using gcc 4.3.


Quote:
To me it looks like you've upgraded your kernel to a newer version compiled with gcc 4.3, but your system still has 4.1 installed.
I assure you that I would not have a clue how to go about upgrading my kernel. Also, as indicated in my last posting, I cannot find any files on my system that include the characters "gcc 4.1" in any part of the filename, which seems to indicate that I don't have gcc 4.1 on my system.

So it would appear that my system has been compiled using gcc 4.3, but I dont know why the nvidia installer wants to use gcc 4.1. It looks as if the nvidia installer is expecting to find gcc 4.1 on my system for some reason. I have looked on the internet* and I have found several 64 bit nvidia drivers for my graphic card. They all have different file names, so I am assuming that they are different to each other in some way. All of them appear to have been created in mid to late 2008. Perhaps gcc 4.1 was the most recent version of the compiler at that time so that is why the compiler expects to find it?

For your information, I only installed Debian 5.0 about two weeks ago. I do not have internet* access on my personal PC, so I purchased the complete set of 5 Debian 5.0 AMD 64 DVDs from a Debian certified site. My version of Debian was installed from those DVDs. It is my understanding that these 5 DVDs give me access to the entire repository of Debian packages, although I cannot confirm this. If my understanding is correct, then I should be able to install the packages you refer to, although as I need to do this from my DVDs and not via the internet, it is likely that updating the package list will have no effect.

* In case these two points sound contradictory, I do not have internet access on my own PC but I can access the internet from public terminals, and occasionally I can use a friend's PC that is connected.


Quote:
1. Purge any previously installed nVidia packages.
I am not sure how to do this, but I assume that it requires me to uninstall any nvidia packages that I have added to me PC. I will read up on how to do this, the research will be good for me, and I will see what happens. If all else fails I will just reinstall Debian from the DVDs. I know that this is usually only recommended as a last resort, but it will mean that my system will be working properly within about 60 minutes. This should restore the X server, and likewise my GUI interface; I will then be able to run the package manager then take the other steps that you suggested.
 
Old 07-19-2009, 08:09 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,925

Rep: Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327Reputation: 1327
Before reinstalling try this nvidia debian package.
More details about nvidia kernel module for your distro you can find here

Regards
 
  


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
Error in installing gcc Hitboxx Fedora 1 04-27-2006 09:33 AM
nvidia quadro fx 540 linux dual displays microlaser Linux - Hardware 0 10-30-2005 07:20 PM
Problem Installing nVidia NV37GL [Quadro FX 330] in DELL Precision WS 370 nixon_vb Linux - Hardware 2 07-07-2005 08:50 AM
GCC error when installing GAIM BoardinBum Linux - Newbie 2 08-20-2004 01:48 PM
error installing GCC +please help saurav_gohain Linux From Scratch 5 07-07-2003 11:30 AM


All times are GMT -5. The time now is 02:19 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration