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

Building tests fails with recent glibc #35

Closed
krop opened this issue Jul 28, 2023 · 0 comments · Fixed by #36
Closed

Building tests fails with recent glibc #35

krop opened this issue Jul 28, 2023 · 0 comments · Fixed by #36

Comments

@krop
Copy link

krop commented Jul 28, 2023

with zug 0.1.0:

[  1%] Building CXX object test/__inline_var_tests/CMakeFiles/inline_var_tests.dir/main.cpp.o
In file included from /data/misc/zug-0.1.0/test/__inline_var_tests/main.cpp:2:
/data/misc/zug-0.1.0/tools/include/catch2/catch.hpp:10376:34: error: constexpr variable 'sigStackSize' must be initialized by a constant expression
    constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
                                 ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/data/misc/zug-0.1.0/tools/include/catch2/catch.hpp:10376:58: note: non-constexpr function 'sysconf' cannot be used in a constant expression
    constexpr static std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
                                                         ^
/usr/include/bits/sigstksz.h:32:22: note: expanded from macro 'MINSIGSTKSZ'
# define MINSIGSTKSZ SIGSTKSZ
                     ^
/usr/include/bits/sigstksz.h:28:19: note: expanded from macro 'SIGSTKSZ'
# define SIGSTKSZ sysconf (_SC_SIGSTKSZ)
                  ^
/usr/include/unistd.h:640:17: note: declared here
extern long int sysconf (int __name) __THROW;
                ^
In file included from /data/misc/zug-0.1.0/test/__inline_var_tests/main.cpp:2:
/data/misc/zug-0.1.0/tools/include/catch2/catch.hpp:10435:33: error: variable length array declaration not allowed at file scope
    char FatalConditionHandler::altStackMem[sigStackSize] = {};
                                ^           ~~~~~~~~~~~~
2 errors generated

Also see: catchorg/Catch2#2421

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

Successfully merging a pull request may close this issue.

2 participants