[gentoo-user] gcc upgrade: what's safest option?

2006-08-12 Thread b.n.
Hi,
I'm finally on summer break and I can take the time for ye olde GCC
3.3--3.4 infamous transition.

I have a couple of questions:
- Is it safe to upgrade with a full desktop
(Xorg+Xfce+Thunderbird+Firefox...) system running, or will I get
everything crashing on me?
- If not, is it safe to upgrade using Knoppix and doing the upgrade in a
chroot? are there side effects?

Thanks a lot,
M.
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] gcc upgrade: what's safest option?

2006-08-12 Thread Richard Fish

On 8/12/06, b.n. [EMAIL PROTECTED] wrote:

I have a couple of questions:
- Is it safe to upgrade with a full desktop
(Xorg+Xfce+Thunderbird+Firefox...) system running, or will I get
everything crashing on me?


If you start things up beforehand and leave them running, this should
be safe.  Just be sure to follow section 3 of the gcc upgrade guide
here:

http://www.gentoo.org/doc/en/gcc-upgrading.xml

You will only need the sys-libs/libstdc++-v3 package if you have old
binary stuff installed.

I would actually recommend a slightly modified version of those
instructions though:

emerge -uv gcc
gcc-config ...   # or eselect compiler set
source /etc/profile
emerge --oneshot libtool
revdep-rebuild --library=libstdc++.so.5
emerge -C =sys-devel/gcc-3.3*
emerge -e world

The revdep-rebuild step is a fast way of rebuilding all C++
packages.  During this phase, you may have some programs fail to
start, but once it completes, your system should be fine again.  The
final emerge -e world is optionalused mostly to get any new
optimizations that are available.  Of course if there are any problems
left over by revdep-rebuild, the emerge -e world should fix them.


- If not, is it safe to upgrade using Knoppix and doing the upgrade in a
chroot? are there side effects?


This wouldn't make any difference at all.

The risk of the gcc upgrade comes from the upgrading libstdc++.so.5 to
libstdc++.so.6, which has an incompatible binary interface.  What you
really do *not* want is to have some programs that link against both
.5 and .6 at the same time.  This could happen for example if you
rebuild qt, qt will get linked against .6, but kdelibs may still be
linked against .5.  So when you start a KDE app (which link against
both qt and kdelibs), it may crash due to the two incompatible
versions of libstdc++.  This is why I say some things may fail during
the revdep-rebuild step above.

So since you would chrooting into your system, and using the compilers
and libraries from your system, the knoppix kernel buys you nothing
here as far as safety.

It should be noted that python links against libstdc++, and since
portage relies on a working python, it would be a very good idea to
quickpkg python and gcc before beginning.  Then should something go
catastrophically wrong, you should be able to untar python and/or gcc
to get back to a working environment...

Good Luck,
-Richard
--
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] gcc upgrade: what's safest option?

2006-08-12 Thread b.n.
Richard Fish wrote:
 On 8/12/06, b.n. [EMAIL PROTECTED] wrote:
 I have a couple of questions:
 - Is it safe to upgrade with a full desktop
 (Xorg+Xfce+Thunderbird+Firefox...) system running, or will I get
 everything crashing on me?
 
 If you start things up beforehand and leave them running, this should
 be safe.  

OK.

 Just be sure to follow section 3 of the gcc upgrade guide
 here:
 
 http://www.gentoo.org/doc/en/gcc-upgrading.xml

Yes, that's my little precious bible now.

 I would actually recommend a slightly modified version of those
 instructions though:
 
 emerge -uv gcc
 gcc-config ...   # or eselect compiler set
 source /etc/profile
 emerge --oneshot libtool
 revdep-rebuild --library=libstdc++.so.5
 emerge -C =sys-devel/gcc-3.3*
 emerge -e world

Thanks. It seems to make sense.

 So since you would chrooting into your system, and using the compilers
 and libraries from your system, the knoppix kernel buys you nothing
 here as far as safety.

Yes, but by using Knoppix apps these shouldn't crash, being independent
from the chroot environment.
My concerns were mostly about the peril of X crashing (and being
temporarly unable to come again up) vs memory usage penalty with a
knoppix (but chrooted environment, no apps crashing).

However I guess I'll start the recompile tonight and eventually spend
tomorrow reading and cleaning home...

 It should be noted that python links against libstdc++, and since
 portage relies on a working python, it would be a very good idea to
 quickpkg python and gcc before beginning.  Then should something go
 catastrophically wrong, you should be able to untar python and/or gcc
 to get back to a working environment...

This was already on my list :)

Thanks,
m.
-- 
gentoo-user@gentoo.org mailing list