Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Toolchain updating best practices
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
digifuzzy
n00b
n00b


Joined: 31 Oct 2014
Posts: 60

PostPosted: Sun Aug 30, 2020 8:15 am    Post subject: Toolchain updating best practices Reply with quote

A review today of what is being updated with emerge got me thinking...

I'm aware of this page from Gentoo WIKI pages talking about upgrade gcc. However, with the emerge of recent updates to binutils and glibc seem a little unclear of what other steps are required for system maintenance in these cases. The 'gcc upgrade' page has too many "this may be needed" steps.

Is there a page in the Gentoo wiki, or some other doc source, that details 'best practices' for updates to system packages and/or gcc toolchain (i.e. gcc, binutils, libtool et al)?
Back to top
View user's profile Send private message
Banana
l33t
l33t


Joined: 21 May 2004
Posts: 657
Location: Germany

PostPosted: Sun Aug 30, 2020 1:13 pm    Post subject: Reply with quote

all I did in the past the quick guide: https://wiki.gentoo.org/wiki/Upgrading_GCC#Quick_guide_to_GCC_upgrades
Had no further problems.
_________________
My personal space
Back to top
View user's profile Send private message
digifuzzy
n00b
n00b


Joined: 31 Oct 2014
Posts: 60

PostPosted: Sun Aug 30, 2020 1:16 pm    Post subject: Reply with quote

That's just it... that page makes it sound like some things are "suggested"(e.g. rebuild world - suspect that is anecdotal advice).
The page is rather nebulous in what NEEDS to be done in light of current kernel/gcc state.
Back to top
View user's profile Send private message
jonathan183
Guru
Guru


Joined: 13 Dec 2011
Posts: 311

PostPosted: Sun Aug 30, 2020 8:10 pm    Post subject: Reply with quote

It might also be worth looking at https://wiki.gentoo.org/wiki/Project:Toolchain
Back to top
View user's profile Send private message
digifuzzy
n00b
n00b


Joined: 31 Oct 2014
Posts: 60

PostPosted: Sun Aug 30, 2020 8:23 pm    Post subject: Reply with quote

jonathan183 wrote:
It might also be worth looking at https://wiki.gentoo.org/wiki/Project:Toolchain

Interesting link. Cool.

That page seems focused on distribution/package management w/ bug fixing of the GCC toolchain in Gentoo. Unfortunately, I hoping to approach the subject from the end-users prospective. The "dark arts" world of toolchain maintainers and developers seems a touch beyond me at the moment.

Thanks for sharing.
Back to top
View user's profile Send private message
digifuzzy
n00b
n00b


Joined: 31 Oct 2014
Posts: 60

PostPosted: Mon Aug 31, 2020 4:13 am    Post subject: Reply with quote

From the toolchain wiki page above, and a couple of other tidbits I picked up along the way, this whole process can almost by automated (i.e. run a script) to build everything. Almost.

One last question before I move on from the topic, but I suspect the answer already, is this: rebuilding the world set and recompiling the kernel. One? Both? What's the best order?
Back to top
View user's profile Send private message
Banana
l33t
l33t


Joined: 21 May 2004
Posts: 657
Location: Germany

PostPosted: Mon Aug 31, 2020 8:05 am    Post subject: Reply with quote

I would first make sure that the toolchain is updated. Then I would run
Code:
emerge -uUDNav @world
just to make sure everything is in order. If this works. Reboot. After that I would upgrade the kernel.
_________________
My personal space
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7447

PostPosted: Mon Aug 31, 2020 11:46 am    Post subject: Reply with quote

gcc do fix your system libraries, see https://gcc.gnu.org/onlinedocs/gcc-10.2.0/gcc/Fixed-Headers.html#Fixed-Headers
so the logical operations order is given by this fact
- update headers, glibc... before gcc
- build gcc, so that it will fix what need to be fixed on the updated programs
- you are now ready to rebuild kernel/glibc... with the new gcc

