LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-16-2008, 04:14 PM   #1
barbuceanu
LQ Newbie
 
Registered: Apr 2008
Posts: 28

Rep: Reputation: 15
"CC version check failed" gcc 4.2.3 and gcc 4.1


Hi,

I am a beginner in Linux. I have Debian. I want to install the driver for my Asus notebook video card (GeForce 8400M GT). I have 4.2.3 gcc version installed but the kernel of the driver is compiled in gcc 4.1 It seems that the driver must be compiled with the same gcc version as the one from my computer so that can work. How can I make this driver compiled with gcc 4.1 to work on my computer. Do I have to install gcc 4.1 package ?


This is the lhe log file content:


nvidia-installer log file '/var/log/nvidia-installer.log'
creation time: Thu Apr 17 00:02:03 2008

option status:
license pre-accepted : false
update : false
force update : false
expert : false
uninstall : false
driver info : false
precompiled interfaces : true
no ncurses color : false
query latest version : false
OpenGL header files : true
no questions : false
silent : false
no recursion : 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
no kernel module : false
force SELinux : default
no X server check : false
force tls : (not specified)
X install prefix : (not specified)
X library install path : (not specified)
X module install path : (not specified)
OpenGL install prefix : (not specified)
OpenGL install libdir : (not specified)
utility install prefix : (not specified)
utility install libdir : (not specified)
doc install prefix : (not specified)
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.
-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
-> The CC version check failed:

The compiler used to compile the kernel (gcc 4.1) does not exactly match the
current compiler (gcc 4.2). The Linux 2.6 kernel module loader rejects kern
el modules built with a version of gcc that does not exactly match that of t
he compiler used to build the running kernel.

If you know what you are doing and want to ignore the gcc version check, sel
ect "No" to continue installation. Otherwise, select "Yes" to abort install
ation, set the CC environment variable to the name of the compiler used to c
ompile your kernel, and restart installation. Abort now? (Answer: No)
ERROR: Unable to find the kernel source tree for the currently running kernel.
Please make sure you have installed the kernel source files for your
kernel and that they are properly configured; on Red Hat Linux systems,
for example, be sure you have the 'kernel-source' or 'kernel-devel' RPM
installed. If you know the correct kernel source files are installed,
you may specify the kernel source path with the '--kernel-source-path'
command line option.
ERROR: Installation has failed. Please see the file
'/var/log/nvidia-installer.log' for details. You may find suggestions
on fixing installation problems in the README available on the Linux
driver download page at www.nvidia.com.
 
Old 04-16-2008, 04:21 PM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
If you don't have gcc 4.1, then yes you'll have to install it. But look in the /usr/bin directory and see if it's already there. If it is, then you can just delete the symbolic link from gcc -> 4.2 and recreate it so that it points to 4.1.
 
Old 04-18-2008, 06:25 AM   #3
barbuceanu
LQ Newbie
 
Registered: Apr 2008
Posts: 28

Original Poster
Rep: Reputation: 15
Ok. I don't have gcc 4.1 installed. I downloaded it but how can I install in an easy way. I have some documentation but is too much to read. Can you write some lines for terminal ?
 
Old 04-18-2008, 06:43 AM   #4
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

Rep: Reputation: 50
Hello,

Properly installing GCC is very difficult, more over it could break some parts of your system. So my advice is to install the driver through your package manager (for debian it's synaptic I think)... Go to the ubuntu documentation website (ubuntu is based on debian, so they are very similar), you'll find plenty of topics for ATI driver installation.

A good rule when you use linux is to install "manually" something only when you can't do it by your packages manager.
 
Old 04-18-2008, 08:11 AM   #5
barbuceanu
LQ Newbie
 
Registered: Apr 2008
Posts: 28

Original Poster
Rep: Reputation: 15
The package doesn't have a kernel interface for gcc 4.2. So i think I must install gcc 4.1. There are some topics about the same video card driver, but I can't understand them.
 
Old 04-18-2008, 11:06 AM   #6
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
To install gcc-4.1 simply do aptitude install gcc-4.1. Then you need to go to the /usr/bin directory, cd /usr/bin. From there type ls -l|grep gcc. You should have a symbolic link from gcc -> gcc-4.2 right now. What you want to do is remove the link, rm gcc. Then recreate it with ln -s /usr/bin/gcc-4.1 /usr/bin/gcc. After that, anytime something wants to use gcc, it will use gcc-4.1 instead.
 
Old 04-18-2008, 11:37 AM   #7
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

Rep: Reputation: 50
Maybe, after having installing gcc-4.1, just changing the line "CC=gcc" with "CC=gcc-4.1" is better.
 
Old 04-23-2008, 05:50 AM   #8
barbuceanu
LQ Newbie
 
Registered: Apr 2008
Posts: 28

Original Poster
Rep: Reputation: 15
Thank you pljvaldez.

Now I have the symbolic link to gcc 4.1.

But still I can't install the driver.

"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: No)
-> No precompiled kernel interface was found to match your kernel; this means
that the installer will need to compile a new kernel interface."

--------------------------------------------------------------------------------
AND THIS ARE THE NEW ERRORS :
--------------------------------------------------------------------------------

"-> Performing CC sanity check with CC="cc".
-> Performing CC version check with CC="cc".
ERROR: Unable to find the kernel source tree for the currently running kernel.
Please make sure you have installed the kernel source files for your
kernel and that they are properly configured; on Red Hat Linux systems,
for example, be sure you have the 'kernel-source' or 'kernel-devel' RPM
installed. If you know the correct kernel source files are installed,
you may specify the kernel source path with the '--kernel-source-path'
command line option.
ERROR: Installation has failed. Please see the file
'/var/log/nvidia-installer.log' for details. You may find suggestions
on fixing installation problems in the README available on the Linux
driver download page at www.nvidia.com."

What do I have to do next ? I must recompile somehow the driver ?
 
Old 04-23-2008, 11:01 AM   #9
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
You need to install the linux-headers package for your kernel. What is the output of uname -r and apt-cache search linux-headers?

Last edited by pljvaldez; 04-23-2008 at 03:28 PM.
 
Old 04-23-2008, 11:37 AM   #10
barbuceanu
LQ Newbie
 
Registered: Apr 2008
Posts: 28

Original Poster
Rep: Reputation: 15
For uname -r the output is:
"2.6.22-3-686"

For "apt-cache search linux-headers" the output is:
"linux-headers-2.6-486 - Header files for Linux 2.6 on x86
linux-headers-2.6-686 - Header files for Linux 2.6 on PPro/Celeron/PII/PIII/P4
linux-headers-2.6-686-bigmem - Header files for Linux 2.6 on PPro/Celeron/PII/PIII/P4
linux-headers-2.6-amd64 - Header files for Linux 2.6 on AMD64
linux-headers-2.6-k7 - Header files for Linux 2.6 on AMD K7 - transition package
linux-headers-2.6-xen-686 - Header files for Linux 2.6 on i686
linux-headers-2.6.24-1-486 - Header files for Linux 2.6.24 on x86
linux-headers-2.6.24-1-686 - Header files for Linux 2.6.24 on PPro/Celeron/PII/PIII/P4
linux-headers-2.6.24-1-686-bigmem - Header files for Linux 2.6.24 on PPro/Celeron/PII/PIII/P4
linux-headers-2.6.24-1-all - All header files for Linux 2.6.24
linux-headers-2.6.24-1-all-i386 - All header files for Linux 2.6.24
linux-headers-2.6.24-1-amd64 - Header files for Linux 2.6.24 on AMD64
linux-headers-2.6.24-1-common - Common header files for Linux 2.6.24
linux-headers-2.6.24-1-common-xen - Common header files for Linux 2.6.24
linux-headers-2.6.24-1-xen-686 - Header files for Linux 2.6.24 on i686
r6040-source - RDC R6040 PCI FastEthernet Linux Driver - kernel module sources
rt2400-source - source for rt2400 wireless network driver
rt2500-source - source for rt2500 wireless network driver
linux-headers-2.6.22-3 - Common header files for Linux 2.6.22
linux-headers-2.6.22-3-486 - Header files for Linux 2.6.22 on x86
linux-headers-2.6.22-3-686 - Header files for Linux 2.6.22 on PPro/Celeron/PII/PIII/P4
linux-headers-2.6.22-3-686-bigmem - Header files for Linux 2.6.22 on PPro/Celeron/PII/PIII/P4
linux-headers-2.6.22-3-all - All header files for Linux 2.6.22
linux-headers-2.6.22-3-all-i386 - All header files for Linux 2.6.22
linux-headers-2.6.22-3-amd64 - Header files for Linux 2.6.22 on AMD64
linux-headers-2.6.22-3-k7 - Header files for Linux 2.6.22 on AMD K7
linux-headers-2.6.22-3-vserver - Common header files for Linux 2.6.22
linux-headers-2.6.22-3-vserver-686 - Header files for Linux 2.6.22 on PPro/Celeron/PII/PIII/P4
linux-headers-2.6.22-3-vserver-k7 - Header files for Linux 2.6.22 on AMD K7"
 
Old 04-23-2008, 01:07 PM   #11
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
Okay, so aptitude install linux-headers-2.6.22-3-686
 
Old 04-23-2008, 01:30 PM   #12
barbuceanu
LQ Newbie
 
Registered: Apr 2008
Posts: 28

Original Poster
Rep: Reputation: 15
Thank you so much pljvaldez.

I finally have my driver installed.
 
Old 04-23-2008, 06:24 PM   #13
Junior Hacker
Senior Member
 
Registered: Jan 2005
Location: North America
Distribution: Debian testing Mandriva Ubuntu
Posts: 2,687

Rep: Reputation: 61
As for the CC version error, normally I would just run command: export CC=gcc-4.1 before running the NVIDIA installer (with headers installed of course).
But some smarty pants here at LQ said I was loco and told me to ignore the error and avoid aborting, just continue with building the module. That works also.
 
  


Reply



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
doubt with "make check" of gcc in chapter 6 lfs_rocks Linux From Scratch 1 02-13-2008 12:15 AM
Porting to Fedora gcc 4.0 -parsing backward slash("\") comma(",") code_blew Programming 1 04-26-2006 04:07 PM
gcc version check failed - installing LAN/audio drivers piccolo solo Linux - Software 8 04-09-2006 05:53 PM
nvidia drivers, gcc-version-check failed Seiken Slackware 26 02-25-2005 09:50 PM
check glibc version used by gcc carboncopy Slackware 3 08-12-2003 05:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:49 PM.

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
Open Source Consulting | Domain Registration