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

2.13.4: build fails #2192

Closed
kloczek opened this issue Mar 21, 2021 · 1 comment
Closed

2.13.4: build fails #2192

kloczek opened this issue Mar 21, 2021 · 1 comment

Comments

@kloczek
Copy link

kloczek commented Mar 21, 2021

gcc 11.0.1

[tkloczko@barrel x86_64-redhat-linux-gnu]$ make
/usr/bin/cmake -S/home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4 -B/home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/x86_64-redhat-linux-gnu --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/x86_64-redhat-linux-gnu/CMakeFiles /home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/x86_64-redhat-linux-gnu//CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/x86_64-redhat-linux-gnu'
make  -f CMakeFiles/Catch2WithMain.dir/build.make CMakeFiles/Catch2WithMain.dir/depend
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/x86_64-redhat-linux-gnu'
cd /home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/x86_64-redhat-linux-gnu && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4 /home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4 /home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/x86_64-redhat-linux-gnu /home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/x86_64-redhat-linux-gnu /home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/x86_64-redhat-linux-gnu/CMakeFiles/Catch2WithMain.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/x86_64-redhat-linux-gnu'
make  -f CMakeFiles/Catch2WithMain.dir/build.make CMakeFiles/Catch2WithMain.dir/build
make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/x86_64-redhat-linux-gnu'
[  0%] Building CXX object CMakeFiles/Catch2WithMain.dir/src/catch_with_main.cpp.o
/usr/bin/g++ -DCatch2WithMain_EXPORTS -I/home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/single_include -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -DNDEBUG -fPIC -o CMakeFiles/Catch2WithMain.dir/src/catch_with_main.cpp.o -c /home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/src/catch_with_main.cpp
In file included from /usr/include/signal.h:315,
                 from /home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/single_include/catch2/catch.hpp:8034,
                 from /home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/src/catch_with_main.cpp:2:
/home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/single_include/catch2/catch.hpp:10822:58: error: call to non-‘constexpr’ function ‘long int sysconf(int)’
10822 |     static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
      |                                                          ^~~~~~~~~~~
In file included from /usr/include/bits/sigstksz.h:24,
                 from /usr/include/signal.h:315,
                 from /home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/single_include/catch2/catch.hpp:8034,
                 from /home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/src/catch_with_main.cpp:2:
/usr/include/unistd.h:630:17: note: ‘long int sysconf(int)’ declared here
  630 | extern long int sysconf (int __name) __THROW;
      |                 ^~~~~~~
In file included from /home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/src/catch_with_main.cpp:2:
/home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/single_include/catch2/catch.hpp:10881:45: error: size of array ‘altStackMem’ is not an integral constant-expression
10881 |     char FatalConditionHandler::altStackMem[sigStackSize] = {};
      |                                             ^~~~~~~~~~~~
make[2]: *** [CMakeFiles/Catch2WithMain.dir/build.make:85: CMakeFiles/Catch2WithMain.dir/src/catch_with_main.cpp.o] Error 1
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/x86_64-redhat-linux-gnu'
make[1]: *** [CMakeFiles/Makefile2:335: CMakeFiles/Catch2WithMain.dir/all] Error 2
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/Catch2-2.13.4/x86_64-redhat-linux-gnu'
@horenmar
Copy link
Member

This is currently a known bug, where new versions of libc no longer implement MINSIGSTKSZ as a constant, but Catch2 expects it to be one, and tries to stick the result into a constexpr variable. You can solve it for now by disabling POSIX signal handling with CATCH_CONFIG_NO_POSIX_SIGNALS.

Duplicate of #2178

jeandet added a commit to jeandet/cppdict that referenced this issue Apr 5, 2022
jeandet added a commit to LaboratoryOfPlasmaPhysics/cppdict that referenced this issue Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants