Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Upgrade gcc from 9.3 to 11.1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Sun Jul 18, 2021 5:50 am    Post subject: Upgrade gcc from 9.3 to 11.1 Reply with quote

I have a couple of questions:

1. Is the upgrade forward compatible i.e. I can remove 9.3 and 11.1 libraries (libgcc_s and libstdc++.so.6 come to mind) will run the system fine without having to rebuild all packages

2. Are there any known packages that don't build with 11.1 at this time that I need to be aware of?

I generally don't like to keep multiple gcc versions on my system. Hence the ask.

If answer for either 1) is no or 2) is yes, I would rather stay with 9.3
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Sun Jul 18, 2021 6:04 am    Post subject: Re: Upgrade gcc from 9.3 to 11.1 Reply with quote

devsk wrote:
1. Is the upgrade forward compatible i.e. I can remove 9.3 and 11.1 libraries (libgcc_s and libstdc++.so.6 come to mind) will run the system fine without having to rebuild all packages

Usually if there are problems to make an upgrade from one version to another is released a news as happened for gcc-5.
I never recompile all the packages when I change version gcc and I always used this method

devsk wrote:
2. Are there any known packages that don't build with 11.1 at this time that I need to be aware of?

You can check with bug #732706
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Sun Jul 18, 2021 6:39 am    Post subject: Reply with quote

Looking at that bug, I have none of those broken packages.

So, its looking good for upgrade and removal of 9.3!!
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Sun Jul 18, 2021 6:50 am    Post subject: Reply with quote

devsk wrote:
Looking at that bug, I have none of those broken packages.

Remember that this is not necessarily the complete list but only the known packages that fail.

devsk wrote:
So, its looking good for upgrade and removal of 9.3!!

You can use quickpkg to create gcc-9.3 backup.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2702

PostPosted: Sun Jul 18, 2021 7:11 am    Post subject: Reply with quote

When it comes to libstdc++ (and many libraries in general), the compatibility issues are as you'd expect the other way around, i.e. don't downgrade gcc (it's okay to keep both though, but if try to link to c++ libraries built with 11, while using gcc9 it'll cause failures).

Forward is no issue.

That aside, state of gcc11 in Gentoo is in a pretty good state now.
Do be careful if using stable packages given gcc11 fixes are sometime not stabilized yet (given gcc11 itself isn't and there's no urgency to land them).
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Sun Jul 18, 2021 5:06 pm    Post subject: Reply with quote

Ionen wrote:
When it comes to libstdc++ (and many libraries in general), the compatibility issues are as you'd expect the other way around, i.e. don't downgrade gcc (it's okay to keep both though, but if try to link to c++ libraries built with 11, while using gcc9 it'll cause failures).
Yup. This is the major thing to worry about. It can easily be a disaster because of dependencies. But hopefully, I won't have to deal with the downgrade if 11.1 works with packages I have.

Worst case, I will have to keep both around for some more time.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2913
Location: Edge of marsh USA

PostPosted: Mon Jul 19, 2021 3:13 am    Post subject: Re: Upgrade gcc from 9.3 to 11.1 Reply with quote

fedeliallalinea wrote:
...
I never recompile all the packages when I change version gcc and I always used this method

My understanding is that it's no longer necessary or even helpful to do ANYTHING. So I don't with no issues.

ADDED: I was wrong. Do what is says here: https://wiki.gentoo.org/wiki/Upgrading_GCC#Quick_guide_to_GCC_upgrades
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/17.1/desktop (stable), OpenRC, -systemd -pulseaudio -uefi


Last edited by figueroa on Mon Jul 19, 2021 3:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Mon Jul 19, 2021 4:49 am    Post subject: Re: Upgrade gcc from 9.3 to 11.1 Reply with quote

figueroa wrote:
My understanding is that it's no longer necessary or even helpful to do ANYTHING. So I don't with no issues.

Apart recompiling libtool exactly, I don't think it makes sense to recompile everything, because sooner or later you will recompile the packages through the update.
Moreover many packages don't even use gcc anymore so...
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2913
Location: Edge of marsh USA

PostPosted: Mon Jul 19, 2021 4:59 am    Post subject: Reply with quote

There are no instructions to reemerge libtool. No elog, no news, the wiki is is out of date. Is there some reference.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/17.1/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30837
Location: here

PostPosted: Mon Jul 19, 2021 5:08 am    Post subject: Reply with quote

figueroa wrote:
There are no instructions to reemerge libtool. No elog, no news, the wiki is is out of date. Is there some reference.

The reference is only in the wiki.
If you don't recompile it, you may be faced with errors like this.
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2702

PostPosted: Mon Jul 19, 2021 8:46 am    Post subject: Reply with quote

libtool rebuild is still needed, but it'll only cause trouble for a few packages if you don't do it -- and so you may be able to get away with it depending on what you use for a while.

This will only be really solved after we migrate to slibtool, but there's still a long road ahead before that can be made default.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 2913
Location: Edge of marsh USA

PostPosted: Mon Jul 19, 2021 3:17 pm    Post subject: Reply with quote

With apologies, I was wrong. I am the victim of misinformation. I will always do what the wiki directs: https://wiki.gentoo.org/wiki/Upgrading_GCC#Quick_guide_to_GCC_upgrades
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/17.1/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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