Fehler beim kompilieren der Tests
Closed this issue · 4 comments
dhinf commented
Fehler beim kompilieren der Tests mit gcc 11.2 und Clang 13.0.1:
otf2xx/tests/catch.hpp:7485:34: error: constexpr variable 'sigStackSize' must be initialized by a constant expression
constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
otf2xx/tests/catch.hpp:7485: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/bits/sigstksz.h:32:22: note: expanded from macro 'MINSIGSTKSZ'
# define MINSIGSTKSZ SIGSTKSZ
^
/usr/include/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;
bmario commented
Can't reproduce, neither locally nor in CI: https://github.com/tud-zih-energy/otf2xx/runs/5480258758?check_suite_focus=true
dhinf commented
The error occurs with gcc 11.2 not 11.1 used in for your tests. For clang it starts with version 13
bmario commented
As I said, I tried it locally with GCC 11.2 and Clang 13.0.1, neither of them shows this error.
dhinf commented
using this newer catch.hpp (https://github.com/catchorg/Catch2/releases/download/v2.13.8/catch.hpp) solves the problem