Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

omajid
Copy link
Member

@omajid omajid commented Feb 11, 2020

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:

In file included from coreclr/src/pal/src/misc/sysinfo.cpp:32:
/usr/include/sys/sysctl.h:21:2: error: "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror,-W#warnings]
#warning "The <sys/sysctl.h> header is deprecated and will be removed."
 ^

The glibc 2.30 release notes cover this at
https://sourceware.org/ml/libc-alpha/2019-08/msg00029.html:

  • The Linux-specific <sys/sysctl.h> header and the sysctl function have been
    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.

On newer systems with glibc 2.30, the compiler emits a warning:

    In file included from coreclr/src/pal/src/misc/sysinfo.cpp:32:
    /usr/include/sys/sysctl.h:21:2: error: "The <sys/sysctl.h> header is deprecated and will be removed." [-Werror,-W#warnings]
    #warning "The <sys/sysctl.h> header is deprecated and will be removed."
     ^

The glibc 2.30 release notes cover this at
https://sourceware.org/ml/libc-alpha/2019-08/msg00029.html:

* The Linux-specific <sys/sysctl.h> header and the sysctl function have been
  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.
@omajid omajid changed the title Fix build on systems with glibc >= 2.30 [release/3.1] Fix build on systems with glibc >= 2.30 Feb 11, 2020
@omajid omajid closed this Feb 12, 2020
@omajid omajid reopened this Feb 12, 2020
@omajid
Copy link
Member Author

omajid commented Feb 13, 2020

cc @jkotas

@jkotas jkotas added the Servicing-consider Issue for next servicing release review label Feb 13, 2020
Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. I will seek tactics approval for March

@wtgodbe
Copy link
Member

wtgodbe commented Feb 18, 2020

@jeffschwMSFT @omajid is this for 3.1.3 (march)? If so please merge by EOD today if it gets approval

@leecow leecow added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Feb 18, 2020
@leecow leecow added this to the 3.1.3 milestone Feb 18, 2020
@Anipik Anipik merged commit 25bb13b into dotnet:release/3.1 Feb 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants