LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Gcc issue i think (http://www.linuxquestions.org/questions/debian-26/gcc-issue-i-think-613231/)

djcs 01-13-2008 03:31 AM

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

Uncle_Theodore 01-13-2008 09:31 AM

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.

Telemachos 01-13-2008 01:01 PM

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.

djcs 01-14-2008 02:06 AM

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 :D

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

Telemachos 01-14-2008 07:39 AM

Quote:

Originally Posted by djcs (Post 3021669)
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.)

djcs 01-15-2008 03:24 AM

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

Appreciate the help. :D

DJ



Quote:

Originally Posted by Telemachos (Post 3021873)
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.)



All times are GMT -5. The time now is 03:32 PM.