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

Doctest included in the project is no longer compatible with newer glibc #213

Open
gnaggnoyil opened this issue Sep 13, 2022 · 0 comments
Open

Comments

@gnaggnoyil
Copy link

Starting from glibc 2.34 the value SIGSTKSZ turned from a compile-time constant to a run-time value, which is incompatible with the current doctest.h this project is using. Thus, on platforms that use newer glibc, running cake with tests enabled will fail during build time.

On my Archlinux system, I tried following the build instructions described in README.md, and the command cake gave me the following error:

In file included from test/main.cpp:7:
test/doctest/doctest.h:4518:28: error: variable length array declaration not allowed at file scope
                        static char             altStackMem[SIGSTKSZ];
                                                ^           ~~~~~~~~
test/doctest/doctest.h:4568:34: error: variable length array declaration not allowed at file scope
                char    FatalConditionHandler::altStackMem[SIGSTKSZ] = {};

FYI, as of today(2022-09-13), glibc version on Archlinux is 2.36 and clang version is 14.0.6.

The doctest upstream has an issue discussing about the incompatibility, and it seems newer releases of doctest had already fixed it.

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

1 participant