-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Catch2 fails to compile on Fedora Rawhide #2178
Comments
Humm, can't say I am happy that |
It's also broken catch 1 which uses SIGSTKSZE which is also now non-constant. |
I've pushed new builds of catch1 and catch for Fedora Rawhide now which hardwire the stack size as 32Kb until we have a better fix. |
This patch is about fixing a compilation error that we are seeing on Fedora Rawhide with glibc 2.33.9000, which makes MINSIGSTKSZ not be a constant value anymore. Thus, the sigStackSize variable that is declared constexpr cannot use that MINSIGSTKSZ as initializer anymore. So as suggested in the issue catchorg/Catch2#2178 filed against 'catchorg' for this purpose, I am hardwiring the initialization value of sigStackSize for now. * tests/lib/catch.hpp: Update to v2.13.4 and initialize sigStackSize to 32768 for now, as suggested by catchorg/Catch2#2178. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Skip tests to workaround a compilation error same as catchorg/Catch2#2178
Because new glibc has changed `MINSIGSTKSZ` to be a syscall instead of being constant, the signal posix handling needed changes, as it used the value in constexpr context, for deciding size of an array. It would be simple to fix it by having the handler determine the signal handling stack size and allocate the memory every time the handler is being installed, but that would add another allocation and a syscall every time a test case is entered. Instead, I split apart the idea of preparing fatal error handlers, and engaging them, so that the memory can be allocated only once and still be guarded by RAII. Also turns out that Catch2's use of `MINSIGSTKSZ` was wrong, and we should've been using `SIGSTKSZ` the whole time, which we use now. Closes #2178
Because new glibc has changed `MINSIGSTKSZ` to be a syscall instead of being constant, the signal posix handling needed changes, as it used the value in constexpr context, for deciding size of an array. It would be simple to fix it by having the handler determine the signal handling stack size and allocate the memory every time the handler is being installed, but that would add another allocation and a syscall every time a test case is entered. Instead, I split apart the idea of preparing fatal error handlers, and engaging them, so that the memory can be allocated only once and still be guarded by RAII. Also turns out that Catch2's use of `MINSIGSTKSZ` was wrong, and we should've been using `SIGSTKSZ` the whole time, which we use now. Closes #2178
Because new glibc has changed `MINSIGSTKSZ` to be a syscall instead of being constant, the signal posix handling needed changes, as it used the value in constexpr context, for deciding size of an array. It would be simple to fix it by having the handler determine the signal handling stack size and allocate the memory every time the handler is being installed, but that would add another allocation and a syscall every time a test case is entered. Instead, I split apart the idea of preparing fatal error handlers, and engaging them, so that the memory can be allocated only once and still be guarded by RAII. Also turns out that Catch2's use of `MINSIGSTKSZ` was wrong, and we should've been using `SIGSTKSZ` the whole time, which we use now. Closes #2178
Should be resolved in current commit on the v2.x branch. You will need to regenerate the single header to test it (use |
The fix works for me as well. Thanks! |
Closing as the fixed version has been released, and this won't autoclose since v2 is no longer main branch. |
Fixes compilation with new glibc on Fedora Rawhide. See: catchorg/Catch2#2178
Fixes compilation with new glibc on Fedora Rawhide. See: catchorg/Catch2#2178
Because new glibc has changed `MINSIGSTKSZ` to be a syscall instead of being constant, the signal posix handling needed changes, as it used the value in constexpr context, for deciding size of an array. It would be simple to fix it by having the handler determine the signal handling stack size and allocate the memory every time the handler is being installed, but that would add another allocation and a syscall every time a test case is entered. Instead, I split apart the idea of preparing fatal error handlers, and engaging them, so that the memory can be allocated only once and still be guarded by RAII. Also turns out that Catch2's use of `MINSIGSTKSZ` was wrong, and we should've been using `SIGSTKSZ` the whole time, which we use now. Closes #2178
Because new glibc has changed `MINSIGSTKSZ` to be a syscall instead of being constant, the signal posix handling needed changes, as it used the value in constexpr context, for deciding size of an array. It would be simple to fix it by having the handler determine the signal handling stack size and allocate the memory every time the handler is being installed, but that would add another allocation and a syscall every time a test case is entered. Instead, I split apart the idea of preparing fatal error handlers, and engaging them, so that the memory can be allocated only once and still be guarded by RAII. Also turns out that Catch2's use of `MINSIGSTKSZ` was wrong, and we should've been using `SIGSTKSZ` the whole time, which we use now. Closes #2178
see catchorg/Catch2#2178 Signed-off-by: Dennis Gilmore <dennis@ausil.us>
Updated Git Tag for Catch2 (GCC 11 compat, see catchorg/Catch2#2178)
[Why] There are some incompatibilities with recent versions of glibc, where MINSIGSTKSZ has become a non-constant, which breaks the build of Catch2. Signed-off-by: Soeren Grunewald <soeren.grunewald@desy.de> Fixes: catchorg/Catch2#2178
Based on this patch: woodard/libabigail@8ae8dcb Please refer to the catch issue #2178 for details catchorg/Catch2#2178 This might not work on all platforms Signed-off-by: Christian Ege <christian.ege@ifm.com>
Fixes catchorg/Catch2#2178 on Ubunto 22.04
The currently used version still suffers from the issue that apparently MINSIGSTKSZ is no longer a constant expression in newer glibc versions. Upstream bug report: catchorg/Catch2#2178
catch.hpp:10822:58: error: call to non-'constexpr' function 'long int sysconf(int)' followed by: catch.hpp:10881:45: error: size of array 'altStackMem' is not an integral constant-expression
catch.hpp:10822:58: error: call to non-'constexpr' function 'long int sysconf(int)' followed by: catch.hpp:10881:45: error: size of array 'altStackMem' is not an integral constant-expression
Describe the bug
Tests that use Catch2 fail to compile on Fedora Rawhide.
Expected behavior
Tests that use Catch2 compile and execute without any problems on Fedora Rawhide.
Reproduction steps
Try to compile the factorial example from the Catch2 tutorial:
Platform information:
Additional context
This behaviour seems to be related to this change in
glibc
: https://sourceware.org/git/?p=glibc.git;a=commit;h=6c57d320484988e87e446e2e60ce42816bf51d53The text was updated successfully, but these errors were encountered: