-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Dependency changes when building a self contained application in SDK version 8.0.303 to 8.0.401 #108354
Comments
Per https://github.com/dotnet/core/blob/main/release-notes/8.0/supported-os.md#linux-compatibility arm32 needs glibc 2.35 or higher. The glibc version on your Linux distribution doesn't meet that requirement, that's why the application fails to load when it tries to find a "GLIBC_2.27" versioned symbol.
Something in the .NET build changed and now it is using a 2.27 glibc symbol. This won't cause issues on glibc 2.35+ systems, but if glibc is below 2.27 the application won't run. cc @richlander |
Since you are using 6.0, this should apply: https://github.com/dotnet/core/blob/main/release-notes/6.0/supported-os.md#linux-compatibility. So the minimal required glibc version should be 2.23. The application that gets built shouldn't use a 2.27 glibc symbol. |
@richlander it seems recent .NET 6.0 arm32 builds now require glibc 2.27, which is higher than the documented glibc version (v2.23) |
The whole reason we build for net6 is to prevent our linux distro from becoming incompatible. It seems odd that the application dependencies change when the SDK which is used to build the application is updated. Is this change intentional? We have no power over the linux distro that is used so this would mean that we must build our application with an outdated SDK version to keep it from breaking... @tmds |
@jkotas the glibc version required by .NET 6 has changed. Do you have some insights why this happened? |
#103266 switched building linux-arm in release/6.0 branch from ubuntu-16.04-cross-20210719121212-8a8d3be to ubuntu-18.04-cross-arm-20220907130538-70ed2e8. It explains the bump in the minimal glibc version. @amanasifkhalid Was this intentional change? |
I don't think so. Looking at #75473, which is where the changes in #103266 were cherry-picked from, the distro version in I've reverted the version bump locally, and kicked off an official build to see if it breaks anything, though I suspect it won't. I'll open a PR to fix the version bump once it passes. |
Yes that is fine with me. Which version will include the fix? or will I get notified when it has been released? |
The fix should be included in the .NET Runtime 6.0.36 release. If you'd like, I can ping you here once it's available. |
That would be great! thanks for solving this in such a promptly manner. |
Hi @MartBentNedap, just following up to let you know 6.0.36 is now available; you can download it from here. Please note that .NET 6 has reached end of support, though I'd appreciate it if you could report back here and let me know if your issue has been resolved with 6.0.36. Thanks! |
We use docker image mcr.microsoft.com/dotnet/sdk:8.0 to build our application. does this fix also apply for dotnet sdk 8.0.404? or am I missing something? we use the |
Your SDK version should be fine for building with |
I just tested the new runtime and the application now runs without any issues. So the issue is resolved for us. Thanks again for the quick reply and for fixing this issue. |
Describe the bug
The library depedencies of our self-contained dotnet application change when building with version 8.0.401 instead of 8.0.303. As far as I can tell this should not be possible since it is a minor version change.
To Reproduce
We reproduce the issue by building our application with the follow command:
dotnet publish TestApplication/TestApplication.csproj -c Release -p:Version=$VERSION -o $CI_PROJECT_DIR/out/ -r linux-arm /p:PublishTrimmed=true --self-contained /p:PublishSingleFile=true -f net6.0
The docker image used is mcr.microsoft.com/dotnet/sdk:8.0. This image contains SDK version 8.0.401.
When running the application on our Linux device, we run into the following error:
./TestApplication: /lib/libc.so.6: version 'GLIBC_2.27' not found (required by ./TestApplication)
But when we build with image: mcr.microsoft.com/dotnet/sdk@sha256:e9f45219cca08134f09cb973de3e8364d5a22ad30dfff1343830003c6494a735 This error does NOT occur, this image uses SDK version 8.0.303.
It is not easily reproduce able since it is a non-public Linux distribution. Let me know if any more information is required.
Further technical details
uname -a
on our device:Linux FX96006B9E16 4.9.182-rt131-yocto-standard dotnet/sdk#1 PREEMPT Mon Aug 14 11:47:31 IST 2023 armv7l GNU/Linux
The text was updated successfully, but these errors were encountered: