Talk:Upgrading GCC

FUD
Hrm. I don't think using "FUD" to describe the previous version of this page is very chummy. I'm going to change it. Also, the references to "rebuilding everything" on the old page were for *complete assurance* of compatibility, not FUD or otherwise due to a lack of understanding. Can this page now guarantee this for those who follow the present version? --NightMonkey (talk) 22:35, 28 January 2015 (UTC)


 * Sure, why don't you.--jer (talk) 11:59, 29 January 2015 (UTC)


 * I actually fixed this issue. Looks like NightMonkey never clarified the acronym. --Maffblaster (talk) 23:01, 15 December 2016 (UTC)

Do we need to escape the periods?
The code currently suggests to escape the periods, like so:

The command works just fine without this. Wouldn't it be much user friendlier to keep it as such then?

--SwifT (talk) 18:33, 11 August 2015 (UTC)


 * --library can be a regular expression, so I escaped dot to avoid ambiguity, but yes, the version without escape characters is equivalent to the escaped version. I'm going to remove the dot to cure the Leaning Toothpick Syndrome in the code. Biergaizi (talk)


 * I left in the dot escapes because the manual says it interprets the argument as a BRE unless it's a full path to a library. Ideally there would be a better way to obtain the soname from the current gcc configuration using scanelf perhaps. --Ormaaj (talk) 11:01, 12 August 2015 (UTC)
 * If it's a regular expression, then shouldn't it be ? - dcljr (talk) 16:18, 15 August 2016 (UTC)
 * I have verified (I think) that the older versions of really do require escaping the plus characters, otherwise no packages will be rebuilt. (When you run a recent, it says the old version is available as , so I used that to test the commands.) Therefore, in my latest copyedits of the article I reintroduced the fully-escaped version where relevant (even though technically the dots don't need escaping, I did so, to match the version shown in the  item about GCC 5). However, I did "de-emphasize" the escaped version in the "Short version" by moving it into running text rather than using another {RootCmd} box, because most users will probably have already upgraded to one of the post-0.3.1 versions of , anyway, since they've been stable for almost (or over?) a year now. - dcljr (talk) 11:09, 4 October 2017 (UTC)
 * [Actually, someone upgrading from a pre-3.4 GCC may be more likely to be using a pre-0.3.1 ! Hmm… - dcljr (talk) 11:39, 4 October 2017 (UTC)]

C++11 and revdep-rebuild
Under "The special case C++11 (and C++14)", this article states:
 * "GCC only makes C++11 ABI stability guarantees beginning with version 5.1. This means that switching (even minor) versions of gcc (say from 4.7.3 -> 4.7.4) might cause ABI breakage for binaries built from C++11 code."

And then it links to a handful of sources targeted to audiences of developers. It doesn't actually say in that section what the Gentoo user should do to avoid problems related to C++11.

Now, earlier in the article, under "ABI changes", it says:
 * "''If you are upgrading to GCC 4.1, or GCC 5.1, you would probably encounter ABI issues. This is also why we use the revdep-rebuild command against the libstdc++.so.5 (from GCC 3 to GCC 4.1), or libstdc++.so.6 (from GCC 4 to GCC 5.1)."

OK, but what about for changes from, say, 4.7.3 to 4.7.4 (as alluded to in the above quote), or any other 4.x to 4.y? Unless I'm more confused about this than I thought, this should also be handled with:

Right? Can someone who knows please make this more clear in the "special case C++11" section?

Also, is it crucial to do this rebuilding immediately after the switch of GCC versions? Or just when any C++11-based package has to be built (IOW, if you do any C++11's, do all of them)? Does it matter if/when you restart services (say, X)? Just curious… - dcljr (talk) 16:23, 15 August 2016 (UTC)

Packages known to need rebuilding
In the list of packages that are known to need rebuilding should we add: dev-libs/leveldb I don't know if that's appropriate or not, but I had that problem and I've seen others in the forums have the same/similar problem: https://forums.gentoo.org/viewtopic-t-1065516-start-0-postdays-0-postorder-asc-highlight-.html https://forums.gentoo.org/viewtopic-t-1056646-highlight-leveldb.html https://forums.gentoo.org/viewtopic-t-1057232-highlight-leveldb.html Seems to be a problem between a GCC version 5 upgrade and a qtwebkit upgrade. I don't understand more than that so far. Thanks! Aries97 (talk) 19:13, 8 July 2017 (UTC)

MUST rebuild
The following statement is questionable:


 * To be completely sure that your system is in a sane state, you must rebuild the toolchain and then world to make use of the new compiler.

I certainly don't believe it is always necessary and I have never done such instructions except when I tried a hardened toolchain once. If there is major changes, there should be a GLEP news announcement (such as the proposed PIE change).

I would like to see what would say to this as well. --Grknight (talk) 20:54, 4 August 2017 (UTC)


 * My comment on the rebuild-all strategy:
 * It takes very long to find out manually which packages need to be compiled. Then find out which were missed.
 * The fast and safe way is to rebuild all on a modern computer. Bugzilla gets flooded during gcc upgrades and 99% of the problems could be solved with the complete rebuild. In an ideal world we would have of course a package manager which can handle this and rebuilds on demand.--Jonasstein (talk) 19:30, 8 August 2017 (UTC)


 * I came here for the same reason as Grknight: It is ironic that after repeatedly ridiculing and dismissing the idea that you "have to rebuild everything" — even calling it FUD (spelling out the meaning of the acronym) — this article ends with the statement that "To be completely sure", you have to rebuild everything! What are readers supposed to think? Either remove this FUD-inducing statement, reword it carefully to inform readers and not scare them, or rewrite the entire article to suggest that the "rebuild-everything" approach is not so crazy after all. - dcljr (talk) 07:37, 17 August 2017 (UTC)


 * What about two sections: a) one can investigate which packages need to be rebuilt (this changes and is not trivial) b) for the lazy with a recent computer (time to rebuild is less then to research and fix). We get daily reports on bugzilla because some package was not rebuilt. This is an enormous waste of manpower. So I think it is important to say: True is a, but our documentation of a may be incomplete and if a fails and you can not figure it out and document it, try b before opening a bug ticket. If the user prefers to the computer compile a night, instead of fixing all the weekend manually, there is a solution b. So the user has the choice. --Jonas Stein (talk) 19:05, 4 October 2017 (UTC)

Drop or move to another place information for old gcc versions
When visiting this page I found a bit useless to keep informing people in the "short version" about how to upgrade from gcc3... I guess nobody will try this days to update such an old system. I would remove it or, if still needed, move it to a different section (Troubleshooting?) Pacho (talk) 17:26, 19 November 2017 (UTC)

Clarify if we must or not to run revdep-rebuild
Statement "revdep-rebuild is usually only necessary when upgrading to a new major version (i.e., 3.x to 4.x, or 4.x to 5.x)" What does "usually" mean? Do we need to run it or not? For example when updating from gcc5 to gcc6. Is that optional? Pacho (talk) 17:26, 19 November 2017 (UTC)

List all packages to rebuild in Short version
"Short version" states only libtool as a package to manually need to rebuild, but, later, it's explained that llvm and clang also need to be rebuilt. If that is the case, I would list them in Short version, otherwise many people won't rebuilt them. Pacho (talk) 17:26, 19 November 2017 (UTC)

Contradictory information in "Which packages are known to need a rebuild?" and next section
"Which packages are known to need a rebuild?" states that "To be completely sure that your system is in a sane state, you must rebuild the toolchain and then world to make use of the new compiler." But the next section explain that this is not needed :/ Pacho (talk) 17:26, 19 November 2017 (UTC)

Thanks