E3SM-Project / E3SM-Project/EKAT

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

Open
#183 2 comments 0 reactions 1 assignee Claimed by @jeff-cohere View on GitHub
bug
Dominant language
C++
Stars
22
Forks
12
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
One of the EAGLES/HAERO developers encountered an issue described [here](https://github.com/catchorg/Catch2/issues/2178). 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.