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

Re: gcc version issue trying to install vmware5

Ernest jw ter Kuile <ejwtk04@xs4all.nl> writes:

> On Monday 13 June 2005 09:25, Goswin von Brederlow wrote:
>> Changing the link breaks your debian system.
> this is not true.
> I've had this link pointing to gcc-3.4 since quite a while. Every time gcc 
> must be reinstalled (which is not often) i simply replace the link. 
> everything works, nothing is broken. 
> Beside, wat could this break ? 
>> If you must then create a /usr/local/bin/gcc. Debian won't overwrite that.
> in what way would this be different ? if changing the link breaks Debian, why 
> would this not ? it has the same effect (hint : no packages use /usr/bin/gcc, 
> and they shouldn't) .

System accounts are unlikely to have /usr/local/ in their path before

mrvn@frosties:~% echo $PATH
mrvn@frosties:~% su -
root@frosties:~# echo $PATH

See the difference. My user would get /usr/local/bin/gcc while root
still gets /usr/bin/gcc.

>>> "gcc" package insists that gcc -> gcc-3.3.
>>And rightly so.
> Wrong. It should guard the (current) default, and not prevent people from 
> changing it.
> Beside, when setting this default, it should use the "alternative" method 
> Debian has perfected, and which is used by most other packages specifically 
> for this purpose.

No. gcc specificaly does not use the alternative system because
different gcc versions are incompatible. You can't just switch between
them. They are not alternatives to produce object files but each one
has its own kind of object files.

Even gcc 3.3 and 3.4 on amd64 have slight differences in their abi
that can cause programs to break if you mix. g++ 3.3 and 3.4 are so
different nearly everything fails when mixing the two.

The exact same reason kernel modules want the same gcc version is the
reason gcc can't be an alternative.

> Even so, I do agree that on upgrade, package gcc should want to restore the 
> current gcc to the default version Debian is using. It most definitly should 
> _ask_ before doing so. 

Since it is not an alternative and not configurable at all it (dpkg)
is right to not ask. dpkg just unpacks the link contained in the deb.

>>> I'd much prefer to set an environment variable as well, but it's going to
>>> require a deeper understanding of the module compilation subsystem of the
>>> 2.6 kernel.  Both CC and HOSTCC seem to be ignored.
>> Did you export it?
> that doesn't help.
> The Makefile that comes with the kernel.org source clobbers any existing CC 
> and HOSTCC.
> I don't think Debian has changed that behavior.

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);

>>> I think that the kernel doesn't and the nvidia modules 
>>> _need_ the 3.4 version.  
>>The kernel doesn't use gcc. It uses gcc-3.4 because that is the 
>>only one that can build 64bit kernels on i386.
> 1) the kernel build system as provided by kernel.org uses gcc. Not a specific 
> gcc, just any available gcc (nearly, it does check for really old gccs). 
> 2) using gcc-3.3 to build a amd64 kernel is not efficient, but the resulting 
> kernel will boot without any trouble, even if a bit slow. It is not broken in 
> anyway (try it!).

I actualy use gcc-3.3 for my kernel because I was to lazy / forgot to
use a different one. Never had a problem with it.

>>Any kernel modules you build also have to use gcc-3.4 and not gcc.
> All kernel modules should be compiled using the exact same gcc as the 
> one used to compile the kernel. if you use gcc-3.3 for the kernel, modules 
> should use that too. 
> If one module (nvidia) requires gcc version 3.4 or higher, then the kernel and 
> all other modules must be recompiled to use that same gcc.
> Just for the record : changing the kernel Makefile (as Debian apparently did) 
> to force a specific gcc is IMNSHO dumb.

The kernel Makefile isn't changed to force a gcc version afaik. The
Debian system ships a gcc link (or script on some archs) that garanties
calling gcc will use a gcc version compatible with the existing
binaries and libs.

>>But that doesn't mean gcc-3.4 should be THE gcc.
> Goswin, nobody claimed that. They just want easy choice. 
> what about changing package gcc to check available versions of gcc, and asking 
> the user the one they want to ?

Can't work. The C/C++ ABI to use is not a users/admins choice but must
be made by debian prior to compiling all packages.

> Don't worry, I'm still using Debian, and I don't plan to change.
> Ernest ter Kuile.
> a developer.


Reply to: