setup-cpp
setup-cpp copied to clipboard
Matching the official stdc++ version on Ubuntu?
setup-cpp has been using the latest version of stdc++ on Ubuntu. However, this implies that the compiled binary will ship/compile the required stdc++ or it is provided by the system. Otherwise, the user will get errors like GLIBXX ... was not found or other similar errors.
Should we match the latest stdc++ version that is available in the Ubuntu repositories, or should we continue to use the ppas?
Upvote & Fund
-
I am using Polar.sh so you can upvote and help fund this issue. The funding is received once the issue is completed & confirmed by you.
-
Thank you in advance for helping prioritize & fund our backlog.
Since stdc++ might add a runtime dependency that is not bundled by default on Ubuntu, I think we should move forward with this decision.
I think sticking to defaults is a very good idea. Was this change implemented?
@makslevental Not implemented yet, and pull requests are welcome! This should mostly be pinning stdlib++ so that once a newer version of g++ is installed from the test-toolchain ppa, the stdlibc++ remains old. Or alternatively, we can avoid installing newer g++ on Ubuntu if not bundled in the default repositories.
Sorry actually, after running around this morning trying to figure out a stdlibc++ issue, I realize what you're saying here is that the default gcc (with a version number) will install gcc-11 and the corresponding stdlibc++ wherever. I think that's perfectly fine right? If I use your action and instead of picking the version less gcc, I pick gcc-9 then I will get the "default" stdlibc++ and that's good. I think having the option is what's important (rather than necessarily the defaults). Certainly it might be surprising from some people that don't realize that gcc-11 ships with a newer stdlibc++ than the default (like I was earlier this morning) but it makes perfect sense after a bit of consideration.
So in summary: I retract my Yay and vote nay. Or at least I vote please don't remove the ability to install newer versions of gcc on ubuntu-20.04 :)
@makslevental Yes, setup-cpp will still allow installing the latest GCC if you pass the version, but I was talking about the default. Instead of installing from the test toolchain, we can instead use the latest available in the repos when the user just passes true.