We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ext/catch
git clone + submodules cmake -DCMAKE_BUILD_TYPE=Debug -DRC_ENABLE_TESTS=ON -DRC_ENABLE_EXAMPLES=ON -DRC_ENABLE_GTEST=ON -DRC_ENABLE_GMOCK=ON -DRC_ENABLE_BOOST=OFF -DRC_ENABLE_BOOST_TEST=OFF -DRC_ENABLE_RTTI=ON -G Ninja ..
cmake -DCMAKE_BUILD_TYPE=Debug -DRC_ENABLE_TESTS=ON -DRC_ENABLE_EXAMPLES=ON -DRC_ENABLE_GTEST=ON -DRC_ENABLE_GMOCK=ON -DRC_ENABLE_BOOST=OFF -DRC_ENABLE_BOOST_TEST=OFF -DRC_ENABLE_RTTI=ON -G Ninja ..
[root:/tmp/rapidcheck/build] # ninja [1/4] Building CXX object test/CMakeFiles/rapidcheck_tests.dir/main.cpp.o FAILED: test/CMakeFiles/rapidcheck_tests.dir/main.cpp.o /usr/bin/clang++-14 -I/tmp/rapidcheck/test/. -I/tmp/rapidcheck/test/../src -I/tmp/rapidcheck/include -I/tmp/rapidcheck/ext/catch/single_include -I/tmp/rapidcheck/extras/catch/include -Wall -Wno-missing-braces -Wno-unused-command-line-argument -g -std=gnu++11 -MD -MT test/CMakeFiles/rapidcheck_tests.dir/main.cpp.o -MF test/CMakeFiles/rapidcheck_tests.dir/main.cpp.o.d -o test/CMakeFiles/rapidcheck_tests.dir/main.cpp.o -c /tmp/rapidcheck/test/main.cpp In file included from /tmp/rapidcheck/test/main.cpp:15: /tmp/rapidcheck/ext/catch/single_include/catch2/catch.hpp:7972:34: error: constexpr variable 'sigStackSize' must be initialized by a constant expression constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/rapidcheck/ext/catch/single_include/catch2/catch.hpp:7972:58: note: non-constexpr function 'sysconf' cannot be used in a constant expression constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ; ^ /usr/include/x86_64-linux-gnu/bits/sigstksz.h:32:22: note: expanded from macro 'MINSIGSTKSZ' # define MINSIGSTKSZ SIGSTKSZ ^ /usr/include/x86_64-linux-gnu/bits/sigstksz.h:28:19: note: expanded from macro 'SIGSTKSZ' # define SIGSTKSZ sysconf (_SC_SIGSTKSZ) ^ /usr/include/unistd.h:640:17: note: declared here extern long int sysconf (int __name) __THROW; ^ In file included from /tmp/rapidcheck/test/main.cpp:15: /tmp/rapidcheck/ext/catch/single_include/catch2/catch.hpp:8031:33: error: variable length array declaration not allowed at file scope char FatalConditionHandler::altStackMem[sigStackSize] = {}; ^ ~~~~~~~~~~~~ 2 errors generated. [2/4] Building CXX object extras/gmock/test/CMakeFiles/rapidcheck_gmock_tests.dir/main.cpp.o FAILED: extras/gmock/test/CMakeFiles/rapidcheck_gmock_tests.dir/main.cpp.o /usr/bin/clang++-14 -DCATCH_CONFIG_PREFIX_ALL -I/tmp/rapidcheck/extras/gmock/include -I/tmp/rapidcheck/include -I/tmp/rapidcheck/extras/catch/include -I/tmp/rapidcheck/ext/catch/single_include -isystem /tmp/rapidcheck/ext/googletest/googletest/include -isystem /tmp/rapidcheck/ext/googletest/googlemock/include -isystem /tmp/rapidcheck/ext/googletest/googlemock -isystem /tmp/rapidcheck/ext/googletest/googletest -Wall -Wno-missing-braces -Wno-unused-command-line-argument -g -MD -MT extras/gmock/test/CMakeFiles/rapidcheck_gmock_tests.dir/main.cpp.o -MF extras/gmock/test/CMakeFiles/rapidcheck_gmock_tests.dir/main.cpp.o.d -o extras/gmock/test/CMakeFiles/rapidcheck_gmock_tests.dir/main.cpp.o -c /tmp/rapidcheck/extras/gmock/test/main.cpp In file included from /tmp/rapidcheck/extras/gmock/test/main.cpp:2: /tmp/rapidcheck/ext/catch/single_include/catch2/catch.hpp:7972:34: error: constexpr variable 'sigStackSize' must be initialized by a constant expression constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ; ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /tmp/rapidcheck/ext/catch/single_include/catch2/catch.hpp:7972:58: note: non-constexpr function 'sysconf' cannot be used in a constant expression constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ; ^ /usr/include/x86_64-linux-gnu/bits/sigstksz.h:32:22: note: expanded from macro 'MINSIGSTKSZ' # define MINSIGSTKSZ SIGSTKSZ ^ /usr/include/x86_64-linux-gnu/bits/sigstksz.h:28:19: note: expanded from macro 'SIGSTKSZ' # define SIGSTKSZ sysconf (_SC_SIGSTKSZ) ^ /usr/include/unistd.h:640:17: note: declared here extern long int sysconf (int __name) __THROW; ^ In file included from /tmp/rapidcheck/extras/gmock/test/main.cpp:2: /tmp/rapidcheck/ext/catch/single_include/catch2/catch.hpp:8031:33: error: variable length array declaration not allowed at file scope char FatalConditionHandler::altStackMem[sigStackSize] = {}; ^ ~~~~~~~~~~~~ 2 errors generated. ninja: build stopped: subcommand failed.
The text was updated successfully, but these errors were encountered:
Seems like this can be fixed by upgrading the catch version to >v2.13.5: catchorg/Catch2#2421
>v2.13.5
Sorry, something went wrong.
You can also resolve the issue by adding following line in the main cmake file
if(RC_ENABLE_TESTS) enable_testing() add_compile_definitions(-DCATCH_CONFIG_NO_POSIX_SIGNALS) <======= this line add_subdirectory(test) endif()
[Ticket emil-e#322] Resolve compile issue of the tests
ef56370
MINSIGSTKSZ was remove in one of the system lib causing compile error of the tests.
No branches or pull requests
git clone + submodules
cmake -DCMAKE_BUILD_TYPE=Debug -DRC_ENABLE_TESTS=ON -DRC_ENABLE_EXAMPLES=ON -DRC_ENABLE_GTEST=ON -DRC_ENABLE_GMOCK=ON -DRC_ENABLE_BOOST=OFF -DRC_ENABLE_BOOST_TEST=OFF -DRC_ENABLE_RTTI=ON -G Ninja ..
The text was updated successfully, but these errors were encountered: