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

Fails to build with the new glibc on Fedora Rawhide #42

Closed
alebastr opened this issue Mar 18, 2021 · 0 comments · Fixed by #43
Closed

Fails to build with the new glibc on Fedora Rawhide #42

alebastr opened this issue Mar 18, 2021 · 0 comments · Fixed by #43

Comments

@alebastr
Copy link
Contributor

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.

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.

1 participant