WayfireWM / wf-config

A library for managing configuration files, written for wayfire

Home Page:https://wayfire.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fails to build with the new glibc on Fedora Rawhide

alebastr opened this issue · comments

Recent changes in glibc1 made SIGSTKSZ non-constant and since then bundled doctest.h fails to compile with

[9/31] g++ -Itest/types_test.p -Itest -I../test -Iinclude -I../include -I/usr/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -std=c++17 -Wno-deprecated-declarations -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -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 -MD -MQ test/types_test.p/types_test.cpp.o -MF test/types_test.p/types_test.cpp.o.d -o test/types_test.p/types_test.cpp.o -c ../test/types_test.cpp
FAILED: test/types_test.p/types_test.cpp.o 
g++ -Itest/types_test.p -Itest -I../test -Iinclude -I../include -I/usr/include -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wnon-virtual-dtor -Wextra -std=c++17 -Wno-deprecated-declarations -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -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 -MD -MQ test/types_test.p/types_test.cpp.o -MF test/types_test.p/types_test.cpp.o.d -o test/types_test.p/types_test.cpp.o -c ../test/types_test.cpp
In file included from /usr/include/signal.h:315,
                 from /usr/include/c++/11/csignal:42,
                 from ../test/doctest.h:3241,
                 from ../test/types_test.cpp:2:
../test/doctest.h:4403:45: error: size of array ‘altStackMem’ is not an integral constant-expression
 4403 |         static char             altStackMem[SIGSTKSZ];
      |                                             ^~~~~~~~
../test/doctest.h:4453:48: error: size of array ‘altStackMem’ is not an integral constant-expression
 4453 |     char    FatalConditionHandler::altStackMem[SIGSTKSZ] = {};
      |                                                ^~~~~~~~

The issue is tracked in doctest/doctest#473, but there's no fix accepted by the doctest upstream at the moment.

I can suggest several options for dealing with that:

  1. Make tests optional feature and skip them in downstream packages
  2. Make tests use system doctest package. We already have a workaround applied to Fedora package and wf-config builds just fine using external doctest.
  3. Apply the WIP solution with substituting SIGSTKSZ to an integer constant in the bundled doctest.h

wf-touch has the same issue.