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 does not compile with clang-8 on macOS #1588

Closed
torfinnberset opened this issue Apr 4, 2019 · 0 comments
Closed

Catch2 does not compile with clang-8 on macOS #1588

torfinnberset opened this issue Apr 4, 2019 · 0 comments

Comments

@torfinnberset
Copy link
Contributor

torfinnberset commented Apr 4, 2019

Describe the bug
Catch2 does not compile with LLVM clang-8 on macOS. I get the following error message:

In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/sysctl.h:83,
                 from /Users/torfinn/.conan/data/Catch2/2.7.0/catchorg/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/catch2/catch.hpp:8405,
                 from /Users/torfinn/.conan/data/<...>/stable/package/5926da2a8f608c60dbd4ba8eb9c5b650bd6fbdcb/src/main.cpp:18:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/ucred.h:94:2: error: '_Atomic' does not name a type

Expected behavior
The program should compile with clang on macOS.

Reproduction steps
On macOS, install LLVM with brew install llvm.
Compile a main file with clang:

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>

Platform information:

  • OS: macOS 10.14.3
  • Compiler+version: Clang v8.0.0
  • Catch version: v2.7.0
  • XCode 10.2

Additional information
It seems clang doesn't like the macOS system header sys/sysctl.h. The program compiles just fine with AppleClang 10.0.1

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

No branches or pull requests

1 participant