public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Upgrade + gcc dilemma
@ 2006-01-08  7:50 Anthony E. Caudel
  2006-01-08 17:10 ` Bob Sanders
  0 siblings, 1 reply; 7+ messages in thread
From: Anthony E. Caudel @ 2006-01-08  7:50 UTC (permalink / raw
  To: Gentoo mailing list

Just got my laptop back up after having been down for awhile and it is
in dire need of an upgrade.  After syncing, a -uDvp world showed about
100 packages needing upgrading, one of which was gcc, from 3.3 to 3.4.
I decided to do it first since most packages seemed dependent on it so
headed over to the GCC migration guide and followed the instructions.

I noticed that it said I might have some problems if I used the
revdep-rebuild method so I decided to use the emerge -e method instead.
 Followed the instructions up to the point of issuing an emerge -e and
then I realized it would rebuild the 100 packages that would then
shortly be upgraded.  Or if I did the upgrade first, the emerge -e would
 recompile the packages I had just upgraded.

So, my problem is, how do I avoid the extra 100, unnecessary compiles?
I tried "emerge --emptytree --upgrade -p" but it ignored the upgrade
option so I can't combine them that way.

Should I backup and use the revdep-rebuild method after the upgrade?
Would it avoid compiling the packages just upgraded?

I seems a possible solution would be to do the upgrade but save a list
of the packages to be upgraded.  Make a 2nd list of the packages to be
recompiled with the --emptytree option.  Remove the upgraded packages
from the emptytree list and, using some command line involving xargs,
recompile the remaining packages in the emptytree list.

I apologize for any obtuseness and over-complexity here and I realize,
that in the time spent asking the question, I probably could have had
the compiles done by now.  However the laptop runs hot and I want to
avoid the extra stress on it.

Any thoughts?

Tony
-- 
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
   -- Benjamin Franklin
-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] Upgrade + gcc dilemma
  2006-01-08  7:50 [gentoo-user] Upgrade + gcc dilemma Anthony E. Caudel
@ 2006-01-08 17:10 ` Bob Sanders
  2006-01-09  2:28   ` Richard Fish
  0 siblings, 1 reply; 7+ messages in thread
From: Bob Sanders @ 2006-01-08 17:10 UTC (permalink / raw
  To: gentoo-user

On Sun, 08 Jan 2006 01:50:10 -0600
"Anthony E. Caudel" <acaudel@gt.rr.com> wrote:

>
> 
> So, my problem is, how do I avoid the extra 100, unnecessary compiles?
> I tried "emerge --emptytree --upgrade -p" but it ignored the upgrade
> option so I can't combine them that way.
> 

Simply put you can't.  The base system - emerge -e system, has to be done once and that
gets everything in the system profile built with gcc 3.4.  However, both gcc and glibc need to
be rebuilt again after the first pass, and anything using glibc needs to be rebuilt after glibc
has been recompiled, thus the - emerge -e world.

Think about it this way - things like binutils and linux-headers are used with gcc-3.4 and the old
glibc to rebuild glibc.  But the new glibc is different than the old glibc, thus bin-utils is working
with  pointers to places in glibc that may not exist any more.  Thus needs to be rebuilt with
the new glibc, as does ncurses, zlib and a ton of other things.   One thing you could do to
speed up the emerge -e system pass is to add a - USE="-X -doc" to avoid building Xorg on the system 
pass.

Still it take two complete passes to use both the new gcc and the glibc compiled with the new gcc.
Look ate the output of emerge -ep system.  All those packages before glibc have to be rebuilt after
glibc has been rebuilt.  And all the packages after glibc that have dependencies on the previous
packages have to be rebuilt after the previous packages have been built with the new glibc.

This is essentially what occurs during a Stage 1 install and /usr/portage/scripts/bootstrap.sh is
run - multiple passes, rebuilding the system profile in a specific sequence.

Bob
-  
-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] Upgrade + gcc dilemma
  2006-01-08 17:10 ` Bob Sanders
