public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Help required to upgrade gcc
       [not found] <1207217294.28834.ezmlm@gcc.gnu.org>
@ 2008-04-03 10:34 ` wp
  2008-04-03 10:46   ` Ian Baker
  2008-04-03 11:16   ` Rupert Wood
  0 siblings, 2 replies; 8+ messages in thread
From: wp @ 2008-04-03 10:34 UTC (permalink / raw)
  To: gcc-help

I am facing issuue in upgrading of gcc-4.0.1 to gcc-4.2.0 My distro Mandriva 
2006Not getting any error while compilation, but ggc --version still showing 
the version 4.0.1 only
after compilation.
Steps we have followed is
1. downloded gcc-4.2.0.tar from gnu.org
2. Untar the file
3. ./configure
4. make
5. make install
We did not get a single error in the above steps.

what I do wrong ??Thanks for any helpMarek 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: Help required to upgrade gcc
  2008-04-03 10:34 ` Help required to upgrade gcc wp
@ 2008-04-03 10:46   ` Ian Baker
  2008-04-03 11:16   ` Rupert Wood
  1 sibling, 0 replies; 8+ messages in thread
From: Ian Baker @ 2008-04-03 10:46 UTC (permalink / raw)
  To: 'wp', gcc-help

If you type 'which gcc'
You will see that it reports /usr/bin/gcc
 
This file is a link, under Mandriva, to /etc/alternatives/gcc
Which in turn is a link to the 4.0 version of gcc that you are using. 

If you delete /usr/bin/gcc then it should expose the 4.2 version that you
have installed, depending on where you installed it

Best

Ian

> -----Original Message-----
> From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
> Behalf Of wp
> Sent: 03 April 2008 11:26
> To: gcc-help@gcc.gnu.org
> Subject: Help required to upgrade gcc
> 
> I am facing issuue in upgrading of gcc-4.0.1 to gcc-4.2.0 My distro
> Mandriva
> 2006Not getting any error while compilation, but ggc --version still
> showing
> the version 4.0.1 only
> after compilation.
> Steps we have followed is
> 1. downloded gcc-4.2.0.tar from gnu.org
> 2. Untar the file
> 3. ./configure
> 4. make
> 5. make install
> We did not get a single error in the above steps.
> 
> what I do wrong ??Thanks for any helpMarek


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: Help required to upgrade gcc
  2008-04-03 10:34 ` Help required to upgrade gcc wp
  2008-04-03 10:46   ` Ian Baker
@ 2008-04-03 11:16   ` Rupert Wood
  2008-04-03 12:31     ` Tom Browder
  1 sibling, 1 reply; 8+ messages in thread
From: Rupert Wood @ 2008-04-03 11:16 UTC (permalink / raw)
  To: 'wp'; +Cc: gcc-help

Marek wrote:

> 3. ./configure
> 4. make
> 5. make install

This will have built a new version of GCC and installed it in /usr/local/bin. You can use the new version if you add that directory to your path. You may also need to ensure /usr/local/lib is in your LD_LIBRARY_PATH. Note that the GCC install instructions recommend building GCC outside the source directory, i.e. you shouldn't be using "./configure" in step 3 - see http://gcc.gnu.org/install/configure.html

To overwrite your existing GCC system you need to use "--prefix=/usr" on the compile line or similar. Probably the best thing to do would be to look at the entire configure line from your currently installed GCC (use "gcc -v") and copy / paste that. However are you sure you want to do that? If you have existing C++ libraries built with the old compiler, for example, these will very likely be incompatible with the new C++ compiler. It may be easier to leave the new version of GCC in /usr/local and run it from there, or start again with a fresh Linux install if you do really want to update your system compiler.

Rup.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Help required to upgrade gcc
  2008-04-03 11:16   ` Rupert Wood
@ 2008-04-03 12:31     ` Tom Browder
  2008-04-03 18:49       ` wp
  0 siblings, 1 reply; 8+ messages in thread
From: Tom Browder @ 2008-04-03 12:31 UTC (permalink / raw)
  To: gcc-help; +Cc: wp

On Thu, Apr 3, 2008 at 5:46 AM, Rupert Wood <me@rupey.net> wrote:
> Marek wrote:
...
>  To overwrite your existing GCC system you need to use "--prefix=/usr" on the compile

I have used multiple versions of gcc for years (mostly under
redhat/fedora) and have had good luck with installing a new version
under the default /usr/local but using the configure option
'--program-suffix=-X.Y.Z' where the 'X.Y.Z' is the version number.

Then i can use 'gcc-X.Y.Z' or the default 'gcc' as desired, and I've
never had any conflicts beteen the various versions.

-Tom

P.S.  And as Rup mentioned, I NEVER build in the gcc source directory.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Help required to upgrade gcc
  2008-04-03 12:31     ` Tom Browder
@ 2008-04-03 18:49       ` wp
  2008-04-03 21:06         ` Tom Browder
  0 siblings, 1 reply; 8+ messages in thread
From: wp @ 2008-04-03 18:49 UTC (permalink / raw)
  To: gcc-help

Hi
I instal another gcc. And now I have two gcc ( gcc 4.0.1 and 4.2.0) instaled

