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

MINSIGSTKSZ error during building #530

Open
mattiadido95 opened this issue Oct 21, 2022 · 2 comments
Open

MINSIGSTKSZ error during building #530

mattiadido95 opened this issue Oct 21, 2022 · 2 comments

Comments

@mattiadido95
Copy link

in the installation phase called "Building CXX object test/unit/CMakeFiles/uri_unit_test_suite.dir/source/uri_suite.cpp.o" i have this error :

In file included from /usr/include/signal.h:328,
                 from /home/mattia/Sviluppo/restbed/dependency/catch/single_include/catch2/catch.hpp:7955,
                 from /home/mattia/Sviluppo/restbed/test/unit/source/uri_suite.cpp:10:
/home/mattia/Sviluppo/restbed/dependency/catch/single_include/catch2/catch.hpp:10735:58: error: call to non-‘constexpr’ function ‘long int sysconf(int)’
10735 |     static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
      |                                                          ^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/bits/sigstksz.h:24:
/usr/include/unistd.h:640:17: note: ‘long int sysconf(int)’ declared here
  640 | extern long int sysconf (int __name) __THROW;
      |                 ^~~~~~~
/home/mattia/Sviluppo/restbed/dependency/catch/single_include/catch2/catch.hpp:10794:45: error: size of array ‘altStackMem’ is not an integral constant-expression
10794 |     char FatalConditionHandler::altStackMem[sigStackSize] = {};
      |                                             ^~~~~~~~~~~~
make[2]: *** [test/unit/CMakeFiles/uri_unit_test_suite.dir/build.make:76: test/unit/CMakeFiles/uri_unit_test_suite.dir/source/uri_suite.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:432: test/unit/CMakeFiles/uri_unit_test_suite.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

can anyone help me?
i'm using Ubuntu 22.04.1 LTS and gcc/g++ 12

@mattiadido95 mattiadido95 changed the title error during installation MINSIGSTKSZ error during building Oct 21, 2022
@mattiadido95
Copy link
Author

I solved it by editing the catch.hpp file as shown here:

https://github.com/catchorg/Catch2/blob/d71b4617e9935f8589870af211f5b7552d743654/single_include/catch2/catch.hpp#L10818

@strahinja-radman
Copy link

To be more precise I replaced the code in

/home/workspace/restbed/dependency/catch/single_include/catch2/catch.hpp

with the code from the file that @mattiadido95 mentioned.

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

2 participants