NJOY21
NJOY21 copied to clipboard
Build fails with `error: size of array ‘altStackMem’ is not an integral constant-expression`
In building on Ubuntu 22.04, we get an error from the catch-adapter-src dependency saying:
[ 88%] Built target njoy21
[ 89%] Building CXX object src/njoy21/CommandLine/test/CMakeFiles/njoy21.CommandLine.test.dir/CommandLine.test.cpp.o
In file included from /usr/include/signal.h:328,
from /home/nick/code/NJOY21/bin/_deps/catch-adapter-src/src/single_include/catch.hpp:6520,
from /home/nick/code/NJOY21/src/njoy21/CommandLine/test/CommandLine.test.cpp:2:
/home/nick/code/NJOY21/bin/_deps/catch-adapter-src/src/single_include/catch.hpp:6543:33: error: size of array ‘altStackMem’ is not an integral constant-expression
6543 | static char altStackMem[SIGSTKSZ];
| ^~~~~~~~
/home/nick/code/NJOY21/bin/_deps/catch-adapter-src/src/single_include/catch.hpp:6594:45: error: size of array ‘altStackMem’ is not an integral constant-expression
6594 | char FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
| ^~~~~~~~
make[2]: *** [src/njoy21/CommandLine/test/CMakeFiles/njoy21.CommandLine.test.dir/build.make:76: src/njoy21/CommandLine/test/CMakeFiles/njoy21.CommandLine.test.dir/CommandLine.test.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2142: src/njoy21/CommandLine/test/CMakeFiles/njoy21.CommandLine.test.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
Looks like this is related mostly to this in upstream: https://github.com/catchorg/Catch2/issues/2178