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

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

Open
jeff-cohere opened this issue Feb 8, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jeff-cohere
Copy link
Contributor

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.

@jeff-cohere jeff-cohere added the bug Something isn't working label Feb 8, 2022
@bartgol
Copy link
Contributor

bartgol commented Feb 8, 2022

I was actually thinking we should move to a submodule version of catch2, rather than copy-paste their all-in-one header.

@jeff-cohere jeff-cohere self-assigned this Feb 11, 2022
@jeff-cohere
Copy link
Contributor Author

Hopefully this is fixed by #185. I'll have Asher check this when we've got EKAT updated within Haero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants