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

Dependency sys/sysctl.h is deprecated #2

Open
chrisdonlan opened this issue Jan 20, 2021 · 1 comment
Open

Dependency sys/sysctl.h is deprecated #2

chrisdonlan opened this issue Jan 20, 2021 · 1 comment

Comments

@chrisdonlan
Copy link

chrisdonlan commented Jan 20, 2021

Running into issues building these samples on Fedora 33. Specifically, the threaded rendering example.

The following file is deprecated from glibc,

sys/sysctl.h

sysctl is deprecated

Error output:

make[3]: Entering directory '/home/chris/ray-tracing/build'
[ 16%] Building CXX object gl_vk_bk3dthreaded/CMakeFiles/gl_vk_bk3dthreaded.dir/mt/CThread.cpp.o
/home/chris/ray-tracing/gl_vk_bk3dthreaded/mt/CThread.cpp:34:13: fatal error: sys/sysctl.h: No such file or directory
   34 | #   include <sys/sysctl.h>
      |             ^~~~~~~~~~~~~~
compilation terminated.
make[3]: *** [gl_vk_bk3dthreaded/CMakeFiles/gl_vk_bk3dthreaded.dir/build.make:173: gl_vk_bk3dthreaded/CMakeFiles/gl_vk_bk3dthreaded.dir/mt/CThread.cpp.o] Error 1
make[3]: Leaving directory '/home/chris/lab/ray-tracing/build'
@chrisdonlan
Copy link
Author

chrisdonlan commented Jan 20, 2021

The versions of glib available on Fedora @ release 33:

[chris@localhost ray-tracing]$ dnf --showduplicates list glibc-devel
AMDGPU Packages
Fedora Modular 33 - x86_64 - Updates
Fedora 33 - x86_64 - Updates
Fedora 33 - x86_64 - Updates

Installed Packages
glibc-devel.x86_64  2.32-1.fc33  @fedora

Available Packages
glibc-devel.i686  2.32-1.fc33  fedora 
glibc-devel.x86_64  2.32-1.fc33  fedora 
glibc-devel.i686  2.32-3.fc33  updates
glibc-devel.x86_64  2.32-3.fc33  updates

What I did to move forward with the build:

I removed line 34 from mt/CThread.cpp, here

However, I then had to make an additional change.

I do not know the optimal spot to place this information, so I added the library links -lpthread -lm to the following positions in the CMakeLists.txt of the same project:

here

and here

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

No branches or pull requests

1 participant