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

Compiler error trying to build unit tests on Raspberry Pi 4 (Debian bookworm 12.2.0-14, GCC 12.2) #65

Open
kneelian opened this issue Dec 21, 2023 · 0 comments

Comments

@kneelian
Copy link

Trying make termox.unit.tests produces the following errors:

$ make termox.unit.tests
[ 17%] Built target escape
[ 94%] Built target TermOx
[ 94%] Building CXX object tests/CMakeFiles/termox.unit.tests.dir/catch2.main.cpp.o
In file included from /usr/include/signal.h:328,
                 from /home/samara/Projects/TermOx/external/signals-light/external/Catch2/single_include/catch2/catch.hpp:7959,
                 from /home/samara/Projects/TermOx/tests/catch2.main.cpp:2:
/home/samara/Projects/TermOx/external/signals-light/external/Catch2/single_include/catch2/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/aarch64-linux-gnu/bits/sigstksz.h:24:
/usr/include/unistd.h:640:17: note: ‘long int sysconf(int)’ declared here
  640 | extern long int sysconf (int __name) __THROW;
      |                 ^~~~~~~
/home/samara/Projects/TermOx/external/signals-light/external/Catch2/single_include/catch2/catch.hpp:10881:45: error: size of array ‘altStackMem’ is not an integral constant-expression
10881 |     char FatalConditionHandler::altStackMem[sigStackSize] = {};
      |                                             ^~~~~~~~~~~~
make[3]: *** [tests/CMakeFiles/termox.unit.tests.dir/build.make:76: tests/CMakeFiles/termox.unit.tests.dir/catch2.main.cpp.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:623: tests/CMakeFiles/termox.unit.tests.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:630: tests/CMakeFiles/termox.unit.tests.dir/rule] Error 2
make: *** [Makefile:364: termox.unit.tests] Error 2

This is because MINSIGSTKSZ is no longer a constant on Linux

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

1 participant