Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Question about how emerge manage updates after gcc update
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Fulgurance
Veteran
Veteran


Joined: 15 Feb 2017
Posts: 1200

PostPosted: Wed Dec 07, 2022 6:31 pm    Post subject: Question about how emerge manage updates after gcc update Reply with quote

Hello, actually I'm reading the LFS book, and I have a question. When gentoo performs updates, how emerge do to avoid to rebuild the entire system ? Because normally, I read in the LFS documentation, if you have any glibc (or gcc if I remember) update, you need to rebuild the entire system.

I guess as well if I understood properly, if a new update is available for a library, I have to rebuild all packages using this library. If I would like to keep different versions of libraries, I have to make separate dirs for each versions I guess ?

Because actually I'm coding a package manager, and I realize now maybe, the updates are maybe more difficult to manage than calculating the dependencies . Because I did this part yet. I think updates are more complicated to manage. I like to do that because following the LFS book is very interesting ! I can learn a lot. With a project, it's super captivating
Back to top
View user's profile Send private message
gentoo_ram
Guru
Guru


Joined: 25 Oct 2007
Posts: 474
Location: San Diego, California USA

PostPosted: Wed Dec 07, 2022 9:02 pm    Post subject: Reply with quote

As long as library interfaces are kept you wouldn't necessarily have to "rebuild the entire system". For example I haven't had to do a rebuild if there's a minor update to glibc. But my understanding is that some libraries have a more "sensitive" ABI where things can break with older compiled code on newer versions. I've heard some boost libraries (C++ libraries) can have issues with compatibility. And OpenSSL has had issues with this in the past.
What might be a larger issue if with some packages that have inter-dependencies where the different parts are compiled with different versions of gcc. Or another big example is the kernel and kernel modules. It's important that your kernel and kernel modules are compiled with the same gcc. So let's say you build and are running a kernel. Then you update gcc. Then you update a package which makes a kernel module. That new kernel module might not work with your existing kernel until you re-build another kernel with the newer gcc. Something else to watch out for.
Back to top
View user's profile Send private message
sam_
Developer
Developer


Joined: 14 Aug 2020
Posts: 1678

PostPosted: Sat Dec 10, 2022 1:06 am    Post subject: Reply with quote

Indeed, glibc and gcc's libstdc++ both have stable ABI and use symbol versioning to add new bits. glibc last broke ABI in like 2000? 2001? GCC last broke it maybe 10 years ago and it was well-publicised. Rebuilding is only necessary if they announce ABI has been broken, there's an accidental break (which is a serious bug), or if you want to benefit from new features in glibc and/or gcc (like improved optimisations).
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things 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