lewissbaker / cppcoro

A library of C++ coroutine abstractions for the coroutines TS
MIT License
3.36k stars 462 forks source link

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

Open gnaggnoyil opened 1 year ago

gnaggnoyil commented 1 year ago

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.