@ 2006-01-09  2:28   ` Richard Fish
  2006-01-09  4:05     ` Bryce Verdier
  2006-01-09 17:47     ` Anthony E. Caudel
  0 siblings, 2 replies; 7+ messages in thread
From: Richard Fish @ 2006-01-09  2:28 UTC (permalink / raw
  To: gentoo-user

On 1/8/06, Bob Sanders <rmsand@concentric.net> wrote:
> Simply put you can't.  The base system - emerge -e system, has to be done once and that
> gets everything in the system profile built with gcc 3.4.  However, both gcc and glibc need to
> be rebuilt again after the first pass, and anything using glibc needs to be rebuilt after glibc
> has been recompiled, thus the - emerge -e world.
>
> Think about it this way - things like binutils and linux-headers are used with gcc-3.4 and the old
> glibc to rebuild glibc.  But the new glibc is different than the old glibc, thus bin-utils is working
> with  pointers to places in glibc that may not exist any more.

This is false, you do not understand how shared libraries and the
dynamic linker work.  There is no advantage at all to rebuilding
everything due to a minor change in glibc versions, or even if you
rebuild glibc with a different version of the toolchain.

Gcc upgrades are bit more tricky, only because the ABI might change. 
Thus it is _sometimes_ necessary to carefully rebuild everything to
keep your system working.

For this gcc upgrade, rebuilding all of world or system is not
necessary.  It is only necessary to rebuild C++ applications and
libraries because the C++ ABI and libstdc++ library versions
havechanged.  You might _want_ to rebuild everything to take advantage
of any new optimizations that are available, but the revdep-rebuild
method is all that is needed to keep your system working.

So my suggested order for this would be:

# emerge -uav gcc
# gcc-config i686-pc-linux-gnu-3.4.4
# source /etc/profile
# emerge --oneshot -av libtool
# revdep-rebuild --library libstdc++.so.5
# emerge -Duv world

Watch out for a portage or python update though...and don't forget the
python-updater if there is a python update in there.

-Richard

-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] Upgrade + gcc dilemma
  2006-01-09  2:28   ` Richard Fish
@ 2006-01-09  4:05     ` Bryce Verdier
  2006-01-09  4:17       ` Richard Fish
  2006-01-09 10:34       ` Holly Bostick
  2006-01-09 17:47     ` Anthony E. Caudel
  1 sibling, 2 replies; 7+ messages in thread
