Skip to content

Catch2 fails to compile on Fedora Rawhide (more recent version needed) #183

@jeff-cohere

Description

@jeff-cohere

Describe the bug
One of the EAGLES/HAERO developers encountered an issue described here. This issue has been fixed downstream, so it would be nice to get a more recent version of the Catch2 header into EKAT.

To Reproduce
Steps to reproduce the behavior:

  1. Log into a system running Fedora Rawhide (or another system with a particularly picky constexpr-obsessed C++ compiler?)
  2. Try to build EKAT
  3. See error

Here's what it looks like for us:

In file included from /usr/include/signal.h:328,
                 from /home/asher/workspace/haero/ext/ekat/extern/catch2/include/catch2/catch.hpp:7712,
                 from /home/asher/workspace/haero/ext/ekat/src/ekat/util/ekat_catch_main.cpp:3:
/home/asher/workspace/haero/ext/ekat/extern/catch2/include/catch2/catch.hpp:10453:58: error: call to non-‘constexpr’ function ‘long int sysconf(int)’
10453 |     static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ;
      |                                                          ^~~~~~~~~~~
In file included from /usr/include/bits/sigstksz.h:24,
                 from /usr/include/signal.h:328,
                 from /home/asher/workspace/haero/ext/ekat/extern/catch2/include/catch2/catch.hpp:7712,
                 from /home/asher/workspace/haero/ext/ekat/src/ekat/util/ekat_catch_main.cpp:3:
/usr/include/unistd.h:640:17: note: ‘long int sysconf(int)’ declared here
  640 | extern long int sysconf (int __name) __THROW;
      |                 ^~~~~~~

Expected behavior

No compile errors, please!

Desktop (please complete the following information):

$ uname -a
Linux fedora 5.14.10-300.fc35.x86_64 #1 SMP Thu Oct 7 20:48:44 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions