GCC versions side-by-by-side support on Ubuntu images #3459
Replies: 3 comments 1 reply
-
Hi @EwoutH, @jesec, Thanks! |
Beta Was this translation helpful? Give feedback.
-
See my previous comments: #3376 (comment), #3451 (comment). The current version of GCC 11 is utterly useless if it can't provide binary compatibility with the base operating system. Even if you somehow decides to use this GCC 11, do you really want to ask your customers: OK we use GCC 11 to compile binaries, so to run our binaries you have to install the experimental version of standard C++ library from an unsupported PPA, which may f your entire environment up in the process? The toolchain is not yet production ready, and we should not allow this experimental piece of software to render the entire environment unusable. A production ready toolchain provides binary compatibility with the base operating system. You can check out the manual of RHEL's devtoolset to learn more about how toolchain maintainers made newer compilers available to older OS while maintaining binary compatibility. My opinion: Developers that rely on newer features have to install newer toolchains at their own risk (namely, may not assume that the binary is compatible with the base OS). It is also an option to static link in libstdc++ and libgcc, but that creates other issues (bigger size, security, exception catching, etc.). Alternatively, with engineering efforts, one may replicate EL's devtoolset (new compiler that retains compat with base OS) on Ubuntu platforms. |
Beta Was this translation helpful? Give feedback.
-
I ran into this issue today. The documentation for the Ubuntu 22.04 images says that GCC 11.2.0 is installed, but experimentation and the install scripts say otherwise. I think the best answer for these types of issues is containerization. It's not uncommon for a piece of software to install in a way that breaks other software. It is unfortunate, but common, and it is a situation that calls for the isolation that containers provide. |
Beta Was this translation helpful? Give feedback.
-
Hi there,
As you may know, we support several GCC versions installed side-by-side on Ubuntu images. It went well until we installed GCC-11 with experimental toolchain in the scope of #3280.
After that we received a lot of reports that it breaks current customers due to incompatibility of libstd++ in GCC-11 and the earlier versions (#3432, #3454, #3376).
Our first action to mitigate the impact — remove GCC-11 from Ubuntu images. But at the same time we understand that this is a highly-requested tool, and new versions should be pre-installed on the images.
So, we'd like to start a discussion with experts in C++ to understand what is the best strategy in supporting several side-by-side GCC versions, is it even possible, how to isolate them to avoid issues like this one.
We will appreciate your opinion on it. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions