Amazon Linux 2023 AMI update to libstdc++ with GLIBCXX_3.4.30

1

I'm running an EC2 with Amazon Linux 2023 on a micro x86. I have a linux binary that requires GLIBCXX_3.4.30 (from libstdc++) but I can't find a way to update the libstdc++ package with GLIBCXX_3.4.30, it only goes to 3.4.29 when running sudo dnf upgrade libstdc++.

Result for dnf list installed | grep libstdc++

libstdc++.x86_64                            11.3.1-4.amzn2023.0.3              @System     
libstdc++-devel.x86_64                      11.3.1-4.amzn2023.0.3              @amazonlinux
libstdc++-docs.x86_64                       11.3.1-4.amzn2023.0.3              @amazonlinux
libstdc++-static.x86_64                     11.3.1-4.amzn2023.0.3              @amazonlinux

This is the exact error message:

./PotreeConverter: /lib64/libstdc++.so.6: version GLIBCXX_3.4.30 not found (required by ./PotreeConverter)

Does anyone have any suggestions or ideas on how can I update libstdc++ to include 3.4.30 (which, judging from searching on google, is available in libstdc++).

The reason for "insisting" to do this on AL2023 is:

  • Amazon Linux 2, to my understanding, has less than 2 years until EOL (also not sure downgrading to AL2 would solve the problem).
  • AL2023 should be as barebones and optimized as possible which is key for my use case as I will have to spin up a new instance each time I want to run this.
  • I will be needing the AWS CLI in my instance to connect to other AWS services, i.e. with the AL2023 AMI the amount of configuration in the instance will be minimal for that purpose.
axel
asked 8 months ago426 views
1 Answer
0

It's always best to build your Linux binaries for the Linux distribution you are targeting to deploy on. This way it ensures compatibility, and you avoid running into these problems.

It looks like this symbol version was added in GCC12, while Amazon Linux 2023 contains GCC11.x. This problem will be avoided if the binary you are running is built on AL2023.

You can see the Core toolchain packages and C, C++, and Fortran sections of the AL2023 User Guide for more information.

answered 3 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions