Avocado icon indicating copy to clipboard operation
Avocado copied to clipboard

Catch2 needed update mainline for fix broken linux build

Open mrcmunir opened this issue 2 years ago • 0 comments

Hello I detected when build under latest ubuntu

../../../externals/catch/single_include/catch2/catch.hpp:10717:58: error: call to non-‘constexpr’ function ‘long int sysconf(int)’
10717 |     static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
      |                                                          ^~~~~~~~~~~
In file included from /usr/include/aarch64-linux-gnu/bits/sigstksz.h:24,
                 from /usr/include/signal.h:328,
                 from ../../../externals/catch/single_include/catch2/catch.hpp:7864,
                 from ../../../tests/unit/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 ../../../tests/unit/main.cpp:2:
../../../externals/catch/single_include/catch2/catch.hpp:10776:45: error: size of array ‘altStackMem’ is not an integral constant-expression
10776 |     char FatalConditionHandler::altStackMem[sigStackSize] = {};
      |                                             ^~~~~~~~~~~~

This error it's fixed in mainline catch2 repo.

Also needed add #include into spu.h header due this

In file included from ../../../src/device/dma/dma4_channel.cpp:2:
../../../src/device/spu/spu.h:19:18: error: ‘size_t’ does not name a type
   19 |     static const size_t AUDIO_BUFFER_SIZE = 28 * 2 * 4;
      |                  ^~~~~~
../../../src/device/spu/spu.h:7:1: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
    6 | #include "voice.h"
  +++ |+#include <cstddef>
    7 |
../../../src/device/spu/spu.h:54:5: error: ‘size_t’ does not name a type
   54 |     size_t audioBufferPos;
      |     ^~~~~~
../../../src/device/spu/spu.h:54:5: note: ‘size_t’ is defined in header ‘<cstddef>’; did you forget to ‘#include <cstddef>’?
../../../src/device/spu/spu.h:55:25: error: ‘AUDIO_BUFFER_SIZE’ was not declared in this scope
   55 |     std::array<int16_t, AUDIO_BUFFER_SIZE> audioBuffer;
      |                         ^~~~~~~~~~~~~~~~~
../../../src/device/spu/spu.h:55:42: error: template argument 2 is invalid
   55 |     std::array<int16_t, AUDIO_BUFFER_SIZE> audioBuffer;
      |                                          ^
../../../src/device/spu/spu.h: In member function ‘void spu::SPU::serialize(Archive&)’:
../../../src/device/spu/spu.h:101:12: error: ‘audioBufferPos’ was not declared in this scope; did you mean ‘audioBuffer’?
  101 |         ar(audioBufferPos);
      |            ^~~~~~~~~~~~~~
      |            audioBuffer

mrcmunir avatar Dec 24 '21 15:12 mrcmunir