View previous topic :: View next topic |
Author |
Message |
trueriver n00b
Joined: 03 Jan 2013 Posts: 17 Location: Manchester, England
|
Posted: Thu Jan 17, 2013 12:46 pm Post subject: 2012 12 13 stage3: coping with the gcc upgrade |
|
|
hi,
if you are doing an install from the december 2012 stage3 tarball, and following the install handbook, there is currently an undocumented gotcha. If you do not know how to cope with a gcc upgrade, then this post is intended to help you.
As soon as you sync and then emerge -av --newuse --upgrade -- deep @world the gcc compiler will be upgraded.
There are some manual steps in the gcc upgrade which you need to be aware of, and which are not referred to in the install docs because they do not usually occur. This issue arises whenever there is a new version of gcc, and is resolved as soon as the updated stage3 is released. Unfortunately at present the weekly autobuild releases seem to have stopped for some reason (last stage3 was mid Dec, before that the last was mid Oct).
Firstly, this is how you can tell if you have this issue. After you have done the sync and upgrade, check the gcc config
Code: | laptop bill # gcc-config -l
[1] x86_64-pc-linux-gnu-4.6.3 *
|
Yours may show a different architecture, but there should be only one line. Mine for example is a 32bit cpu so it shows
Code: | rivlap # gcc-config -l
[1] i686-pc-linux-gnu-4.6.3 *
|
If there is only one line, and it ends in a star, you are sorted.
If there is more than one line and the one with the star is the highest version number, then skip down to the depclean below.
To select the latest version of the compiler, use
or whatever number was showing in square brackets by the latest version
Use gcc-config -l again to check it is now right.
Now, if the latest version is selected but there is more than one version listed, you need to
run emerge -av --depclean to clean out old packages, including gcc. It will ask you whether to proceed, and before doing so check it says something like among all those lines of output
Code: |
sys-devel/gcc
selected: 4.5.4
protected: none
omitted: 4.6.3
|
Selected means it is selected for removal, omitted means it will be ommitted from the deletions; so if you are new to this (like me) the words seem the wrong way round. So, check that the "omitted" one is the latest.
If it is, and if any other removals do not seem obviously daft, say yes.
Now, if you are like me and double check everything, issue the gcc-config -l command again.
For more info, the full gcc upgrade guide is at http://www.gentoo.org/doc/en/gcc-upgrading.xml
Finally, a polite request to any devs reading this:
When there is a portage upgrade (there was one of those as well) the sync command tells you what to do. In my opinion, when there is a gcc upgrade, it would be nice if the sync command pointed you to the upgrade docs. It is easily missed, especially by newcomers, and a one line message would have saved me some grief here.
And if someone will point me at the instructions for making the above request formally, please, then I will do so. This problem must come up from time to time, and there will always be some n00bs caught when it does.
Thanks to BillWho and DONAGHUE for their help in getting me past this issue in another thread, where that probllem was interleaved with other questions of mine. Now I have my head round what is going on, I thought I would document the gcc part of the workaround neatly here. I hope it helps someone
River~~ |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Thu Jan 17, 2013 2:59 pm Post subject: |
|
|
In the quick installation guide, they warn about howto upgrade gcc, look at 2.37
You don't have any issue with having an update gcc while installation, you will have one if you want to switch to that version or remove it : but both gcc-config command to switch to the latest gcc and --depclean command that may remove older version aren't in the installation process.
So if you are a real starter (i hate noob word), following the handbook as-is, you won't get the problem because of a newer gcc version exist.
You were having problem more because you didn't follow it than because of the handbook failure. As you didn't tell the thread with your problem, i then could only guess what you have seen : perhaps "i remove older gcc version and my system doesn't work" ?
Or maybe you're not speaking about the quick handbook doc ? http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml
So did you follow it like you tell or did you go out of the path using --depclean, gcc-config and every others features and ricing others users speak off on a daily basis ?
edit: you may ask a query to change the handbook at https://bugs.gentoo.org |
|
Back to top |
|
|
livibetter n00b
Joined: 19 Apr 2009 Posts: 63 Location: Taipei, Taiwan
|
Posted: Thu Jan 17, 2013 6:45 pm Post subject: Re: 2012 12 13 stage3: coping with the gcc upgrade |
|
|
I would kindly ask you not to make such request:
trueriver wrote: | Finally, a polite request to any devs reading this:
When there is a portage upgrade (there was one of those as well) the sync command tells you what to do. In my opinion, when there is a gcc upgrade, it would be nice if the sync command pointed you to the upgrade docs. It is easily missed, especially by newcomers, and a one line message would have saved me some grief here. |
Here is the typical message when you updated gcc, taken from 4.6.3:
Code: | >>> Messages generated by process 5266 on 2013-01-09 19:05:27 CST for package sys-devel/gcc-4.6.3:
WARN: setup
LTO support is still experimental and unstable.
Any bugs resulting from the use of LTO will not be fixed.
WARN: postinst
If you have issues with packages unable to locate libstdc++.la,
then try running 'fix_libtool_files.sh' on the old gcc versions.
You might want to review the GCC upgrade guide when moving between
major versions (like 4.2 to 4.3):
http://www.gentoo.org/doc/en/gcc-upgrading.xml |
You can see the important link of the information about upgrading GCC is given every time.
There would be no much improvement even the devs agree to put an additional message for the sync and it's not practical. Because when an upgrade of GCC is detected, the message is shown after sync, however, the user may decide not to update at the time. And when he or she does the upgrade later on, that message most likely has been forgotten. As for the point for the newcomers, if they miss emerge messages, you can't guarantee they won't miss sync messages.
The message after emerge is more than enough. Some users for some reason never read the emerge message carefully. Every time I emerge, I read every word it spits out even it's the same message I have read for dozens of times. Some time back then, when an xorg-server stable upgrade was available, you can expect a few of posts about keyboard/mouse didn't work would be popping out on the forums, even emerge had told the user to upgrade x11-drivers.
The solution is to read emerge message and guides carefully and we already have it. |
|
Back to top |
|
|
trueriver n00b
Joined: 03 Jan 2013 Posts: 17 Location: Manchester, England
|
Posted: Sat Jan 19, 2013 3:41 pm Post subject: |
|
|
krinn wrote: | ...
You don't have any issue with having an update gcc while installation, you will have one if you want to switch to that version or remove it :
|
Sorry, that was not my experience. I had huge problems, circular dependencies, etc. Maybe they were not causes by the gcc issue, but they went away when I did the upgrade.
Quote: |
but both gcc-config command to switch to the latest gcc and --depclean command that may remove older version aren't in the installation process. |
They are not in the installation handbook, which I was working from. Nor as you say are they in the quick install guide. However,
when I first got the circular dependency issue, the output from the failed emerge suggested the upgrade command. That also failed and suggested the depclean command. The depclean command failed and suggested the upgrade --with-bdeps=y. It
was only when that also failed referring me back to the upgrade command I had already tried that I realised I
had circular dependencies on two levels: the circle the emerge was finding, and the circle that each of the suggested solutions depended o the others.
Quote: | if you are a real starter (i hate noob word), following the handbook as-is, you won't get the problem because of a newer gcc version exist. |
If I followed the quick install guide as a starter, at the second para of the first chapter I would read this
quick install guide wrote: |
Important: New users should read the Handbook as it gives a better overview about the installation process. The Quick Install guide is designed for experienced users who just need a checklist to follow. |
which, of course is what I was trying to do, but modified for my own hardware, a system with wifi but no working ethernet hardware.
krinn wrote: |
You were having problem more because you didn't follow it than because of the handbook failure. As you didn't tell the thread with your problem, i then could only guess what you have seen : perhaps "i remove older gcc version and my system doesn't work" ?
|
no, my system had stopped working before I got the depclean to work, not after. It was refusing to install anything new. I did not refer you back to that as I thought I was beyond that point, and I had (perhaps wrongly) thought that as the problem went away after the gcc upgrade, that I had acquired an inconsistency at that point.
If a gentoo guru tells me that is impossible, well so be it: maybe the problem was actually fixed by the last --sync or the last emerge --upgrade --newuse --deep --with-bdeps=y. Or maybe it was that the stars moved to a more favourable aspect, who knows?
There are two docs, they seem to be called the Handbook (Gentoo x86 Handbook) or the Quick Install Guide (Gentoo x86 Quick Install Guide) - there is no "quick handbook"
Just to be clear I meant the Handbook, the one at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1 and the offline copy I am working from is dated 12th Jan 2013, and not the Quick Install Guide (which your url points to).
I only read the first two paragraphs of the Quick Install Guide, which convinced me that I should be working from the Handbook. I am not quite a starter nor a n00b but as the last gentoo install I did was some years ago I counted myself as in need of the more complete advice.
As you rightly say there is info about upgrading in the quick install guide, and it seems odd to me that this is not in the longer document that I was working from.
R~~ |
|
Back to top |
|
|
trueriver n00b
Joined: 03 Jan 2013 Posts: 17 Location: Manchester, England
|
Posted: Sat Jan 19, 2013 3:53 pm Post subject: Re: 2012 12 13 stage3: coping with the gcc upgrade |
|
|
livibetter wrote: | I would kindly ask you not to make such request... |
OK, I won't at present; not at least till I understand mo9re about where my install went wrong.
Quote: | ...
Here is the typical message when you updated gcc, taken from 4.6.3:
Code: | >>> Messages generated by process 5266 on 2013-01-09 19:05:27 CST for package sys-devel/gcc-4.6.3:
WARN: setup
LTO support is still experimental and unstable.
Any bugs resulting from the use of LTO will not be fixed.
WARN: postinst
If you have issues with packages unable to locate libstdc++.la,
then try running 'fix_libtool_files.sh' on the old gcc versions.
You might want to review the GCC upgrade guide when moving between
major versions (like 4.2 to 4.3):
http://www.gentoo.org/doc/en/gcc-upgrading.xml |
You can see the important link of the information about upgrading GCC is given every time.
|
Fair comment. I must have seen that message, in among several upgrades that all happened at once, and not realised its importance at the time. The postinst message starts with issues about "if packages unable to locate..." and it is quite believable that I did not grasp that the second sentence "You might want..." was a seoparate piece of advice.
Remember (see my reply to krinn above) I was bouncing about from one error message to another at the time, trying to work out which of these important messages I needed to act on first. And that still supports my belief that an important upgrade like portage or gcc needs a special message that is not interleaved with other upgrades happening at the same time.
Quote: |
The solution is to read emerge message and guides carefully and we already have it. |
with respect, I thought that was what I was doing.
I started to do this on new year's eve (31 Dec). I still do not have a working system,
If I did not know that I had had gentoo running on this very same machine in the past, I would have given up by now. And I do not remember it being a difficult install last time round...
When I find out what I could have done better, I will be suggesting *some* additional help in the documentation (which might mean in the emerge messages, or in the Handbook, or somewhere else).
River~~ |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|