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

#include <sys/sysctl.h> deprecated from glibc on recent distros stil needed on mac. annd conditional import. #20

Closed
NicTanghe opened this issue Jan 21, 2023 · 5 comments · Fixed by #35
Labels
build Having issue building Open RV good first issue Good for newcomers

Comments

@NicTanghe
Copy link

#include <sys/sysctl.h> Deprecated from glibc on EL9.

Please add conditional statement that checks how recent your system is to OpenRV/src/lib/base/TwkUtil/SystemInfo.cpp,

@NicTanghe NicTanghe changed the title #include <sys/sysctl.h> deprecated from glibc on EL9 add conditional import that only runs if on rhel 9 #include <sys/sysctl.h> deprecated from glibc on recent distros add conditional import that only runs if the distro is old enough. Jan 21, 2023
@compaga compaga added the build Having issue building Open RV label Jan 23, 2023
@geffrak
Copy link
Contributor

geffrak commented Jan 24, 2023

Could you propose a pull request to fix this?

@geffrak geffrak added the good first issue Good for newcomers label Jan 24, 2023
@NicTanghe
Copy link
Author

NicTanghe commented Jan 24, 2023

I`ll have a look at what i can do.

Is it possible to just remove the lines all together ?
Does it also compile without the lines on older Distro`s ?

That might be a better fix then adding extra bloat.

@rogernelson
Copy link
Contributor

I checked on CentOS7 and it compiles fine without the line. Mac needs it though, even on the most recent Ventura build.

So I would suggest replacing the else on this line:

with:

#elif __APPLE__

If you'd rather I do the PR, I can take care of it.

@rogernelson
Copy link
Contributor

There's a PR in review now that should solve this for you. I built it successfully on Mac Ventura 13.1 and CentOS7.

rogernelson added a commit that referenced this issue Jan 24, 2023
Closes #20 

The sysctl include is not needed on CentOS7 and as of glibc 2.32 it has
been removed. So support distros/compilers later than that by removing
it completely on Linux.

Signed-off-by: Roger Nelson <roger.nelson@autodesk.com>
@NicTanghe
Copy link
Author

THX !

@NicTanghe NicTanghe changed the title #include <sys/sysctl.h> deprecated from glibc on recent distros add conditional import that only runs if the distro is old enough. #include <sys/sysctl.h> deprecated from glibc on recent distros stil needed on mac. Jan 25, 2023
@NicTanghe NicTanghe changed the title #include <sys/sysctl.h> deprecated from glibc on recent distros stil needed on mac. #include <sys/sysctl.h> deprecated from glibc on recent distros stil needed on mac. annd conditional import. Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Having issue building Open RV good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants