[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gcc version issue trying to install vmware5



Goswin von Brederlow wrote:

> The vmware-config.pl script does care about the environment:
> 
> sub get_cc {
>   $gHelper{'gcc'} = '';
>   if (defined($ENV{'CC'}) && (not ($ENV{'CC'} eq ''))) {
>     $gHelper{'gcc'} = internal_which($ENV{'CC'});
> 
> If CC is set it will be used. It even says:
> 
>   print wrap('Using compiler "' . $gHelper{'gcc'}
>              . '". Use environment variable CC to override.' . "\n\n", 0);

Well, it cares about it, but setting CC still doesn't work.  I removed the
symlink I hand-libbed onto the box for gcc-3.4 and then did "apt-get install
--reinstall gcc" to make sure that things are setup the Debian way, exported
CC, and tried to compile:

$ export CC=gcc-3.4
$ sudo vmware-config.pl
Making sure services for VMware Workstation are stopped.

Stopping VMware services:

<snip>

Trying to find a suitable vmmon module for your running kernel.

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-3.4". Use environment variable CC to override.

What is the location of the directory of C header files that match your
running kernel? [/lib/modules/2.6.11.11/build/include]

Extracting the sources of the vmmon module.

Building the vmmon module.

Using 2.6.x kernel build system.
...
make[1]: Entering directory `/usr/src/linux-2.6.11.11'
/tmp/vmware-config0/vmmon-only/Makefile:87: *** Inappropriate build
environment you wanted to use gcc version 3.4.5 while kernel attempts to use
gcc version 3.3.6.
/tmp/vmware-config0/vmmon-only/Makefile:89: *** For proper build you'll have
to replace gcc with symbolic link to /usr/bin/gcc-3.4.  Stop.
make[1]: *** [_module_/tmp/vmware-config0/vmmon-only] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.11.11'
make: *** [vmmon.ko] Error 2
make: Leaving directory `/tmp/vmware-config0/vmmon-only'
Unable to build the vmmon module.

<snip remaining>

Just to be damn sure that the kernel build system wouldn't "remember" that I
had previously used gcc and was now trying to use gcc-3.4, I rebuilt my
kernel using:

	make CC=gcc-3.4 HOSTCC=gcc-3.4

And the results are the same, (as someone previously on this thread
indicated they would be).

vmware-config.pl overwrites the PATH (line 7746 in the current vmware5), so
dropping a symlink for gcc into /usr/local/bin/ doesn't help (without
modifying the script).  Exporting CC to be /usr/local/bin/gcc also fails
with the same errors listed above.

However, with the symlink in place and /usr/local/bin/ in my PATH, I was
able to use module-assistant to build the nvidia kernel module, and the
build system for the ivtv modules also works, so I imagine other stuff does
as well.  So, in summary, the gcc symlink in /usr/local/bin/ works pretty
well (at least for me, YMMV), and vmware-config.pl is not going to work
without either placing something in /usr/bin (e.g. /usr/bin/vmwarecc ->
/usr/bin/gcc-3.4) or modifying the script to not muck with the PATH.

Thanks,
tony



Reply to: