objectbox-generator icon indicating copy to clipboard operation
objectbox-generator copied to clipboard

Catch2 upgraded to fix build for Ubuntu 22.04

Open d-adler opened this issue 2 years ago • 0 comments

…compilation error:

On Ubuntu 22.04, the build fails with

objectbox-generator/third_party/flatbuffers-c-bridge/third_party/catch.hpp:10791:58: error: call to non-‘constexpr’ function ‘long int sysconf(int)’
10791 |     static constexpr 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 [..]objectbox-generator/third_party/flatbuffers-c-bridge/third_party/catch.hpp:8007,
                 from [..]objectbox-generator/third_party/flatbuffers-c-bridge/test/main.cpp:2:
/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 [..]objectbox-generator/third_party/flatbuffers-c-bridge/test/main.cpp:2:
[..]objectbox-generator/third_party/flatbuffers-c-bridge/third_party/catch.hpp:10850:45: error: size of array ‘altStackMem’ is not an integral constant-expression
10850 |     char FatalConditionHandler::altStackMem[sigStackSize] = {};
      |                                             ^~~~~~~~~~~~

Upgrading catch2 in third_party/flatbuffers-c-bridge/third_party from 2.12.1 to 2.13.10 seem to have fixed it.

d-adler avatar Aug 17 '23 17:08 d-adler