public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] coexisting GCC versions
@ 2009-06-27 22:47 Roger Mason
  2009-06-27 23:14 ` Volker Armin Hemmann
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Roger Mason @ 2009-06-27 22:47 UTC (permalink / raw
  To: gentoo-user; +Cc: rmason

Hello,

I need gcc 4.3 to compile a specific application.  I am hoping that I
can install gcc 4.3 alongside 4.1.1 without suffering some awful
catastrophe.  This is the output of emerge on the machine in question:

emerge -pv gcc

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] sys-devel/gcc-config-1.4.0-r4 [1.3.14] 0 kB [?=>0]
[ebuild  N    ] app-arch/lzma-utils-4.32.7  USE="-nocxx" 469 kB [0]
[ebuild     U ] dev-libs/mpfr-2.4.1_p1 [2.2.0_p10] 883 kB [?=>0]
[ebuild     U ] sys-libs/glibc-2.8_p20080602-r1 [2.4-r4] USE="gd%*
-debug% -glibc-omitfp (-hardened) (-multilib) -nls -profile (-selinux)
-vanilla% (-build%) (-glibc-compat20%) (-nptl%*) (-nptlonly%*)" 16,415
kB [?=>0]
[ebuild  NS   ] sys-devel/gcc-4.3.2-r3 [4.1.1-r3] USE="doc fortran gcj
gtk mudflap openmp (-altivec) -bootstrap -build (-fixed-point)
(-hardened) -ip28 -ip32r10k -libffi (-multilib) -multislot (-n32) (-n64)
-nls -nocxx -nopie -objc -objc++ -objc-gc -test -vanilla" 58,990 kB [0]

Can someone confirm that I'll be able to use gcc 4.3 for the specific
application that needs it but then revert to 4.1.1 without having to
re-compile all or most of my system?

Thanks,

Roger



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

* Re: [gentoo-user] coexisting GCC versions
  2009-06-27 22:47 [gentoo-user] coexisting GCC versions Roger Mason
@ 2009-06-27 23:14 ` Volker Armin Hemmann
  2009-06-27 23:24 ` Alex Schuster
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 23+ messages in thread
From: Volker Armin Hemmann @ 2009-06-27 23:14 UTC (permalink / raw
  To: gentoo-user

On Sonntag 28 Juni 2009, Roger Mason wrote:
> Hello,
>
> I need gcc 4.3 to compile a specific application.  I am hoping that I
> can install gcc 4.3 alongside 4.1.1 without suffering some awful
> catastrophe.  This is the output of emerge on the machine in question:
>
> emerge -pv gcc
>
> These are the packages that would be merged, in order:
>
> Calculating dependencies... done!
> [ebuild     U ] sys-devel/gcc-config-1.4.0-r4 [1.3.14] 0 kB [?=>0]
> [ebuild  N    ] app-arch/lzma-utils-4.32.7  USE="-nocxx" 469 kB [0]
> [ebuild     U ] dev-libs/mpfr-2.4.1_p1 [2.2.0_p10] 883 kB [?=>0]
> [ebuild     U ] sys-libs/glibc-2.8_p20080602-r1 [2.4-r4] USE="gd%*
> -debug% -glibc-omitfp (-hardened) (-multilib) -nls -profile (-selinux)
> -vanilla% (-build%) (-glibc-compat20%) (-nptl%*) (-nptlonly%*)" 16,415
> kB [?=>0]
> [ebuild  NS   ] sys-devel/gcc-4.3.2-r3 [4.1.1-r3] USE="doc fortran gcj
> gtk mudflap openmp (-altivec) -bootstrap -build (-fixed-point)
> (-hardened) -ip28 -ip32r10k -libffi (-multilib) -multislot (-n32) (-n64)
> -nls -nocxx -nopie -objc -objc++ -objc-gc -test -vanilla" 58,990 kB [0]
>
> Can someone confirm that I'll be able to use gcc 4.3 for the specific
> application that needs it but then revert to 4.1.1 without having to
> re-compile all or most of my system?

yes



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

* Re: [gentoo-user] coexisting GCC versions
  2009-06-27 22:47 [gentoo-user] coexisting GCC versions Roger Mason
  2009-06-27 23:14 ` Volker Armin Hemmann
@ 2009-06-27 23:24 ` Alex Schuster
  2009-06-27 23:31   ` Volker Armin Hemmann
  2009-06-28  9:54 ` Roger Mason
  2009-06-28 17:54 ` Roger Mason
  3 siblings, 1 reply; 23+ messages in thread
