Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

[Linux] glibc <sys/sysctl.h> header include build error #7927

Closed
Christopher876 opened this issue Dec 27, 2019 · 2 comments · Fixed by #7928
Closed

[Linux] glibc <sys/sysctl.h> header include build error #7927

Christopher876 opened this issue Dec 27, 2019 · 2 comments · Fixed by #7928

Comments

@Christopher876
Copy link

glibc deprecated <sys/sysctl.h> in version 2.30.

Software version:

.NET Core 3.1
Fedora 31 x64
glibc 2.30

Error:

Setting up directories for build
Checking pre-requisites...
Commencing build of corert native components for Linux.x64.Debug
~/git/corert/bin/obj/Native/Linux.x64.Debug ~/git/corert
Invoking cmake with arguments: "/home/christopherwilliams/git/corert/buildscripts/.." Debug
-- Configuring done
-- Generating done
-- Build files have been written to: /home/christopherwilliams/git/corert/bin/obj/Native/Linux.x64.Debug
Executing make install -j 5 
[  1%] Built target bootstrappercpp
[  1%] Built target AsmOffsets
[  2%] Built target bootstrapper
[  4%] Built target jitinterface
[  6%] Built target bootstrapperdll
[  6%] Building CXX object Runtime/Portable/CMakeFiles/PortableRuntime.dir/__/unix/PalRedhawkUnix.cpp.o
[  9%] Built target System.Private.CoreLib.Native
[  9%] Building CXX object Runtime/Full/CMakeFiles/Runtime.ServerGC.dir/__/unix/PalRedhawkUnix.cpp.o
[  9%] Building CXX object Runtime/Portable/CMakeFiles/PortableRuntime.dir/__/__/gc/unix/events.cpp.o
[ 11%] Built target System.Private.TypeLoader.Native
[ 11%] Building CXX object Runtime/Full/CMakeFiles/Runtime.ServerGC.dir/__/ThunksMapping.cpp.o
[ 11%] Building CXX object Runtime/Full/CMakeFiles/Runtime.dir/__/unix/PalRedhawkUnix.cpp.o
In file included from /home/christopherwilliams/git/corert/src/Native/Runtime/unix/PalRedhawkUnix.cpp:48:
/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."
 ^
[ 11%] Building CXX object Runtime/Portable/CMakeFiles/PortableRuntime.dir/__/__/gc/unix/cgroup.cpp.o
In file included from /home/christopherwilliams/git/corert/src/Native/Runtime/unix/PalRedhawkUnix.cpp:48:
/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."
 ^
1 error generated.
make[2]: *** [Runtime/Portable/CMakeFiles/PortableRuntime.dir/build.make:778: Runtime/Portable/CMakeFiles/PortableRuntime.dir/__/unix/PalRedhawkUnix.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 12%] Building CXX object Runtime/Full/CMakeFiles/Runtime.ServerGC.dir/__/unix/HardwareExceptions.cpp.o
1 error generated.
make[2]: *** [Runtime/Full/CMakeFiles/Runtime.ServerGC.dir/build.make:778: Runtime/Full/CMakeFiles/Runtime.ServerGC.dir/__/unix/PalRedhawkUnix.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 12%] Building CXX object Runtime/Full/CMakeFiles/Runtime.dir/__/ThunksMapping.cpp.o
In file included from /home/christopherwilliams/git/corert/src/Native/Runtime/unix/PalRedhawkUnix.cpp:48:
/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."
 ^
1 error generated.
make[2]: *** [Runtime/Full/CMakeFiles/Runtime.dir/build.make:778: Runtime/Full/CMakeFiles/Runtime.dir/__/unix/PalRedhawkUnix.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:334: Runtime/Full/CMakeFiles/Runtime.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:280: Runtime/Full/CMakeFiles/Runtime.ServerGC.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:361: Runtime/Portable/CMakeFiles/PortableRuntime.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
Failed to build corert native components.
@jkotas
Copy link
Member

jkotas commented Dec 27, 2019

This should be fixed now. Please let us know if you are running into any other issues with latest Fedora.

@Christopher876
Copy link
Author

Awesome! Everything compiles and works now!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants