gcc install/upgrade question

John Summerfield debian at herakles.homelinux.org
Mon Nov 5 23:00:27 UTC 2007


Ralf Corsepius wrote:
> On Mon, 2007-11-05 at 19:03 +0900, John Summerfield wrote:

>>
>> The standard way in this case is to follow the supplier's advice:FSF in 
>> this case. It should install to /usr/local, well out of your way and 
>> defined by standards to be used this way.
> If you do this, you are replacing the "system compiler" with a local one
> (/usr/local is special to gcc!). You will rarely want to do this under
> linux.

It's true that installing binaries to /usr/local/bin makes it the 
default compiler, but you do get to choose with your PATH settings.

> 
> Much less error prone is to install to a 
> prefix != /usr and prefix != /usr/local.
> 
> The LSB recommended way would be to install to /opt or a subdirectory
> thereof (e.g. --prefix=/opt/gcc42).

/opt commonly seems to be populated with rpms. I'd keep out of it:

07:56 [root at numbat ~]# rpm -qf /opt/Adobe/Reader8/bin/acroread
AdobeReader_enu-8.1.1-1
07:56 [root at numbat ~]#

I prefer --prefix=/usr/local/gcc42 over /opt anything. The vendor 
(Fedora in this case) is forbidden the use of /usr/local (and 
/var/local) beyond the basic layout whereas vendors often use /opt.


-- 

Cheers
John

-- spambait
1aaaaaaa at coco.merseine.nu  Z1aaaaaaa at coco.merseine.nu
-- Advice
http://webfoot.com/advice/email.top.php
http://www.catb.org/~esr/faqs/smart-questions.html
http://support.microsoft.com/kb/555375

Please do not reply off-list




More information about the fedora-list mailing list