if you build gcc prior updating them, they will lack the fixes, and except if you run them by yourself (see the link for list of tools to use), they will never get the fixes/changes until gcc is rebuild ; however on most systems, it's generally not an issue as the fixes are for weird corner cases on non gnu system.

It was clearly given by stage1 old good era: build glibc, headers..., build gcc, build glibc, headers... again
Back to top
View user's profile Send private message
digifuzzy
n00b
n00b


Joined: 31 Oct 2014
Posts: 60

PostPosted: Mon Aug 31, 2020 2:46 pm    Post subject: Reply with quote

In updating the kernel on one of my systems, genkernel failed out at building modules. I had to reboot and genkernel breezed through it's normal run.

So gcc, other toolchain(binutil libtool et al), world, reboot, kernel seems a dicey proposition.
FWIW, I do `source /etc/profile` before different stages as suggested in links.
Back to top
View user's profile Send private message
leonchik1976
Apprentice
Apprentice


Joined: 24 Jan 2010
Posts: 221

PostPosted: Mon Aug 31, 2020 4:42 pm    Post subject: Reply with quote

so glibc should be upgraded before gcc?
Back to top
View user's profile Send private message
digifuzzy
n00b
n00b


Joined: 31 Oct 2014
Posts: 60

PostPosted: Mon Aug 31, 2020 4:54 pm    Post subject: Reply with quote

leonchik1976 wrote:
so glibc should be upgraded before gcc?

Yeah... good catch.

So, sequence as I understand it...

  • updates (glibc, binutils, libtool)
    ( below from wiki gcc-upgrade)
  • rebuild gcc
  • source /etc/profile
  • gcc-config
  • rebuild libtool, binutils
  • binutils-config
  • source /etc/profile
  • rebuild glibc
  • locale-gen
  • source /etc/profile
  • mount /boot
  • emerge @world (rebuild whole tree)
  • source /etc/profile
  • etc-update
  • perl-cleaner --all
  • emerge --sync
  • emerge -auDN @world (update only)
  • revdep-rebuild
  • emerge --depclean --deep
  • other emerge clean-up/maintenance as needed (eclean emaint et al).
    (end wiki suggestions)
  • reboot
  • rebuild kernel
  • rebuild boot loader w/ rebuilt kernel (grub filo etc)

Am I missing something here? This seems like the complete list of what to do. Again, almost scriptable (gcc-config and binutils-config might cause difficulties).
Back to top
View user's profile Send private message
Whissi
Developer
Developer


Joined: 12 Jan 2011
Posts: 166

PostPosted: Mon Aug 31, 2020 5:52 pm    Post subject: Reply with quote

digifuzzy wrote:
In updating the kernel on one of my systems, genkernel failed out at building modules. I had to reboot and genkernel breezed through it's normal run.
I am curious, what was the exact error here? Was emerge failing when running @modules-rebuild target, triggered by genkernel?
_________________
Regards,
Whissi
Back to top
View user's profile Send private message
digifuzzy
n00b
n00b


Joined: 31 Oct 2014
Posts: 60

PostPosted: Mon Aug 31, 2020 6:19 pm    Post subject: Reply with quote

Whissi wrote:
digifuzzy wrote:
In updating the kernel on one of my systems, genkernel failed out at building modules. I had to reboot and genkernel breezed through it's normal run.
I am curious, what was the exact error here? Was emerge failing when running @modules-rebuild target, triggered by genkernel?


Ooops. Didn't get the exact details. The genkernel log (/var/log/genkernel.log) only shows last rebuild (passed).
The message, IIRC, was during the module compile. It looked as if everything had gone through (presented w/ a list proceed by a column of 'CC' and 'M').
From my search history, the message given was "genkernel compile_generic() failed to compile the "modules" target! "

I'm presuming a module reload was required. Again, a reboot and all was solved.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

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