Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile error #259

Open
patcmorneau opened this issue Aug 23, 2022 · 1 comment
Open

compile error #259

patcmorneau opened this issue Aug 23, 2022 · 1 comment

Comments

@patcmorneau
Copy link
Contributor

patcmorneau commented Aug 23, 2022

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
@patcmorneau
Copy link
Contributor Author

error does not occur on Ubuntu 20.04
it only occurs on Ubuntu22.04
also in ubuntu 22.04 we dont have to specify in the cmake file to use c++17

@patcmorneau patcmorneau changed the title compile error when using cmake with ubuntu compile error Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant