Gentoo Archives: gentoo-user

From: Matti Nykyri <matti.nykyri@×××.fi>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Getting rid of gcc-4.7.3...how?
Date: Sat, 20 Dec 2014 18:45:36
Message-Id: 1AD25A98-BB30-46C2-AE17-25E78F778036@iki.fi
In Reply to: Re: [gentoo-user] Getting rid of gcc-4.7.3...how? by meino.cramer@gmx.de
1 > On Dec 20, 2014, at 17:56, meino.cramer@×××.de wrote:
2 >
3 > Dale <rdalek1967@×××××.com> [14-12-20 02:47]:
4 >> meino.cramer@×××.de wrote:
5 >>> Dale <rdalek1967@×××××.com> [14-12-19 17:08]:
6 >>>> Mick wrote:
7 >>>>> Meino, to avoid misunderstandings: 1. Emerge the new gcc package. 2.
8 >>>>> Use gcc-config to change to the new gcc version. 3. Run 'env-update &&
9 >>>>> source /etc/profile'. 4. Run fix_libtool_files.sh, although I would
10 >>>>> think that this is redundant these days. 5. Unmerge the old gcc version.
11 >>>> I don't recall ever running fix_libtool_files.sh after switching gcc
12 >>>> versions. Usually when I see a gcc upgrade, I emerge it, switch to it
13 >>>> and the usual profile thing, run emerge -e world JUST to be safe, then
14 >>>> unmerge the old gcc. That's all I usually do here. I have skipped the
15 >>>> emerge -e world a time or two.
16 >>>>
17 >>>> Am I just lucky, not likely as some may know, or does emerge -e world
18 >>>> catch it or what? Now I'm curious.
19 >>>>
20 >>>> Dale
21 >>>>
22 >>>> :-) :-)
23 >>> Hi Dale,
24 >>>
25 >>> I started compiling the new gcc this morning about ~7:00 AM...just a
26 >>> few minutes ago stage3 finishes. Now ... before doing anything else...
27 >>> I am makeing a backup of all that, so...if anything fails...I am able
28 >>> to reinstall the status quo.
29 >>>
30 >>> I will keep you informed, what happens to my little embedded system...
31 >>>
32 >>> Best
33 >>> Meino
34 >>
35 >> That's the thing about slow systems, you want to do it right the first
36 >> time because it takes to much time to repeat something. Heck, I have a
37 >> 4 core AMD CPU with 16GBs of ram here and I still would rather do it
38 >> right the first time. If you have something slow that takes days to do
39 >> something, you really want plan A to work.
40 >>
41 >> I'm also wondering if there have been changes to emerge that could make
42 >> a difference. I run the latest unstable non *9999 version. I sorta
43 >> like having all the new improvements. I'm just not sure if that affects
44 >> the issue here is all.
45 >>
46 >> Dale
47 >>
48 >> :-) :-)
49 >
50 > Hi,
51 >
52 > after a few more non-booting-systems and backup-reinstalls I think
53 > I know whats the reason is...but by I dont know how to get out of it:
54 >
55 > The system becomes inaccessible if I do an env-update and reboot.
56 >
57 > Reason for that are binaries, in which the path to the old gcc is
58 > hardcoded. With the sdcard mounted I checked that with my PC:
59 > I did a
60 >
61 > grep -r '\/usr\/lib\/gcc\/armv7a-hardfloat-linux-gnueabi\/4.7.3'
62 >
63 > on ALL files of the sdcard and found "thousands" of hardcoded links
64 > to the old gcc inside binaries...
65 >
66 > The new gcc installed but not doing env-update implies that any
67 > further compilation will link to the old gcc.
68 >
69 > Doing env-update implies a system which will not survive the next
70 > reboot.
71 >
72 > What now?
73
74 If i understand your situation correctly, do:
75
76 gcc-config "to set the new version"
77 env-update
78 logout
79 login
80 emerge --deep --update world
81 emerge --depclean
82 revdep-rebuild
83
84 This will take a long time but will get your system working again. If you don't wan't to do that you can of course tweak the libraries with binary tools. That is easy if you know what you are doing.
85
86 To prevent this in the future always before world update, update gcc and glibc first if tere is a new version available. Gcc-config is crusial after you have installed a bew version of gcc.
87
88 --
89 -Matti

Replies

Subject Author
Re: [gentoo-user] Getting rid of gcc-4.7.3...how? meino.cramer@×××.de