From: Bryce Verdier @ 2006-01-09  4:05 UTC (permalink / raw
  To: gentoo-user

I have a problem (which i'm getting around by using a link). But if i 
could really fix, i'd be a lot happier. One thing that's preventing me 
from doing this though is that for some reason i don't have 
revdep-rebuild like is recommended below. What package do i install to 
get it?

thanks in advance,

bryce


Richard Fish wrote:

>On 1/8/06, Bob Sanders <rmsand@concentric.net> wrote:
>  
>
>>Simply put you can't.  The base system - emerge -e system, has to be done once and that
>>gets everything in the system profile built with gcc 3.4.  However, both gcc and glibc need to
>>be rebuilt again after the first pass, and anything using glibc needs to be rebuilt after glibc
>>has been recompiled, thus the - emerge -e world.
>>
>>Think about it this way - things like binutils and linux-headers are used with gcc-3.4 and the old
>>glibc to rebuild glibc.  But the new glibc is different than the old glibc, thus bin-utils is working
>>with  pointers to places in glibc that may not exist any more.
>>    
>>
>
>This is false, you do not understand how shared libraries and the
>dynamic linker work.  There is no advantage at all to rebuilding
>everything due to a minor change in glibc versions, or even if you
>rebuild glibc with a different version of the toolchain.
>
>Gcc upgrades are bit more tricky, only because the ABI might change. 
>Thus it is _sometimes_ necessary to carefully rebuild everything to
>keep your system working.
>
>For this gcc upgrade, rebuilding all of world or system is not
>necessary.  It is only necessary to rebuild C++ applications and
>libraries because the C++ ABI and libstdc++ library versions
>havechanged.  You might _want_ to rebuild everything to take advantage
>of any new optimizations that are available, but the revdep-rebuild
>method is all that is needed to keep your system working.
>
>So my suggested order for this would be:
>
># emerge -uav gcc
># gcc-config i686-pc-linux-gnu-3.4.4
># source /etc/profile
># emerge --oneshot -av libtool
># revdep-rebuild --library libstdc++.so.5
># emerge -Duv world
>
>Watch out for a portage or python update though...and don't forget the
>python-updater if there is a python update in there.
>
>-Richard
>
>  
>

-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] Upgrade + gcc dilemma
  2006-01-09  4:05     ` Bryce Verdier
@ 2006-01-09  4:17       ` Richard Fish
  2006-01-09 10:34       ` Holly Bostick
  1 sibling, 0 replies; 7+ messages in thread
From: Richard Fish @ 2006-01-09  4:17 UTC (permalink / raw
  To: gentoo-user

On 1/8/06, Bryce Verdier <btv@cs.pdx.edu> wrote:
> I have a problem (which i'm getting around by using a link). But if i
> could really fix, i'd be a lot happier. One thing that's preventing me
> from doing this though is that for some reason i don't have
> revdep-rebuild like is recommended below. What package do i install to
> get it?

app-portage/gentoolkit

-Richard

-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] Upgrade + gcc dilemma
  2006-01-09  4:05     ` Bryce Verdier
  2006-01-09  4:17       ` Richard Fish
@ 2006-01-09 10:34       ` Holly Bostick
  1 sibling, 0 replies; 7+ messages in thread
From: Holly Bostick @ 2006-01-09 10:34 UTC (permalink / raw
  To: gentoo-user

Bryce Verdier schreef:
> I have a problem (which i'm getting around by using a link). But if i
> could really fix, i'd be a lot happier. One thing that's preventing me
> from doing this though is that for some reason i don't have
> revdep-rebuild like is recommended below. What package do i install to
> get it?
> 
> bryce
> 

equery b /usr/bin/revdep-rebuild
[ Searching for file(s) /usr/bin/revdep-rebuild in *... ]
app-portage/gentoolkit-0.2.2_pre1 (/usr/bin/revdep-rebuild)


emerge gentoolkit, thus.

HTH,
Holly


-- 
gentoo-user@gentoo.org mailing list



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

* Re: [gentoo-user] Upgrade + gcc dilemma
  2006-01-09  2:28   ` Richard Fish
  2006-01-09  4:05     ` Bryce Verdier
@ 2006-01-09 17:47     ` Anthony E. Caudel
  1 sibling, 0 replies; 7+ messages in thread
From: Anthony E. Caudel @ 2006-01-09 17:47 UTC (permalink / raw
  To: gentoo-user

Richard Fish wrote:
<snip>
> # emerge -uav gcc
> # gcc-config i686-pc-linux-gnu-3.4.4
> # source /etc/profile
> # emerge --oneshot -av libtool
> # revdep-rebuild --library libstdc++.so.5
> # emerge -Duv world
> 
> Watch out for a portage or python update though...and don't forget the
> python-updater if there is a python update in there.
> 
Thanks, Richard.  Thats what I was looking for.  I'll try the
revdep-rebuild route.

Tony
-- 
Those who would give up essential Liberty, to purchase a little temporary
Safety, deserve neither Liberty nor Safety.
   -- Benjamin Franklin
-- 
gentoo-user@gentoo.org mailing list



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

end of thread, other threads:[~2006-01-09 17:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-08  7:50 [gentoo-user] Upgrade + gcc dilemma Anthony E. Caudel
2006-01-08 17:10 ` Bob Sanders
2006-01-09  2:28   ` Richard Fish
2006-01-09  4:05     ` Bryce Verdier
2006-01-09  4:17       ` Richard Fish
2006-01-09 10:34       ` Holly Bostick
2006-01-09 17:47     ` Anthony E. Caudel

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