GCC seems to complain about arrays being associated with non-constant sizes. GCC behavior seems to have changed recently. C++ standard seems to require the sizes to be constant, but GCC has earlier allowed non-constant sizes.
`` Compiling: /src/extRegression/regression.cc
In file included from /usr/include/signal.h:328,
from src/extRegression/catch.hpp:8034,
from src/extRegression/regression.cc:19:
src/extRegression/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/x86_64-linux-gnu/bits/sigstksz.h:24,
from /usr/include/signal.h:328,
from src/extRegression/catch.hpp:8034,
from src/extRegression/regression.cc:19:
/usr/include/unistd.h:640:17: note: ‘long int sysconf(int)’ declared here
640 | extern long int sysconf (int name) THROW;
| ^~~
In file included from src/extRegression/regression.cc:19:
src/extRegression/catch.hpp:10881:45: error: size of array ‘altStackMem’ is not an integral constant-expression
10881 | char FatalConditionHandler::altStackMem[sigStackSize] = {};
| ^~~~
make: *** [Makefile:158: src/extRegression/regression.o] Error 1
As can be seen from the error message, the compilation error happened in the testing framework Catch2src/extRegression/catch.hpp.
Updating this file to v2.13.10 fixes the problem.
GCC seems to complain about arrays being associated with non-constant sizes. GCC behavior seems to have changed recently. C++ standard seems to require the sizes to be constant, but GCC has earlier allowed non-constant sizes.
$ gcc --version gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
`` Compiling: /src/extRegression/regression.cc In file included from /usr/include/signal.h:328, from src/extRegression/catch.hpp:8034, from src/extRegression/regression.cc:19: src/extRegression/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/x86_64-linux-gnu/bits/sigstksz.h:24, from /usr/include/signal.h:328, from src/extRegression/catch.hpp:8034, from src/extRegression/regression.cc:19: /usr/include/unistd.h:640:17: note: ‘long int sysconf(int)’ declared here 640 | extern long int sysconf (int name) THROW; | ^~~ In file included from src/extRegression/regression.cc:19: src/extRegression/catch.hpp:10881:45: error: size of array ‘altStackMem’ is not an integral constant-expression 10881 | char FatalConditionHandler::altStackMem[sigStackSize] = {}; | ^~~~ make: *** [Makefile:158: src/extRegression/regression.o] Error 1