But when I try change default gcc by: update-alternatives --config gcc i 
have the answer:
There is only 1 program which provides gcc
(/usr/bin/gcc-4.0.1). Nothing to configure.

I install another gcc folow this step:
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --program-suffix=-4.2.0

make

make check-gcc

make install



What I do wrong ?

Any sugestions ?


Thanks for help

Martek


----- Original Message ----- 
From: "Tom Browder" <tom.browder@gmail.com>
To: <gcc-help@gcc.gnu.org>
Cc: "wp" <qwertygd@wp.pl>
Sent: Thursday, April 03, 2008 1:16 PM
Subject: Re: Help required to upgrade gcc


> On Thu, Apr 3, 2008 at 5:46 AM, Rupert Wood <me@rupey.net> wrote:
>> Marek wrote:
> ...
>>  To overwrite your existing GCC system you need to use "--prefix=/usr" on 
>> the compile
>
> I have used multiple versions of gcc for years (mostly under
> redhat/fedora) and have had good luck with installing a new version
> under the default /usr/local but using the configure option
> '--program-suffix=-X.Y.Z' where the 'X.Y.Z' is the version number.
>
> Then i can use 'gcc-X.Y.Z' or the default 'gcc' as desired, and I've
> never had any conflicts beteen the various versions.
>
> -Tom
>
> P.S.  And as Rup mentioned, I NEVER build in the gcc source directory.
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Help required to upgrade gcc
  2008-04-03 18:49       ` wp
@ 2008-04-03 21:06         ` Tom Browder
  0 siblings, 0 replies; 8+ messages in thread
From: Tom Browder @ 2008-04-03 21:06 UTC (permalink / raw)
  To: wp; +Cc: gcc-help

On 4/3/08, wp <qwertygd@wp.pl> wrote:
> Hi
> I instal another gcc. And now I have two gcc ( gcc 4.0.1 and 4.2.0) instaled
>
> But when I try change default gcc by: update-alternatives --config gcc i
> have the answer:
> There is only 1 program which provides gcc
> (/usr/bin/gcc-4.0.1). Nothing to configure.
>
> I install another gcc folow this step:
> ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
> --program-suffix=-4.2.0

There are several ways to make a particular gcc the default one.  And
which works depends on the tools and programs looking for gcc.

For example, the last time I tried to compile Qt with a non-default
gcc it was impossible to make anything other than 'gcc' work, and it
was aknowledged as impossible by the Trolltech team.  In that case I
believe you can do something like:

  % which gcc
  /usr/bin/gcc
  % mv /usr/bin/gcc /usr/bin/gcc.orig
  % ln -s /usr/local/bin/gcc-4.2.0 /usr/bin/gcc

I have my development environment somewhat better under control since
I don't routinely use bad children like Qt.  So I set environment
variables like so (inside such system resource files such as
/etc/profile.d/gcc.sh):

  export CXX=/usr/local/bin/g++-4.3.0
  export CC=/usr/local/bin/gcc-4.3.0

That seems to work for most GNU packages (includiing gcc) which always
seem to find my desired gcc version.

I also set those variables inside most of my Makefiles.

That works for me most of the time, and I've had up to 5 or 6 versions
of gcc-X.Y.Z at a time over the years

-Tom

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Help required to upgrade gcc
  2007-05-28  9:37 Santhosh1 C
@ 2007-05-30  1:09 ` Ian Lance Taylor
  0 siblings, 0 replies; 8+ messages in thread
From: Ian Lance Taylor @ 2007-05-30  1:09 UTC (permalink / raw)
  To: Santhosh1 C; +Cc: gcc-help

Santhosh1 C <santhosh1.c@tcs.com> writes:

> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you

Please do not send messages with this sort of attachment to the gcc
mailing lists.  They are against list policy as described at
http://gcc.gnu.org/lists.html.  If these disclaimers are added
automatically and you can not turn them off, I recommend using a free
web based e-mail service such as the ones offered by Google or
Yahoo!.  Thanks.

Ian

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Help required to upgrade gcc
@ 2007-05-28  9:37 Santhosh1 C
  2007-05-30  1:09 ` Ian Lance Taylor
  0 siblings, 1 reply; 8+ messages in thread
From: Santhosh1 C @ 2007-05-28  9:37 UTC (permalink / raw)
  To: gcc-help


I am facing issuue in upgrading of gcc-3.3.1 to gcc-4.1.1 in HP-UX 11.11.
Not getting any error while compilation, but showing the version 3.3.1 only
after compilation.
Steps we have followed is
1. downloded gcc-4.1.1.tar from gnu.org
2. Untar the file
3. ./configure
4. gmake all
5. gmake install
We did not get a single error in the above steps.

Can you help to upgrade the gcc to 4.1.1 by providing the steps and
procedure etc....


Regards
Santhosh C
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-04-03 18:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1207217294.28834.ezmlm@gcc.gnu.org>
2008-04-03 10:34 ` Help required to upgrade gcc wp
2008-04-03 10:46   ` Ian Baker
2008-04-03 11:16   ` Rupert Wood
2008-04-03 12:31     ` Tom Browder
2008-04-03 18:49       ` wp
2008-04-03 21:06         ` Tom Browder
2007-05-28  9:37 Santhosh1 C
2007-05-30  1:09 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).