Closed kcldralle closed 2 years ago
Thanks for report! Could you please provide complete error log? Currently, my GCC is 11.1.0, and I can't observe any issues with build.
@h4tr3d Thanks for the quick fix. To answer your question, here is the error returned when building the older version of catch2:
FAILED: rootdir/avcpp/tests/CMakeFiles/test_main.dir/test-main.cpp.o
/usr/bin/c++ -I../rootdir/avcpp/catch2/single_include -fopenmp -g -std=gnu++17 -MD -MT rootdir/avcpp/tests/CMakeFiles/test_main.dir/test-main.cpp.o -MF rootdir/avcpp/tests/CMakeFiles/test_main.dir/test-main.cpp.o.d -o rootdir/avcpp/tests/CMakeFiles/test_main.dir/test-main.cpp.o -c ../rootdir/avcpp/tests/test-main.cpp
In file included from /usr/include/signal.h:328,
from ../rootdir/avcpp/catch2/single_include/catch2/catch.hpp:6323,
from ../rootdir/avcpp/tests/test-main.cpp:7:
../rootdir/avcpp/catch2/single_include/catch2/catch.hpp:9041:58: error: call to non-‘constexpr’ function ‘long int sysconf(int)’
9041 | constexpr static 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 ../rootdir/avcpp/catch2/single_include/catch2/catch.hpp:6323,
from ../rootdir/avcpp/tests/test-main.cpp:7:
/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 ../rootdir/avcpp/tests/test-main.cpp:7:
../rootdir/avcpp/catch2/single_include/catch2/catch.hpp:9100:45: error: size of array ‘altStackMem’ is not an integral constant-expression
9100 | char FatalConditionHandler::altStackMem[sigStackSize] = {};
| ^~~~~~~~~~~~
When building avcpp on ubuntu 21 with gcc 11.2.0 an error occurs in catch2 headers. A possible solution is to check out tag v2.13.7 of catch2, this solved the issues for us.