This repository was archived by the owner on Jan 23, 2023. It is now read-only.
[release/3.1] Fix build on systems with glibc >= 2.30 #28012
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue
release/3.1 does not build on newer Linux distros, due to glibc deprecation warnings being treated as errors. The fix for release/3.1 is to disable this warning. (We have proper fix for .NET 5.)
Customer Impact
Customers building .NET Runtime from sources have to apply private patches to keep the build working.
Regression?
Regression from older Linux distros.
On newer systems with glibc 2.30, the compiler emits a warning:
The glibc 2.30 release notes cover this at
https://sourceware.org/ml/libc-alpha/2019-08/msg00029.html:
deprecated and will be removed from a future version of glibc.
Application should directly access /proc instead. For obtaining random
bits, the getentropy function can be used.
To keep coreclr release/3.1 building, disable treating the #warning as an
error. Clang and GCC have separate flags to turn this error off.