Gentoo Archives: gentoo-user

From: Richard Fish <bigfish@××××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] gcc upgrade: what's safest option?
Date: Sat, 12 Aug 2006 18:14:11
Message-Id: 7573e9640608121109jea0fbc4k2ab7d2dc61663bde@mail.gmail.com
In Reply to: [gentoo-user] gcc upgrade: what's safest option? by "b.n."
1 On 8/12/06, b.n. <brullonulla@×××××.com> wrote:
2 > I have a couple of questions:
3 > - Is it safe to upgrade with a full desktop
4 > (Xorg+Xfce+Thunderbird+Firefox...) system running, or will I get
5 > everything crashing on me?
6
7 If you start things up beforehand and leave them running, this should
8 be safe. Just be sure to follow section 3 of the gcc upgrade guide
9 here:
10
11 http://www.gentoo.org/doc/en/gcc-upgrading.xml
12
13 You will only need the sys-libs/libstdc++-v3 package if you have old
14 binary stuff installed.
15
16 I would actually recommend a slightly modified version of those
17 instructions though:
18
19 emerge -uv gcc
20 gcc-config ... # or eselect compiler set
21 source /etc/profile
22 emerge --oneshot libtool
23 revdep-rebuild --library=libstdc++.so.5
24 emerge -C =sys-devel/gcc-3.3*
25 emerge -e world
26
27 The revdep-rebuild step is a "fast" way of rebuilding all C++
28 packages. During this phase, you may have some programs fail to
29 start, but once it completes, your system should be fine again. The
30 final emerge -e world is optional....used mostly to get any new
31 optimizations that are available. Of course if there are any problems
32 left over by revdep-rebuild, the emerge -e world should fix them.
33
34 > - If not, is it safe to upgrade using Knoppix and doing the upgrade in a
35 > chroot? are there side effects?
36
37 This wouldn't make any difference at all.
38
39 The risk of the gcc upgrade comes from the upgrading libstdc++.so.5 to
40 libstdc++.so.6, which has an incompatible binary interface. What you
41 really do *not* want is to have some programs that link against both
42 .5 and .6 at the same time. This could happen for example if you
43 rebuild qt, qt will get linked against .6, but kdelibs may still be
44 linked against .5. So when you start a KDE app (which link against
45 both qt and kdelibs), it may crash due to the two incompatible
46 versions of libstdc++. This is why I say some things may fail during
47 the revdep-rebuild step above.
48
49 So since you would chrooting into your system, and using the compilers
50 and libraries from your system, the knoppix kernel buys you nothing
51 here as far as safety.
52
53 It should be noted that python links against libstdc++, and since
54 portage relies on a working python, it would be a very good idea to
55 quickpkg python and gcc before beginning. Then should something go
56 catastrophically wrong, you should be able to untar python and/or gcc
57 to get back to a working environment...
58
59 Good Luck,
60 -Richard
61 --
62 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] gcc upgrade: what's safest option? "b.n." <brullonulla@×××××.com>