From: Alex Schuster @ 2009-06-27 23:24 UTC (permalink / raw
  To: gentoo-user

Roger Mason writes:

> I need gcc 4.3 to compile a specific application.  I am hoping that I
> can install gcc 4.3 alongside 4.1.1 without suffering some awful
> catastrophe.  This is the output of emerge on the machine in question:
[...]
> Can someone confirm that I'll be able to use gcc 4.3 for the specific
> application that needs it but then revert to 4.1.1 without having to
> re-compile all or most of my system?

I'm pretty sure you can. Emerge gcc 4.3, activate it with gcc-config, 
compile your application, and use gcc-config again to revert back to 4.1 if 
you like.

Or keep 4.3 as default, I don't think you could run into problems.

	Wonko




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

* Re: [gentoo-user] coexisting GCC versions
  2009-06-27 23:24 ` Alex Schuster
@ 2009-06-27 23:31   ` Volker Armin Hemmann
  2009-06-28  3:01     ` Dale
                       ` (2 more replies)
  0 siblings, 3 replies; 23+ messages in thread
From: Volker Armin Hemmann @ 2009-06-27 23:31 UTC (permalink / raw
  To: gentoo-user

On Sonntag 28 Juni 2009, Alex Schuster wrote:
> Roger Mason writes:
> > I need gcc 4.3 to compile a specific application.  I am hoping that I
> > can install gcc 4.3 alongside 4.1.1 without suffering some awful
> > catastrophe.  This is the output of emerge on the machine in question:
>
> [...]
>
> > Can someone confirm that I'll be able to use gcc 4.3 for the specific
> > application that needs it but then revert to 4.1.1 without having to
> > re-compile all or most of my system?
>
> I'm pretty sure you can. Emerge gcc 4.3, activate it with gcc-config,
> compile your application, and use gcc-config again to revert back to 4.1 if
> you like.
>
> Or keep 4.3 as default, I don't think you could run into problems.
>
> 	Wonko

he will over time. If you switch default compiler emerge -s world has to be 
done.

But seriously, why staying with 4.1? it's old... and 4.3 was a nice release...



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

* Re: [gentoo-user] coexisting GCC versions
       [not found]   ` <cRPF5-8gd-3@gated-at.bofh.it>
@ 2009-06-28  2:48     ` Gregory Shearman
  2009-06-28  2:51       ` Mark Loeser
  0 siblings, 1 reply; 23+ messages in thread
From: Gregory Shearman @ 2009-06-28  2:48 UTC (permalink / raw
  To: gentoo-user

In linux.gentoo.user, you wrote:
> On Sonntag 28 Juni 2009, Alex Schuster wrote:
>> Roger Mason writes:
>> > I need gcc 4.3 to compile a specific application.  I am hoping that I
>> > can install gcc 4.3 alongside 4.1.1 without suffering some awful
>> > catastrophe.  This is the output of emerge on the machine in question:
>>
>> [...]
>>
>> > Can someone confirm that I'll be able to use gcc 4.3 for the specific
>> > application that needs it but then revert to 4.1.1 without having to
>> > re-compile all or most of my system?
>>
>> I'm pretty sure you can. Emerge gcc 4.3, activate it with gcc-config,
>> compile your application, and use gcc-config again to revert back to 4.1 if
>> you like.
>>
>> Or keep 4.3 as default, I don't think you could run into problems.
>>
>> 	Wonko
>
> he will over time. If you switch default compiler emerge -s world has to be 
> done.
>
> But seriously, why staying with 4.1? it's old... and 4.3 was a nice release...

Well, for me, media-plugins/mytharchive won't compile with gcc 4.3.
Hopefully things will change with the next mythtv release.

-- 
Regards,

Gregory.



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

* Re: [gentoo-user] coexisting GCC versions
  2009-06-28  2:48     ` [gentoo-user] coexisting GCC versions Gregory Shearman
@ 2009-06-28  2:51       ` Mark Loeser
  0 siblings, 0 replies; 23+ messages in thread
From: Mark Loeser @ 2009-06-28  2:51 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

Gregory Shearman <zekeyg@gmail.com> said:
> In linux.gentoo.user, you wrote:
> > he will over time. If you switch default compiler emerge -s world has to be 
> > done.
> >
> > But seriously, why staying with 4.1? it's old... and 4.3 was a nice release...
> 
> Well, for me, media-plugins/mytharchive won't compile with gcc 4.3.
> Hopefully things will change with the next mythtv release.

Please file a bug so we actually know about the problem and can fix it
:)

https://bugs.gentoo.org/

-- 
Mark Loeser
email         -   halcy0n AT gentoo DOT org
email         -   mark AT halcy0n DOT com
web           -   http://www.halcy0n.com

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: [gentoo-user] coexisting GCC versions
  2009-06-27 23:31   ` Volker Armin Hemmann
@ 2009-06-28  3:01     ` Dale
  2009-06-28  3:37       ` Volker Armin Hemmann
  2009-06-28  3:39     ` Alex Schuster
  2009-06-28  7:31     ` Dirk Heinrichs
  2 siblings, 1 reply; 23+ messages in thread
From: Dale @ 2009-06-28  3:01 UTC (permalink / raw
  To: gentoo-user

Volker Armin Hemmann wrote:
> On Sonntag 28 Juni 2009, Alex Schuster wrote:
>   
>> Roger Mason writes:
>>     
>>> I need gcc 4.3 to compile a specific application.  I am hoping that I
>>> can install gcc 4.3 alongside 4.1.1 without suffering some awful
>>> catastrophe.  This is the output of emerge on the machine in question:
>>>       
>> [...]
>>
>>     
>>> Can someone confirm that I'll be able to use gcc 4.3 for the specific
>>> application that needs it but then revert to 4.1.1 without having to
>>> re-compile all or most of my system?
>>>       
>> I'm pretty sure you can. Emerge gcc 4.3, activate it with gcc-config,
>> compile your application, and use gcc-config again to revert back to 4.1 if
>> you like.
>>
>> Or keep 4.3 as default, I don't think you could run into problems.
>>
>> 	Wonko
>>     
>
> he will over time. If you switch default compiler emerge -s world has to be 
> done.
>
> But seriously, why staying with 4.1? it's old... and 4.3 was a nice release...
>
>
>   

Except for me and a couple others.  I had programs that crashed,
couldn't get a kernel to work and other issues.  I had to go back to
4.1on this rig.  After going back, everything works fine.

Dale

:-)  :-) 



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

* Re: [gentoo-user] coexisting GCC versions
  2009-06-28  3:01     ` Dale
@ 2009-06-28  3:37       ` Volker Armin Hemmann
  2009-06-28  4:14         ` Dale
  0 siblings, 1 reply; 23+ messages in thread
From: Volker Armin Hemmann @ 2009-06-28  3:37 UTC (permalink / raw
  To: gentoo-user

On Sonntag 28 Juni 2009, Dale wrote:
> Volker Armin Hemmann wrote:
> > On Sonntag 28 Juni 2009, Alex Schuster wrote:
> >> Roger Mason writes:
> >>> I need gcc 4.3 to compile a specific application.  I am hoping that I
> >>> can install gcc 4.3 alongside 4.1.1 without suffering some awful
> >>> catastrophe.  This is the output of emerge on the machine in question:
> >>
> >> [...]
> >>
> >>> Can someone confirm that I'll be able to use gcc 4.3 for the specific
> >>> application that needs it but then revert to 4.1.1 without having to
> >>> re-compile all or most of my system?
> >>
> >> I'm pretty sure you can. Emerge gcc 4.3, activate it with gcc-config,
> >> compile your application, and use gcc-config again to revert back to 4.1
> >> if you like.
> >>
> >> Or keep 4.3 as default, I don't think you could run into problems.
> >>
> >> 	Wonko
> >
> > he will over time. If you switch default compiler emerge -s world has to
> > be done.
> >
> > But seriously, why staying with 4.1? it's old... and 4.3 was a nice
> > release...
>
> Except for me and a couple others.  I had programs that crashed,
> couldn't get a kernel to work and other issues.  I had to go back to
> 4.1on this rig.  After going back, everything works fine.
>
> Dale
>
> :-)  :-)

*shrug* especially the kernel should never have had problems with 4.3 - except 
you were using strange patches... or very old kernels...

I am at gcc 4.4 right now. Good choice actually...



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

* Re: [gentoo-user] coexisting GCC versions
  2009-06-27 23:31   ` Volker Armin Hemmann
  2009-06-28  3:01     ` Dale
@ 2009-06-28  3:39     ` Alex Schuster
  2009-06-28  3:47       ` Volker Armin Hemmann
  2009-06-28  7:31     ` Dirk Heinrichs
  2 siblings, 1 reply; 23+ messages in thread
From: Alex Schuster @ 2009-06-28  3:39 UTC (permalink / raw
  To: gentoo-user

Volker Armin Hemmann writes: 

> On Sonntag 28 Juni 2009, Alex Schuster wrote:
>> Or keep 4.3 as default, I don't think you could run into problems.

> he will over time. If you switch default compiler emerge -s world has to
> be done.

According to Alan McKinnon's (and my own experience), this is not necessary, 
unless there are ABI changes. But there were none between 4.1 and 4.3. 

http://www.mail-archive.com/gentoo-user@lists.gentoo.org/msg83724.html 

        Wonko



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

* Re: [gentoo-user] coexisting GCC versions
  2009-06-28  3:39     ` Alex Schuster
@ 2009-06-28  3:47       ` Volker Armin Hemmann
  2009-06-28  8:26         ` Alan McKinnon
  0 siblings, 1 reply; 23+ messages in thread
From: Volker Armin Hemmann @ 2009-06-28  3:47 UTC (permalink / raw
  To: gentoo-user

On Sonntag 28 Juni 2009, Alex Schuster wrote:
> Volker Armin Hemmann writes:
> > On Sonntag 28 Juni 2009, Alex Schuster wrote:
> >> Or keep 4.3 as default, I don't think you could run into problems.
> >
> > he will over time. If you switch default compiler emerge -s world has to
> > be done.
>
> According to Alan McKinnon's (and my own experience), this is not
> necessary, unless there are ABI changes. But there were none between 4.1
> and 4.3.
>
> http://www.mail-archive.com/gentoo-user@lists.gentoo.org/msg83724.html
>
>         Wonko

you don't have to compile between 4.2.0 and 4.2.1 - sure.

But with 4.2 to 4.3 I only got a stable system after compiling everything with 
the same compiler. So whatever Alan says - I know how borked my box was with 
half of the libs compiled by one compiler and the rest by the other.



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

* Re: [gentoo-user] coexisting GCC versions
  2009-06-28  3:37       ` Volker Armin Hemmann
@ 2009-06-28  4:14         ` Dale
  0 siblings, 0 replies; 23+ messages in thread
From: Dale @ 2009-06-28  4:14 UTC (permalink / raw
  To: gentoo-user

Volker Armin Hemmann wrote:
> On Sonntag 28 Juni 2009, Dale wrote:
>   
>>
>> Except for me and a couple others.  I had programs that crashed,
>> couldn't get a kernel to work and other issues.  I had to go back to
>> 4.1on this rig.  After going back, everything works fine.
>>
>> Dale
>>
>> :-)  :-)
>>     
>
> *shrug* especially the kernel should never have had problems with 4.3 - except 
> you were using strange patches... or very old kernels...
>
> I am at gcc 4.4 right now. Good choice actually...
>
>
>   

I was using the latest gentoo-sources and it either would fail to
compile or the kernel it compiled would not boot.  I also had problems
with programs crashing and other odd things.  After switching back to
4.1 and doing a emerge -e world, everything was fine. 

I plan to skip that gcc.

Dale

:-)  :-) 



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

* Re: [gentoo-user] coexisting GCC versions
       [not found]       ` <cRSMG-4yT-1@gated-at.bofh.it>
@ 2009-06-28  5:47         ` Gregory Shearman
  0 siblings, 0 replies; 23+ messages in thread
From: Gregory Shearman @ 2009-06-28  5:47 UTC (permalink / raw
  To: gentoo-user

In linux.gentoo.user, you wrote:
>
> --rwEMma7ioTxnRzrJ
> Content-Type: text/plain; charset=utf8
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> Gregory Shearman <zekeyg@gmail.com> said:
>> In linux.gentoo.user, you wrote:
>> > he will over time. If you switch default compiler emerge -s world has t=
> o be=20
>> > done.
>> >
>> > But seriously, why staying with 4.1? it's old... and 4.3 was a nice rel=
> ease...
>>=20
>> Well, for me, media-plugins/mytharchive won't compile with gcc 4.3.
>> Hopefully things will change with the next mythtv release.
>
> Please file a bug so we actually know about the problem and can fix it
>:)
>
> https://bugs.gentoo.org/

Have a look at this:

http://bugs.gentoo.org/240379

It describes how mytharchive-0.21_p17948 requires an earlier version of
mjpegtools (1.80) than the portage 1.90 version. mjpegtools-1.80 won't
compile on gcc-4.3.

Perhaps I didn't make myself completely clear when I said that
mytharchive won't compile using gcc 4.3. It's mjpegtools 1.80 (required by
mytharchive) that won't compile using gcc 4.3.

-- 
Regards,

Gregory.



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

* Re: [gentoo-user] coexisting GCC versions
  2009-06-27 23:31   ` Volker Armin Hemmann
  2009-06-28  3:01     ` Dale
  2009-06-28  3:39     ` Alex Schuster
@ 2009-06-28  7:31     ` Dirk Heinrichs
  2 siblings, 0 replies; 23+ messages in thread
From: Dirk Heinrichs @ 2009-06-28  7:31 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 363 bytes --]

Am Sonntag 28 Juni 2009 01:31:04 schrieb Volker Armin Hemmann:

> If you switch default compiler emerge -s world has to be done.

That should be -e instead, I guess? But no, it doesn't need to be done. The 
only case we had were it was needed was the switch from 3.4.x to 4.x, because 
of C++ ABI changes. Never did it again since then.

Bye...

	Dirk

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 190 bytes --]

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

* Re: [gentoo-user] coexisting GCC versions
  2009-06-28  3:47       ` Volker Armin Hemmann
@ 2009-06-28  8:26         ` Alan McKinnon
  2009-06-28  8:41           ` Volker Armin Hemmann
  0 siblings, 1 reply; 23+ messages in thread
From: Alan McKinnon @ 2009-06-28  8:26 UTC (permalink / raw
  To: gentoo-user

On Sunday 28 June 2009 05:47:23 Volker Armin Hemmann wrote:
> On Sonntag 28 Juni 2009, Alex Schuster wrote:
> > Volker Armin Hemmann writes:
> > > On Sonntag 28 Juni 2009, Alex Schuster wrote:
> > >> Or keep 4.3 as default, I don't think you could run into problems.
> > >
> > > he will over time. If you switch default compiler emerge -s world has
> > > to be done.
> >
> > According to Alan McKinnon's (and my own experience), this is not
> > necessary, unless there are ABI changes. But there were none between 4.1
> > and 4.3.
> >
> > http://www.mail-archive.com/gentoo-user@lists.gentoo.org/msg83724.html
> >
> >         Wonko
>
> you don't have to compile between 4.2.0 and 4.2.1 - sure.
>
> But with 4.2 to 4.3 I only got a stable system after compiling everything
> with the same compiler. So whatever Alan says - I know how borked my box
> was with half of the libs compiled by one compiler and the rest by the
> other.

That's interesting. I run ~amd64 here and update almost daily - so I got 
practically every gcc version that hit the tree since 3.3 at some stage. And I 
never had the problem you describe.

It's likely that you have a set of libs that indeed *are* sensitive to 
different gcc versions, and I'm not using those libs (so I don't get the 
problems).

I wonder if it would be worth the effort to investigate this further and 
isolate problem packages. It seems that only Gentoo (and derivs) have this 
problem - binary distros rebuild everything from scratch with each new 
releases (equivalent to emerge -e world) so they tend to never run into these 
issues.

-- 
alan dot mckinnon at gmail dot com



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

* Re: [gentoo-user] coexisting GCC versions
  2009-06-28  8:26         ` Alan McKinnon
@ 2009-06-28  8:41           ` Volker Armin Hemmann
  0 siblings, 0 replies; 23+ messages in thread
From: Volker Armin Hemmann @ 2009-06-28  8:41 UTC (permalink / raw
  To: gentoo-user

On Sonntag 28 Juni 2009, Alan McKinnon wrote:
> On Sunday 28 June 2009 05:47:23 Volker Armin Hemmann wrote:
> > On Sonntag 28 Juni 2009, Alex Schuster wrote:
> > > Volker Armin Hemmann writes:
> > > > On Sonntag 28 Juni 2009, Alex Schuster wrote:
> > > >> Or keep 4.3 as default, I don't think you could run into problems.
> > > >
> > > > he will over time. If you switch default compiler emerge -s world has
> > > > to be done.
> > >
> > > According to Alan McKinnon's (and my own experience), this is not
> > > necessary, unless there are ABI changes. But there were none between
> > > 4.1 and 4.3.
> > >
> > > http://www.mail-archive.com/gentoo-user@lists.gentoo.org/msg83724.html
> > >
> > >         Wonko
> >
> > you don't have to compile between 4.2.0 and 4.2.1 - sure.
> >
> > But with 4.2 to 4.3 I only got a stable system after compiling everything
> > with the same compiler. So whatever Alan says - I know how borked my box
> > was with half of the libs compiled by one compiler and the rest by the
> > other.
>
> That's interesting. I run ~amd64 here and update almost daily - so I got
> practically every gcc version that hit the tree since 3.3 at some stage.
> And I never had the problem you describe.

yeah, me too ;)

>
> It's likely that you have a set of libs that indeed *are* sensitive to
> different gcc versions, and I'm not using those libs (so I don't get the
> problems).

probably, yes.

>
> I wonder if it would be worth the effort to investigate this further and
> isolate problem packages.

I don't really think so. emerge -e system or emerge -e world aren't such hard 
to type - and you can do it in the background. Just open all apps you plan to 
use in the next couple of hours ;)




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

