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 no longer a constant #2421

Closed
btmcg opened this issue May 8, 2022 · 0 comments
Closed

MINSIGSTKSZ no longer a constant #2421

btmcg opened this issue May 8, 2022 · 0 comments

Comments

@btmcg
Copy link

btmcg commented May 8, 2022

Describe the bug
Building with glibc v2.35 causes a compiler error. Apparently MINSIGSTKSZ is no longer a constant in glibc.

In file included from /usr/include/signal.h:328,
                 from third_party/catch2/2.13.9/single_include/catch2/catch.hpp:8030,
                 from /home/brian/src/repos/protocol-parser/test/main.cpp:3:
third_party/catch2/2.13.9/single_include/catch2/catch.hpp:10818:58: error: call to non-‘constexpr’ function ‘long int sysconf(int)’
10818 |     static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
      |                                                          ^~~~~~~~~~~
In file included from /usr/include/c++/11.2.0/bits/atomic_wait.h:44,
                 from /usr/include/c++/11.2.0/bits/atomic_base.h:41,
                 from /usr/include/c++/11.2.0/bits/shared_ptr_atomic.h:33,
                 from /usr/include/c++/11.2.0/memory:78,
                 from third_party/catch2/2.13.9/single_include/catch2/catch.hpp:2943,
                 from /home/brian/src/repos/protocol-parser/test/main.cpp:3:
/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/brian/src/repos/protocol-parser/test/main.cpp:3:
third_party/catch2/2.13.9/single_include/catch2/catch.hpp:10877:45: error: size of array ‘altStackMem’ is not an integral constant-expression
10877 |     char FatalConditionHandler::altStackMem[sigStackSize] = {};

This can be fixed by adding #define CATCH_CONFIG_NO_POSIX_SIGNALS before the catch include.

Expected behavior
Linux should be able to compile this without issue.

Reproduction steps
Use glibc 2.35.

Platform information:

  • OS: Arch Linux

  • Compiler+version: gcc-11.2.0

  • Catch version: **v2.13.9

Additional context
https://stackoverflow.com/questions/71454588/minsigstksz-error-after-update-in-my-manjaro-linux
https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=85e84fe53699fe9e392edffa993612ce08b2954a;hb=HEAD

@horenmar
Copy link
Member

horenmar commented May 9, 2022

Your catch.hpp is old, this is 2.13.9 at the indicated line:

return EXCEPTION_CONTINUE_SEARCH;

In fact the version that fixed this issue was 2.13.5: https://github.com/catchorg/Catch2/blob/devel/docs/release-notes.md#2135

@horenmar horenmar closed this as completed May 9, 2022
dzosz added a commit to dzosz/spring that referenced this issue Nov 4, 2022
* update catch2 to 2.13.5 to resolve issue with MINSIGSTKSZ being no longer usable in constexpr context
* catchorg/Catch2#2421
dzosz added a commit to beyond-all-reason/spring that referenced this issue Nov 10, 2022
* update catch2 to 2.13.5 to resolve issue with MINSIGSTKSZ being no longer usable in constexpr context
* catchorg/Catch2#2421
* fix compilation for test files (excluded from default build) under linux
fnc12 added a commit to fnc12/sqlite_orm that referenced this issue Jan 17, 2023
barrybingo added a commit to barrybingo/sqlite_modern_cpp that referenced this issue Feb 15, 2023
zauguin pushed a commit to SqliteModernCpp/sqlite_modern_cpp that referenced this issue Feb 16, 2023
bacusters added a commit to movetk/movetk that referenced this issue Feb 21, 2023
… pointers as iterators. Also, fix the catch version such that catchorg/Catch2#2421 does not happen anymore for newer glibc.

Signed-off-by: bac-home\bac <bacusters@gmail.com>
bacusters added a commit to movetk/movetk that referenced this issue Feb 22, 2023
… pointers as iterators. Also, fix the catch version such that catchorg/Catch2#2421 does not happen anymore for newer glibc.

Signed-off-by: bac-home\bac <bacusters@gmail.com>
marek-miller added a commit to marek-miller/QuEST_fork that referenced this issue Apr 28, 2023
Chatch needs update.  Test suite won't compile because of issue related to:
catchorg/Catch2#2421

A quick fix taken from:
catchorg/Catch2#2480

This issue has been fixed in Catch v2.13.5:
https://github.com/catchorg/Catch2/blob/devel/docs/release-notes.md#2135
jezhiggins added a commit to jezhiggins/StrangeCharacters-Refactoring-Kata that referenced this issue Jun 8, 2023
nathanielhourt added a commit to dapp-protocols/leap-cdt that referenced this issue Jun 17, 2023
The version of catch2 in use is old enough to fail compiles on updated
Linux operating systems. Update to latest version in v2.0 series to
fix builds.

[Ref: catchorg/Catch2#2421]
devreal added a commit to devreal/ttg that referenced this issue Dec 20, 2023
This is needed to get the fix for catchorg/Catch2#2421

Signed-off-by: Joseph Schuchart <schuchart@icl.utk.edu>
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