Skip to content

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

@gnaggnoyil

Description

@gnaggnoyil

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions