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

build error: call to non-‘constexpr’ function ‘long int sysconf(int)’ #1122

Closed
agvxov opened this issue Jan 17, 2023 · 9 comments
Closed

Comments

@agvxov
Copy link

agvxov commented Jan 17, 2023

build.log

Happens both with the 'master' and the 'dev' branch.
Please let me know what system information i should provide.

@fnc12
Copy link
Owner

fnc12 commented Jan 17, 2023

what is your compiler and C++ standard?

@agvxov
Copy link
Author

agvxov commented Jan 17, 2023

$ ls -l /usr/bin/c++
lrwxrwxrwx 1 root root 39 Oct 21 13:09 /usr/bin/c++ -> /usr/x86_64-pc-linux-gnu/gcc-bin/12/c++*
$ /usr/bin/c++ --version
c++ (Gentoo Hardened 12.2.1_p20221008 p1) 12.2.1 20221008 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Im not sure if I understand the second part of the question correctly. c++14 is being used as it is set by cmake and can be seen in the log.

@fnc12
Copy link
Owner

fnc12 commented Jan 17, 2023

ok but constexpr is c++17 feature. Looks like you have issues with C++ standard

@agvxov
Copy link
Author

agvxov commented Jan 17, 2023

Sure, but Im not personally selecting any standard. Correctly if Im wrong, but isnt it cmake's job to do so?

@fnc12
Copy link
Owner

fnc12 commented Jan 17, 2023

IDK cause it depends on your build system and build chain

@agvxov
Copy link
Author

agvxov commented Jan 17, 2023

To be clear, what Im trying to do is building your library from source as specified by the "Installation" chapter in the README.

@fnc12
Copy link
Owner

fnc12 commented Jan 17, 2023

looks like it is catch2 lib's issue reproducible on some linux distros catchorg/Catch2#2178 . Check out dev branch now cause other guy made a PR for that #1088 which I've merged a minute ago

@agvxov
Copy link
Author

agvxov commented Jan 17, 2023

Done. The issue still persists and the log is identical to that I originally posted.
I played around with the CMakeLists.txt. Forced c++20, got the same result, than after a google search realized constexpr is a c++11 feature, not a c++17 one as you previously mentioned.

However, digging into the error further I found this: catchorg/Catch2#2421
It seems that the error is rooted in glic and is independent of your software. My apologies.

Shall I close this as completed or as not planned?

@fnc12
Copy link
Owner

fnc12 commented Jan 17, 2023

I mean if constexpr is C++17 feature. Yes you can close it

@agvxov agvxov closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2023
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

2 participants