LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 01-13-2008, 02:31 AM   #1
djcs
Member
 
Registered: Jun 2006
Posts: 43

Rep: Reputation: 15
Gcc issue i think


Hi all,
i keep getting error messages similar to this:
Inappropriate build environment: you wanted to use gcc version 4.2.3 while kernel attempts to use gcc version 4.1.3

How can i fix it so that everything works without error?

DJ
 
Old 01-13-2008, 08:31 AM   #2
Uncle_Theodore
Member
 
Registered: Dec 2007
Location: Charleston WV, USA
Distribution: Slackware 12.2, Arch Linux Amd64
Posts: 896

Rep: Reputation: 60
What distro do you use?
What are you trying to compile?

Usually, this error indicates that you're trying to compile a kernel module (for VMWare, for example), using the newer compiler, while the kernel in which this module is supposed to be inserted is compiled with an older version of gcc.

The easiest workaround is, of course, to recompile your kernel with the new version of gcc, the one you have on your system.
 
Old 01-13-2008, 12:01 PM   #3
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 59
Actually I think that a slightly easier solution is to temporarily change which compiler you use with this command
Code:
export CC=/usr/bin/gcc-4.1.3
That will change you back to gcc-4.1.3 for that terminal session. There may be larger reasons not to do this, but I have done it a few times.
 
Old 01-14-2008, 01:06 AM   #4
djcs
Member
 
Registered: Jun 2006
Posts: 43

Original Poster
Rep: Reputation: 15
Thank you

Thank you for your replies.
I was a little rushed and annoyed when i put this up, so i didnt put enough detail in it.

Currently running debian lenny.
Good guess though as i was trying to install vmware

If i do issue :
export CC=/usr/bin/gcc-4.1.3

Will it cause any issues with my vmware install, and what do i have to do to set the system back to the correct gcc?
I would assume it would be:
export CC=/usr/bin/gcc-4.2

Any help is appreciated.
In saying that, i dont want to do anything that will break my system.

DJ
 
Old 01-14-2008, 06:39 AM   #5
Telemachos
Member
 
Registered: May 2007
Distribution: Debian
Posts: 754

Rep: Reputation: 59
Quote:
Originally Posted by djcs View Post
If i do issue :
export CC=/usr/bin/gcc-4.1.3

Will it cause any issues with my vmware install, and what do i have to do to set the system back to the correct gcc?
I would assume it would be:
export CC=/usr/bin/gcc-4.2
If Vmware is asking for gcc-4.1.3, then I don't think that giving it gcc-4.1.3 should hurt it. That said, I don't know anything about Vmware per se. As for your second question, you don't have to do anything to get back to normal. The change will only last as long as the terminal session where you issue "export CC=/usr/bin/gcc-4.1.3". Enter that, install Vmware, then close that terminal window. That's it. (You can verify after by opening another windown and entering "which gcc" or "gcc --version", but normally an export like that is temporary. (If you needed it permanent, you would put it in your .bashrc or .profile or the like.)
 
Old 01-15-2008, 02:24 AM   #6
djcs
Member
 
Registered: Jun 2006
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks

Thanks heaps for that, i have gotten a good answer, quickly.

Appreciate the help.

DJ



Quote:
Originally Posted by Telemachos View Post
If Vmware is asking for gcc-4.1.3, then I don't think that giving it gcc-4.1.3 should hurt it. That said, I don't know anything about Vmware per se. As for your second question, you don't have to do anything to get back to normal. The change will only last as long as the terminal session where you issue "export CC=/usr/bin/gcc-4.1.3". Enter that, install Vmware, then close that terminal window. That's it. (You can verify after by opening another windown and entering "which gcc" or "gcc --version", but normally an export like that is temporary. (If you needed it permanent, you would put it in your .bashrc or .profile or the like.)
 
  


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
centos4.5 - gcc issue? jp-lack Linux - General 1 06-15-2007 09:14 PM
Issue with libc6 and gcc loke137 Linux - General 3 05-01-2007 04:01 PM
FC3 ,FC4 and GCC issue vineet7kumar Linux - Newbie 1 07-17-2006 05:12 AM
gcc 3.4.2 and template issue ahwkong Programming 1 04-16-2005 01:18 PM
GCC 3.3.2-6 Installation Issue Shoal Linux - Software 1 11-02-2004 07:24 PM


All times are GMT -5. The time now is 06:56 PM.

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