* Re: [gentoo-user] coexisting GCC versions
  2009-06-27 22:47 [gentoo-user] coexisting GCC versions Roger Mason
  2009-06-27 23:14 ` Volker Armin Hemmann
  2009-06-27 23:24 ` Alex Schuster
@ 2009-06-28  9:54 ` Roger Mason
  2009-06-28 17:54 ` Roger Mason
  3 siblings, 0 replies; 23+ messages in thread
From: Roger Mason @ 2009-06-28  9:54 UTC (permalink / raw
  To: gentoo-user

Hello again,

Roger Mason <rmason@mun.ca> writes:

> I need gcc 4.3 to compile a specific application.  I am hoping that I
> can install gcc 4.3 alongside 4.1.1 without suffering some awful
> catastrophe.

> Can someone confirm that I'll be able to use gcc 4.3 for the specific
> application that needs it but then revert to 4.1.1 without having to
> re-compile all or most of my system?

Thanks to all who replied.  My home machine is compiling gcc 4.3 as I
write this (it has been running all night).

The reason I stick with gcc 4.1.1 is that:

(a) I ran into problems during one of the gcc upgrades a couple of years
back and ended up re-installing on a couple of boxes.  Most of my
machines are old and slow so gcc takes a while.

(b) I have about a dozen heterogeneous machines that I use as a distcc
compile farm and it it is a bit of a pain to upgrade all of them
(bearing in mind that distcc can't be used to compile gcc).  I suppose I
should build gcc on the fastest box and install to the remainder as a
binary.

Cheers,
Roger



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

* Re: [gentoo-user] coexisting GCC versions
  2009-06-27 22:47 [gentoo-user] coexisting GCC versions Roger Mason
                   ` (2 preceding siblings ...)
  2009-06-28  9:54 ` Roger Mason
@ 2009-06-28 17:54 ` Roger Mason
  2009-06-28 18:42   ` [gentoo-user] " Nikos Chantziaras
  3 siblings, 1 reply; 23+ messages in thread
From: Roger Mason @ 2009-06-28 17:54 UTC (permalink / raw
  To: gentoo-user

Hello,

Roger Mason <rmason@mun.ca> writes:

> I need gcc 4.3 to compile a specific application.  I am hoping that I
> can install gcc 4.3 alongside 4.1.1 without suffering some awful
> catastrophe.  This is the output of emerge on the machine in question:

The compilation finally completed.  It only took about 14 hours.

I followed the info presented at the end of the installation and did, as
root:

gcc-config i686-pc-linux-gnu-4.3.2

and gcc-config -l now says:

garnet rmason # gcc-config -l
 [1] i686-pc-linux-gnu-4.1.1
 [2] i686-pc-linux-gnu-4.3.2 

I also ran source /etc/profile, as recommended and gcc -v now reports
gcc-4.3.2.

However, as an ordinary user gcc -v reports:

garnet ~ $ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.1.1-r3/work/gcc-4.1.1/configure (blah,
blah)

That is after running source /etc/profile _and_ (when that did not
change the reported gcc version) logging out and back in.

How do I set gcc to version 4.3.2 for an ordinary user?

Thanks,

Roger



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

* [gentoo-user]  Re: coexisting GCC versions
  2009-06-28 17:54 ` Roger Mason
@ 2009-06-28 18:42   ` Nikos Chantziaras
  2009-06-28 21:13     ` Roger Mason
  0 siblings, 1 reply; 23+ messages in thread
From: Nikos Chantziaras @ 2009-06-28 18:42 UTC (permalink / raw
  To: gentoo-user

On 06/28/2009 08:54 PM, Roger Mason wrote:
>[...]
> I followed the info presented at the end of the installation

Did you read the Gentoo documentation about upgrading GCC?  If not, 
now's the time :)




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

* Re: [gentoo-user]  Re: coexisting GCC versions
  2009-06-28 18:42   ` [gentoo-user] " Nikos Chantziaras
@ 2009-06-28 21:13     ` Roger Mason
  2009-06-29  1:18       ` Alex Schuster
  0 siblings, 1 reply; 23+ messages in thread
From: Roger Mason @ 2009-06-28 21:13 UTC (permalink / raw
  To: gentoo-user

Hi,

Nikos Chantziaras <realnc@arcor.de> writes:

> On 06/28/2009 08:54 PM, Roger Mason wrote:
>>[...]
>> I followed the info presented at the end of the installation
>
> Did you read the Gentoo documentation about upgrading GCC?  If not,
> now's the time :)

This is what it says:

# emerge -uav gcc
(Please substitute "i686-pc-linux-gnu-3.4.5" with the GCC
version and CHOST settings you've upgraded to:)
# gcc-config i686-pc-linux-gnu-4.3.2
# source /etc/profile

and that is what I did.

Now gcc-config says:

garnet ~ $ gcc-config -l
 [1] i686-pc-linux-gnu-4.1.1
 [2] i686-pc-linux-gnu-4.3.2 *

Whereas gcc -v says:

<snip>
gcc version 4.1.1 (Gentoo 4.1.1-r3 p1.10)

If there is something else that I need to do then I did not see it in
the upgrade guide, so please, will someone enlighten me?

Thanks,
Roger



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

* Re: [gentoo-user]  Re: coexisting GCC versions
  2009-06-28 21:13     ` Roger Mason
@ 2009-06-29  1:18       ` Alex Schuster
  2009-06-29  7:47         ` Roger Mason
  0 siblings, 1 reply; 23+ messages in thread
From: Alex Schuster @ 2009-06-29  1:18 UTC (permalink / raw
  To: gentoo-user

Roger Mason writes:

> Now gcc-config says:
>
> garnet ~ $ gcc-config -l
>  [1] i686-pc-linux-gnu-4.1.1
>  [2] i686-pc-linux-gnu-4.3.2 *
>
> Whereas gcc -v says:
>
> <snip>
> gcc version 4.1.1 (Gentoo 4.1.1-r3 p1.10)
>
> If there is something else that I need to do then I did not see it in
> the upgrade guide, so please, will someone enlighten me?

No, your steps worked fine for me.

What is your $PATH? (echo $PATH)

I have /usr/i486-pc-linux-gnu/gcc-bin/4.1.2 in there (just before /usr/i686-
pc-linux-gnu/gcc-bin/4.3.2), don't know where this comes from. The directory 
usr/i486-pc-linux-gnu/gcc-bin does not exist, so it does not matter.

Also have a look in /etc/env.d/*gcc*, do these settings look okay? That's 
where gcc-config changes things. My 05gcc-i686-pc-linux-gnu has the line 
PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.3.2" in it.

	Wonko



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

* Re: [gentoo-user]  Re: coexisting GCC versions
  2009-06-29  1:18       ` Alex Schuster
@ 2009-06-29  7:47         ` Roger Mason
  2009-06-29 13:39           ` Alex Schuster
  0 siblings, 1 reply; 23+ messages in thread
From: Roger Mason @ 2009-06-29  7:47 UTC (permalink / raw
  To: gentoo-user

Hello Alex,

Alex Schuster <wonko@wonkology.org> writes:

> Roger Mason writes:
>
>> If there is something else that I need to do then I did not see it in
>> the upgrade guide, so please, will someone enlighten me?
>
> No, your steps worked fine for me.
>
> What is your $PATH? (echo $PATH)
>
> I have /usr/i486-pc-linux-gnu/gcc-bin/4.1.2 in there (just before /usr/i686-
> pc-linux-gnu/gcc-bin/4.3.2), don't know where this comes from. The directory 
> usr/i486-pc-linux-gnu/gcc-bin does not exist, so it does not matter.
>
> Also have a look in /etc/env.d/*gcc*, do these settings look okay? That's 
> where gcc-config changes things. My 05gcc-i686-pc-linux-gnu has the line 
> PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.3.2" in it.

garnet ~ $ echo $PATH
/home/rmason/.nix-profile/bin:/usr/local/coda/bin:/usr/local/coda/sbin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:/usr/i686-pc-linux-gnu/gcc-bin/4.3.2:/opt/sun-jdk-1.4.2.17/bin:/opt/sun-jdk-1.4.2.17/jre/bin:/opt/sun-jdk-1.4.2.17/jre/javaws:/usr/qt/3/bin:/home/rmason/bin:/usr/local/axiom/mnt/linux/bin:/usr/local/apache-uima//bin:/usr/local/tau/i386_linux/bin:/usr/local/pdt/i386_linux/bin

garnet ~ $ gcc-config -l
 [1] i686-pc-linux-gnu-4.1.1
 [2] i686-pc-linux-gnu-4.3.2 *

garnet ~ $ ls /etc/env.d/gcc/ -l
total 16
-rw-r--r-- 1 root root  32 Aug  3  2006 config-i386-pc-linux-gnu
-rw-r--r-- 1 root root  32 Jun 28 21:14 config-i686-pc-linux-gnu
-rw-r--r-- 1 root root 235 Mar  8  2008 i686-pc-linux-gnu-4.1.1
-rw-r--r-- 1 root root 235 Jun 28 14:13 i686-pc-linux-gnu-4.3.2

garnet ~ $ cat /etc/env.d/gcc/config-i686-pc-linux-gnu 
CURRENT=i686-pc-linux-gnu-4.3.2

garnet ~ $ cat /etc/env.d/gcc/i686-pc-linux-gnu-4.3.2 
LDPATH="/usr/lib/gcc/i686-pc-linux-gnu/4.3.2"
MANPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.3.2/man"
INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.3.2/info"
STDCXX_INCDIR="g++-v4"
GCC_PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.3.2"

garnet ~ $ cat /etc/env.d/05gcc-i686-pc-linux-gnu 
MANPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.3.2/man"
INFOPATH="/usr/share/gcc-data/i686-pc-linux-gnu/4.3.2/info"
LDPATH="/usr/lib/gcc/i686-pc-linux-gnu/4.3.2:/usr/lib/gcc/i686-pc-linux-gnu/4.1.1"
PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.3.2"
ROOTPATH="/usr/i686-pc-linux-gnu/gcc-bin/4.3.2"
GCC_SPECS=""

Thanks,
Roger



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

* Re: [gentoo-user]  Re: coexisting GCC versions
  2009-06-29  7:47         ` Roger Mason
@ 2009-06-29 13:39           ` Alex Schuster
  2009-06-30  8:50             ` [gentoo-user] Re: coexisting GCC versions [solved] Roger Mason
  0 siblings, 1 reply; 23+ messages in thread
From: Alex Schuster @ 2009-06-29 13:39 UTC (permalink / raw
  To: gentoo-user

Roger Mason writes:

> Alex Schuster <wonko@wonkology.org> writes:

> > What is your $PATH? (echo $PATH)
> >
> > I have /usr/i486-pc-linux-gnu/gcc-bin/4.1.2 in there (just before
> > /usr/i686- pc-linux-gnu/gcc-bin/4.3.2), don't know where this comes
> > from. The directory usr/i486-pc-linux-gnu/gcc-bin does not exist, so it
> > does not matter.

Seems to be some leftover from the installation. I just deleted the 
directory, and /etc/env.d/05gcc-i486-pc-linux-gnu.

> > Also have a look in /etc/env.d/*gcc*, do these settings look okay?
> > That's where gcc-config changes things. My 05gcc-i686-pc-linux-gnu has
> > the line PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.3.2" in it.
>
> garnet ~ $ echo $PATH
> /home/rmason/.nix-profile/bin:/usr/local/coda/bin:/usr/local/coda/sbin:/u
>sr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/4.1.1:/
>usr/i686-pc-linux-gnu/gcc-bin/4.3.2:/opt/sun-jdk-1.4.2.17/bin:/opt/sun-jdk
>-1.4.2.17/jre/bin:/opt/sun-jdk-1.4.2.17/jre/javaws:/usr/qt/3/bin:/home/rma
>son/bin:/usr/local/axiom/mnt/linux/bin:/usr/local/apache-uima//bin:/usr/lo
>cal/tau/i386_linux/bin:/usr/local/pdt/i386_linux/bin
[...]
> garnet ~ $ cat /etc/env.d/05gcc-i686-pc-linux-gnu
[...]
> PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.3.2"

Looks good to me. Finally, what is the PATH in /etc/profile.env? According 
to the order of your gcc paths, I guess it has /usr/i686-pc-linux-gnu/gcc-
bin/4.1.1:/usr/i686-pc-linux-gnu/gcc-bin/4.3.2 in it, while only the second 
one should be there. Does "grep /usr/i686-pc-linux-gnu/gcc-bin/4.1.1 
/ect/env.d/*" find something? Some obscure other file that env-update uses?

If not, I have no more ideas. I'd change /etc/profile.env by hand then, and 
file a bug report.

	Wonko




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

* Re: [gentoo-user]  Re: coexisting GCC versions [solved]
  2009-06-29 13:39           ` Alex Schuster
@ 2009-06-30  8:50             ` Roger Mason
  0 siblings, 0 replies; 23+ messages in thread
From: Roger Mason @ 2009-06-30  8:50 UTC (permalink / raw
  To: gentoo-user

Hi Alex,

Alex Schuster <wonko@wonkology.org> writes:

> Looks good to me. Finally, what is the PATH in /etc/profile.env? According 
> to the order of your gcc paths, I guess it has /usr/i686-pc-linux-gnu/gcc-
> bin/4.1.1:/usr/i686-pc-linux-gnu/gcc-bin/4.3.2 in it, while only the second 
> one should be there. Does "grep /usr/i686-pc-linux-gnu/gcc-bin/4.1.1 
> /ect/env.d/*" find something? Some obscure other file that env-update uses?
>
> If not, I have no more ideas. I'd change /etc/profile.env by hand then, and 
> file a bug report.

garnet ~ $ grep /usr/i686-pc-linux-gnu/gcc-bin/4.1.1 /etc/env.d/*
/etc/env.d/05gcc-i386-pc-linux-gnu:PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.1.1"
/etc/env.d/05gcc-i386-pc-linux-gnu:ROOTPATH="/usr/i686-pc-linux-gnu/gcc-bin/4.1.1"

Moving /etc/env.d/05gcc-i386-pc-linux-gnu out of the way & running
env-update and source /etc/profile seems to have fixed things and I can
now switch freely between compiler versions.

Many thanks to you and to all who responded with suggestions.

Cheers,
Roger



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

end of thread, other threads:[~2009-06-30  9:09 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-27 22:47 [gentoo-user] coexisting GCC versions Roger Mason
2009-06-27 23:14 ` Volker Armin Hemmann
2009-06-27 23:24 ` Alex Schuster
2009-06-27 23:31   ` Volker Armin Hemmann
2009-06-28  3:01     ` Dale
2009-06-28  3:37       ` Volker Armin Hemmann
2009-06-28  4:14         ` Dale
2009-06-28  3:39     ` Alex Schuster
2009-06-28  3:47       ` Volker Armin Hemmann
2009-06-28  8:26         ` Alan McKinnon
2009-06-28  8:41           ` Volker Armin Hemmann
2009-06-28  7:31     ` Dirk Heinrichs
2009-06-28  9:54 ` Roger Mason
2009-06-28 17:54 ` Roger Mason
2009-06-28 18:42   ` [gentoo-user] " Nikos Chantziaras
2009-06-28 21:13     ` Roger Mason
2009-06-29  1:18       ` Alex Schuster
2009-06-29  7:47         ` Roger Mason
2009-06-29 13:39           ` Alex Schuster
2009-06-30  8:50             ` [gentoo-user] Re: coexisting GCC versions [solved] Roger Mason
     [not found] <cRPc2-7Hd-5@gated-at.bofh.it>
     [not found] ` <cRPvt-84T-5@gated-at.bofh.it>
     [not found]   ` <cRPF5-8gd-3@gated-at.bofh.it>
2009-06-28  2:48     ` [gentoo-user] coexisting GCC versions Gregory Shearman
2009-06-28  2:51       ` Mark Loeser
     [not found] <cRSCZ-4no-5@gated-at.bofh.it>
     [not found] ` <cRSCZ-4no-7@gated-at.bofh.it>
     [not found]   ` <cRSCZ-4no-9@gated-at.bofh.it>
     [not found]     ` <cRSCZ-4no-3@gated-at.bofh.it>
     [not found]       ` <cRSMG-4yT-1@gated-at.bofh.it>
2009-06-28  5:47         ` Gregory Shearman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox