Skip to content

compile error #259

@patcmorneau

Description

@patcmorneau

the compile error does not occur when using a fresh Debian.

error triggered using cmake or make test-quick

[ 93%] Building CXX object CMakeFiles/tests.dir/src/datagrams/s7k/S7kParser.cpp.o
In file included from /usr/include/signal.h:328,
                 from /home/pat/MBES-lib/test/catch.hpp:7937,
                 from /home/pat/MBES-lib/test/main.cpp:2:
/home/pat/MBES-lib/test/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/x86_64-linux-gnu/bits/sigstksz.h:24,
                 from /usr/include/signal.h:328,
                 from /home/pat/MBES-lib/test/catch.hpp:7937,
                 from /home/pat/MBES-lib/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 /home/pat/MBES-lib/test/main.cpp:2:
/home/pat/MBES-lib/test/catch.hpp:10776:45: error: size of array ‘altStackMem’ is not an integral constant-expression
10776 |     char FatalConditionHandler::altStackMem[sigStackSize] = {};
      |                                             ^~~~~~~~~~~~
[ 94%] Building CXX object CMakeFiles/tests.dir/src/datagrams/kongsberg/KongsbergParser.cpp.o
[ 95%] Building CXX object CMakeFiles/tests.dir/src/datagrams/xtf/XtfParser.cpp.o
[ 96%] Building CXX object CMakeFiles/tests.dir/src/utils/NmeaUtils.cpp.o
[ 97%] Building CXX object CMakeFiles/tests.dir/src/utils/StringUtils.cpp.o
[ 98%] Building CXX object CMakeFiles/tests.dir/src/sidescan/SidescanPing.cpp.o
make[2]: *** [CMakeFiles/tests.dir/build.make:76: CMakeFiles/tests.dir/test/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:307: CMakeFiles/tests.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions