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

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

Open
xorinox opened this issue Mar 12, 2022 · 3 comments
Open

Comments

@xorinox
Copy link

xorinox commented Mar 12, 2022

Cannot compile code on Fedora 35, v33 was just fine.

gcc --version
gcc (GCC) 11.2.1 20220127 (Red Hat 11.2.1-9)
Copyright (C) 2021 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.

cmake --version
cmake version 3.22.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).

make --version
GNU Make 4.3
Built for x86_64-redhat-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

git log
commit ecec17d (HEAD -> master, origin/master, origin/HEAD)
Merge: efa5b2a 70bb67f
Author: Max max.wittal@mwittal.de
Date: Fri Feb 11 19:27:08 2022 +0100

Merge pull request #988 from risner/stage-option

Add -s stagedir option

[100%] Linking CXX executable runbench
In file included from /usr/include/signal.h:328,
from /opt/madMAx43v3r/chia-plotter/lib/bls-signatures/src/../contrib/catch/catch.hpp:8034,
from /opt/madMAx43v3r/chia-plotter/lib/bls-signatures/src/test.cpp:20:
/opt/madMAx43v3r/chia-plotter/lib/bls-signatures/src/../contrib/catch/catch.hpp:10822:58: error: call to non-‘constexpr’ function ‘long int sysconf(int)’
10822 | static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
| ^~~~~~~~~~~
In file included from /usr/include/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from /opt/madMAx43v3r/chia-plotter/lib/bls-signatures/src/../contrib/catch/catch.hpp:8034,
from /opt/madMAx43v3r/chia-plotter/lib/bls-signatures/src/test.cpp:20:
/usr/include/unistd.h:640:17: note: ‘long int sysconf(int)’ declared here
640 | extern long int sysconf (int __name) __THROW;
| ^~~~~~~
compilation terminated due to -fmax-errors=1.
make[2]: *** [lib/bls-signatures/src/CMakeFiles/runtest.dir/build.make:76: lib/bls-signatures/src/CMakeFiles/runtest.dir/test.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:895: lib/bls-signatures/src/CMakeFiles/runtest.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Built target runbench
[100%] Linking CXX executable UnitTests_bech32
[100%] Linking CXX executable test_phase_3
[100%] Linking CXX executable test_phase_1
[100%] Built target test_phase_3
[100%] Built target test_phase_1
[100%] Built target UnitTests_bech32
[100%] Linking CXX executable chia_plot_k34
[100%] Linking CXX executable chia_plot
[100%] Built target chia_plot_k34
[100%] Built target chia_plot
make: *** [Makefile:136: all] Error 2

compile.log

@mthqwork
Copy link

mthqwork commented Apr 2, 2022

I guess you have tried it with make_release.sh. Had the same issue with it, while building with make_devel.sh worked fine.

@nining
Copy link

nining commented Aug 18, 2022

manual change this file lib/bls-signatures/contrib/catch/catch.hpp :
static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
to
static constexpr std::size_t sigStackSize = 32768;

@usmn001
Copy link

usmn001 commented Dec 2, 2023

This #1002 (comment) worked for me. Thanks :).

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

4 participants