Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet --info hitting /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found on Latest net8.0 #31893

Closed
LoopedBard3 opened this issue Apr 19, 2023 · 6 comments
Labels
Area-DotNet Test untriaged Request triage from a team member

Comments

@LoopedBard3
Copy link
Member

Describe the bug

After installing the latest 8.0 daily dotnet using the dotnet-install script onto a clean ubuntu-20.04 or ubuntu-22.04 image, running dotnet --info errors out with:

dotnet: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by dotnet)
dotnet: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by dotnet)

To Reproduce

On a clean ubuntu-22.04 image, download the dotnet-install.sh script.
Run: .\dotnet-install.sh -Architecture x64 -Channel 8.0 -Quality daily,
Run: dotnet --info
The failure should occur here.

Exceptions (if any)

dotnet: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by dotnet)
dotnet: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by dotnet)

Further technical details

Last known working SDK version: 8.0.100-preview.3.23178.7
Failing SDK version: 8.0.100-preview.4.23219.2

Thank you!

@MichalStrehovsky
Copy link
Member

@sbomer does this sound familiar?

@sbomer
Copy link
Member

sbomer commented Apr 20, 2023

This is potentially related to dotnet/runtime#84148, which changed the minimum glibc and libstdc++. But Ubuntu 20.04 should provide compatible versions of these libraries. I am not seeing this problem with dotnet --info, using the following dockerfile:

FROM ubuntu:20.04

RUN apt-get update && apt-get install -y wget

RUN wget https://dot.net/v1/dotnet-install.sh

RUN chmod +x dotnet-install.sh
RUN ./dotnet-install.sh -Architecture x64 -Channel 8.0 -v 8.0.100-preview.4.23219.2

# Runtime dependencies
RUN apt-get install -y libicu66

RUN $HOME/.dotnet/dotnet --info

In general, you'll need to install runtime dependencies including libstdc++, as in https://github.com/dotnet/dotnet-docker/blob/3bbd0b1b1f48f4c487a252a72fb894efd847549f/src/runtime-deps/8.0/jammy/arm64v8/Dockerfile#L7-L14.

@sbomer
Copy link
Member

sbomer commented Apr 20, 2023

@LoopedBard3 could you compare the scenario that's failing with the steps in my dockerfile?

@LoopedBard3
Copy link
Member Author

LoopedBard3 commented Apr 20, 2023

I will take a look! The specific ubuntu image we use is the one from github so I will need to check what version is on it: https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md

@LoopedBard3
Copy link
Member Author

Looks like this was being hit because the centOS container we were using doesn't have the GLIBCXX versions in the default paths. I am not sure if they have them installed in general, but I found this on SO https://stackoverflow.com/questions/44205687/glibcxx-3-4-21-not-found-on-centos-7 that somewhat indicates it does. To fix this we switched the containers we could to ubuntu 18.04 containers. Thanks for the help!

@sbomer
Copy link
Member

sbomer commented Apr 21, 2023

For anyone else who hits this issue: .NET 8 drops support fer CentOS 7 (see the plan in dotnet/runtime#83428). CentOS 7 doesn't have the newer glibc that we depend on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-DotNet Test untriaged Request triage from a team member
Projects
None yet
Development

No branches or pull requests

3 participants