Compiling test failed with `error: size of array ‘altStackMem’ is not an integral constant-expression`
Closed this issue · 1 comments
AmirInt commented
GCC version:
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
CMake version:
cmake version 3.26.0
OS:
Ubuntu 22.04 on WSL2 (Windows 11)
Steps to reproduce:
Attempt the "Compile Tests" section in the README file.
The make
command errors out with:
error: size of array ‘altStackMem’ is not an integral constant-expression
I simply replaced the macro SIGSTKSZ
with its value 8192
in doctest.hpp
, and I could successfully generate and run the tests, but that's not the solution. There are related issues like this, but at least I couldn't find anyone directly addressing and fixing it.
Haibarapink commented
The macro SIGSTKSZ
is defined as sysconf (_SC_SIGSTKSZ)
, and the function 'sysconf(...) ' isn't an integral constant-expression.