Talk:Upgrading GCC

From Gentoo Wiki
Jump to: navigation, search
This is a talk page. Please add newer comments below older ones, and sign your comments using four tildes (~~~~). When adding a new section (at the bottom of the page), please mark it as "open for discussion" by using {{talk|open}} so it will show up in the list of open discussions.


Talk status
This discussion is done.

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?

Talk status
This discussion is still ongoing as of Aug 11 2015.

The code currently suggests to escape the periods, like so:

root #revdep-rebuild --library 'libstdc++\.so\.5'

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

root #revdep-rebuild --library ''

--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
    root #revdep-rebuild --library 'libstdc\+\+\.so\.5'
    ? - dcljr (talk) 16:18, 15 August 2016 (UTC)

C++11 and revdep-rebuild

Talk status
This discussion is still ongoing.

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 (from GCC 3 to GCC 4.1), or (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:

root #revdep-rebuild --library 'libstdc\+\'

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

Talk status
This discussion is still ongoing.

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:
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

Talk status
This discussion is still ongoing.

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 Jonasstein 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)