Gentoo Archives: gentoo-user

From: Jeremi Piotrowski <jeremi.piotrowski@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Getting rid of gcc-4.7.3...how?
Date: Mon, 22 Dec 2014 11:15:34
Message-Id: CALpL90PDyEL=kP7RZSFCqf1ELD=3vi1=5VUXvzPi400xXwgR9Q@mail.gmail.com
In Reply to: Re: [gentoo-user] Getting rid of gcc-4.7.3...how? by meino.cramer@gmx.de
1 On Sat, Dec 20, 2014 at 9:04 PM, <meino.cramer@×××.de> wrote:
2
3 > Matti Nykyri <matti.nykyri@×××.fi> [14-12-20 19:48]:
4 > > > On Dec 20, 2014, at 17:56, meino.cramer@×××.de wrote:
5 > > >
6 > > > Dale <rdalek1967@×××××.com> [14-12-20 02:47]:
7 > > >> meino.cramer@×××.de wrote:
8 > > >>> Dale <rdalek1967@×××××.com> [14-12-19 17:08]:
9 > > >>>> Mick wrote:
10 > > >>>>> Meino, to avoid misunderstandings: 1. Emerge the new gcc package.
11 > 2.
12 > > >>>>> Use gcc-config to change to the new gcc version. 3. Run
13 > 'env-update &&
14 > > >>>>> source /etc/profile'. 4. Run fix_libtool_files.sh, although I would
15 > > >>>>> think that this is redundant these days. 5. Unmerge the old gcc
16 > version.
17 > > >>>> I don't recall ever running fix_libtool_files.sh after switching gcc
18 > > >>>> versions. Usually when I see a gcc upgrade, I emerge it, switch to
19 > it
20 > > >>>> and the usual profile thing, run emerge -e world JUST to be safe,
21 > then
22 > > >>>> unmerge the old gcc. That's all I usually do here. I have skipped
23 > the
24 > > >>>> emerge -e world a time or two.
25 > > >>>>
26 > > >>>> Am I just lucky, not likely as some may know, or does emerge -e
27 > world
28 > > >>>> catch it or what? Now I'm curious.
29 > > >>>>
30 > > >>>> Dale
31 > > >>>>
32 > > >>>> :-) :-)
33 > > >>> Hi Dale,
34 > > >>>
35 > > >>> I started compiling the new gcc this morning about ~7:00 AM...just a
36 > > >>> few minutes ago stage3 finishes. Now ... before doing anything
37 > else...
38 > > >>> I am makeing a backup of all that, so...if anything fails...I am able
39 > > >>> to reinstall the status quo.
40 > > >>>
41 > > >>> I will keep you informed, what happens to my little embedded
42 > system...
43 > > >>>
44 > > >>> Best
45 > > >>> Meino
46 > > >>
47 > > >> That's the thing about slow systems, you want to do it right the first
48 > > >> time because it takes to much time to repeat something. Heck, I have
49 > a
50 > > >> 4 core AMD CPU with 16GBs of ram here and I still would rather do it
51 > > >> right the first time. If you have something slow that takes days to
52 > do
53 > > >> something, you really want plan A to work.
54 > > >>
55 > > >> I'm also wondering if there have been changes to emerge that could
56 > make
57 > > >> a difference. I run the latest unstable non *9999 version. I sorta
58 > > >> like having all the new improvements. I'm just not sure if that
59 > affects
60 > > >> the issue here is all.
61 > > >>
62 > > >> Dale
63 > > >>
64 > > >> :-) :-)
65 > > >
66 > > > Hi,
67 > > >
68 > > > after a few more non-booting-systems and backup-reinstalls I think
69 > > > I know whats the reason is...but by I dont know how to get out of it:
70 > > >
71 > > > The system becomes inaccessible if I do an env-update and reboot.
72 > > >
73 > > > Reason for that are binaries, in which the path to the old gcc is
74 > > > hardcoded. With the sdcard mounted I checked that with my PC:
75 > > > I did a
76 > > >
77 > > > grep -r '\/usr\/lib\/gcc\/armv7a-hardfloat-linux-gnueabi\/4.7.3'
78 > > >
79 > > > on ALL files of the sdcard and found "thousands" of hardcoded links
80 > > > to the old gcc inside binaries...
81 > > >
82 > > > The new gcc installed but not doing env-update implies that any
83 > > > further compilation will link to the old gcc.
84 > > >
85 > > > Doing env-update implies a system which will not survive the next
86 > > > reboot.
87 > > >
88 > > > What now?
89 > >
90 > > If i understand your situation correctly, do:
91 > >
92 > > gcc-config "to set the new version"
93 > > env-update
94 > > logout
95 > > login
96 > > emerge --deep --update world
97 > > emerge --depclean
98 > > revdep-rebuild
99 > >
100 > > This will take a long time but will get your system working again. If
101 > you don't wan't to do that you can of course tweak the libraries with
102 > binary tools. That is easy if you know what you are doing.
103 > >
104 > > To prevent this in the future always before world update, update gcc and
105 > glibc first if tere is a new version available. Gcc-config is crusial after
106 > you have installed a bew version of gcc.
107 > >
108 > > --
109 > > -Matti
110 >
111 >
112 > Hi Matti,
113 >
114 > not exactly...
115 > The sequence you show looks like this in my case:
116 > gcc-config "to set the new version"
117 > env-update
118 > reboot
119 > logina attempt: impossible...system does not respond anymore
120 >
121 > The reason is, that env-update updates to the new compiler,
122 > while some [CENSORED] system tools/application are hardcoded
123 > to use the old compiler libraries...
124 >
125 > If I do a
126 >
127 > env-update --no-ldconfig
128 >
129 > then I am able to reboot successfully...but compilation
130 > will be done against the old compiler a fear...
131 >
132 > I am installing the backup the fourth time today and I am
133 > curious, when the first bad sectors of my sdcard will hit me...
134 >
135 >
136 >
137 > Best regards,
138 > Meino
139 >
140 >
141 >
142 >
143 Im surprised no one has suggested this, but have you tried running:
144
145 emerge --oneshot libtool
146
147 after gcc-config and before env-update && source /etc/profile? This is the
148 advice that is given in the wiki [https://wiki.gentoo.org/wiki/Upgrading_GCC]
149 and it has worked for me so far.
150
151 It also says that running `fix_libtool_files.sh` manually is not necessary
152 as it is run during the emerge automatically.