LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 09-03-2007, 12:45 PM   #1
replica9000
Member
 
Registered: Jul 2006
Location: Quahog, Rhode Island
Distribution: Debian 'Sid', FreeBSD, Android
Posts: 698
Blog Entries: 2

Rep: Reputation: 125Reputation: 125
Wrong GCC version


I updated my Debian system going from Etch to Sid (kernel 2.6.18-5-K7 to 2.6.22-1-K7)

I'm trying to reconfigure VMWare to work with the new kernel and when I do I get this error:

Code:
Your kernel was built with "gcc" version "4.1.3", while you are trying to use 
"/usr/bin/gcc" version "4.2.1". This configuration is not recommended and 
VMware Workstation may crash if you'll continue. Please try to use exactly same
compiler as one used for building your kernel. Do you want to go with compiler 
"/usr/bin/gcc" version "4.2.1" anyway? [no]
I can't find a way to downgrade GCC. How do I make the kernel GCC and installed GCC match?
 
Old 09-03-2007, 02:22 PM   #2
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 800

Rep: Reputation: 100Reputation: 100
You should be able to get gcc 4.1.3 thru synaptic. Or you could just rebuild your kernel with your current version of gcc.
 
Old 09-03-2007, 05:38 PM   #3
almatic
Member
 
Registered: Mar 2007
Distribution: Debian
Posts: 547

Rep: Reputation: 67
this may sound like a stupid question but did you actually boot the new kernel after update ? Usually debian has the correct gcc version installed.

You can downgrade the gcc by adding the testing repository and then do 'aptitude install gcc/testing'. But make sure that this is really your problem (type 'cat /proc/version' to see what compiler was used for the kernel and 'gcc --version' for the gcc version). You can also have more versions of gcc installed as gcc is just a symlink to /usr/bin/gcc-version.
 
Old 09-03-2007, 10:45 PM   #4
replica9000
Member
 
Registered: Jul 2006
Location: Quahog, Rhode Island
Distribution: Debian 'Sid', FreeBSD, Android
Posts: 698
Blog Entries: 2

Original Poster
Rep: Reputation: 125Reputation: 125
Quote:
Originally Posted by almatic View Post
this may sound like a stupid question but did you actually boot the new kernel after update ? Usually debian has the correct gcc version installed.

You can downgrade the gcc by adding the testing repository and then do 'aptitude install gcc/testing'. But make sure that this is really your problem (type 'cat /proc/version' to see what compiler was used for the kernel and 'gcc --version' for the gcc version). You can also have more versions of gcc installed as gcc is just a symlink to /usr/bin/gcc-version.
Of course I rebooted into the correct kernel, it was the first thing I did after the upgrade finished.

This is the current version reported by those commands:
Code:
debian-etchtop:/home/replica# cat /proc/version
Linux version 2.6.22-1-k7 (Debian 2.6.22-3) (waldi@debian.org) (gcc version 4.1.3 20070718 (prerelease) (Debian 4.1.2-14)) #1 SMP Sun Jul 29 15:15:55 UTC 2007
debian-etchtop:/home/replica# gcc --version
gcc (GCC) 4.2.1 (Debian 4.2.1-3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
And I viewed the properties of /usr/bin/gcc and that came up as /usr/bin/gcc-4.2

I have files for both gcc-4.1 and gcc-4.2 installed
http://www.replica9000.bizland.com/l...snapshot30.png

So should I simply point the link to gcc-4.1? Or is there something else I should do?
 
Old 09-04-2007, 04:55 AM   #5
almatic
Member
 
Registered: Mar 2007
Distribution: Debian
Posts: 547

Rep: Reputation: 67
Quote:
Originally Posted by replica9000 View Post
So should I simply point the link to gcc-4.1? Or is there something else I should do?
yup, make a new symlink, then try the installation again.
 
Old 09-04-2007, 02:20 PM   #6
replica9000
Member
 
Registered: Jul 2006
Location: Quahog, Rhode Island
Distribution: Debian 'Sid', FreeBSD, Android
Posts: 698
Blog Entries: 2

Original Poster
Rep: Reputation: 125Reputation: 125
Quote:
Originally Posted by almatic View Post
yup, make a new symlink, then try the installation again.
Well it worked, sort of. Not sure if it's gcc or the kernel headers that's the problem, or the vmware-config.pl script:

Code:
None of the pre-built vmmon modules for VMware Workstation is suitable for your
running kernel.  Do you want this program to try to build the vmmon module for 
your system (you need to have a C compiler installed on your system)? [yes] 

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux-headers-2.6.22-1-k7/include] 

Extracting the sources of the vmmon module.

Building the vmmon module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config1/vmmon-only'
make -C /usr/src/linux-headers-2.6.22-1-k7/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.22-1-k7'
  CC [M]  /tmp/vmware-config1/vmmon-only/linux/driver.o
In file included from /tmp/vmware-config1/vmmon-only/linux/driver.c:80:
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘compat_exit’
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: error: expected declaration specifiers or ‘...’ before ‘exit_code’
/tmp/vmware-config1/vmmon-only/./include/compat_kernel.h:21: warning: type defaults to ‘int’ in declaration of ‘_syscall1’
make[2]: *** [/tmp/vmware-config1/vmmon-only/linux/driver.o] Error 1
make[1]: *** [_module_/tmp/vmware-config1/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.22-1-k7'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config1/vmmon-only'
Unable to build the vmmon module.

For more information on how to troubleshoot module-related problems, please 
visit our Web site at "http://www.vmware.com/download/modules/modules.html" and
"http://www.vmware.com/support/reference/linux/prebuilt_modules_linux.html".

Execution aborted.
I had no issues installing this before.
 
Old 09-04-2007, 04:04 PM   #7
replica9000
Member
 
Registered: Jul 2006
Location: Quahog, Rhode Island
Distribution: Debian 'Sid', FreeBSD, Android
Posts: 698
Blog Entries: 2

Original Poster
Rep: Reputation: 125Reputation: 125
Scratch that last problem. I found out I needed a patch (vmware-any-any-update113.tar.gz) for the kernel 2.6.22-1 from http://platan.vc.cvut.cz/ftp/pub/vmware/

ran the patch script followed by the vmware-config.pl script and everything appears to be working good.

Thanks for you help with my gcc problem though.
 
  


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
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 03:54 PM
Wrong GCC version during compile? raid517 Linux - Software 4 09-14-2005 09:46 AM
Missing gcc or wrong version NoobVer.01 Fedora - Installation 1 08-19-2005 03:00 AM
slackware startx starts the wrong version, i didn't even know i had another version edman007 Linux - Software 3 05-16-2004 08:38 PM
export CC=/usr/bin/gcc-3.2 - switch gcc version? ferreter Linux - Software 1 08-20-2003 01:07 AM


All times are GMT -5. The time now is 08:08 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration