arrayfire: NVCC does not support Apple Clang version 8.x
Error message: nvcc fatal : The version ('80000') of the host compiler ('Apple clang') is not supported
Steps to fix:
- Log in to https://developer.apple.com/downloads/
- Download Xcode CLT (Command Line Tools) 7.3
- Install CLT
- Run
sudo xcode-select --switch /Library/Developer/CommandLineTools
- Verify that clang has been downgraded via
clang --version
Source: http://stackoverflow.com/a/36590330/701646
Edit: Update to 7.3 and fail at 8.0
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 61
- Comments: 37 (14 by maintainers)
@joseph-zhong, it looks like you’re using Xcode 8.3, which CUDA (v8.0.61) does not yet support. 😦
Downgrading to CLT 8.2 should work.
For reference:
sudo xcode-select --switch /Library/Developer/CommandLineTools
clang --version
This issue does not affect CUDA >= 8.0
I have CUDA 8.0.46, OS X 10.12 and Xcode 8.1 but still have the same issue.
First of all, CUDA 8.0 isn’t widely available yet as it hasn’t been officially released. Second, even CUDA 8 doesn’t work with the current version of the Apple LLVM (version 8.0.0). It produces the following error message:
nvcc fatal : The version ('80000') of the host compiler ('Apple clang') is not supported
Great news - CUDA 8.0.55 now supports Xcode 8!
Those of you who downgraded to CLT 7.3 need to upgrade to CLT 8.x, otherwise building the CUDA backend will fail due to a missing
<string.h>
.To switch Xcode CLT back to 8.1 run this:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
Thanks a lot, @mlloreda I have the same problem when I install tensorflow GPU version
I did your method step by step and it worked !
After downgrading XCode to 8.2, I found that I had to clear out the
build
directory and start the build from scratch.To anyone stuck on this. Even though you might change the xcode version with xcode-select, and your clang version might say it’s an older version, for some reason the compiler that ends up being used is still the latest version of XCode. Renaming the latest version of xcode.app to xcode_<new_version>.app after installing the older version to xcode_<old_version>.app fixed this for me.
Other things to try: If you see this message somewhere in the failed compile
Automatic GPU detection failed. Building for common architectures.
re-install CUDA toolkit AFTER changing XCode versions and restarting your computer:@derwentx thanks a lot! Your tip to rename the newer version helped me to solve this issue here. (and I ran straight into the next problem… (https://github.com/pytorch/pytorch/issues/2682)
I made it with “NVIDIA CUDA Installation Guide for Mac OS X 1.1. System Requirements” in Cuda Toolkit Documantation.
My operation is MacOS 10.12.5 and I did downgrade X_Code to X_Code 8.2
sudo xcode-select -s /Applications/Xcode_8.2.app/Contents/Developer
/usr/bin/cc --version
, it should be Apple LLVM version 8.0.0@mlloreda I logged into the the Apple Developer page but your direct link to XCT 8.2 redirects me to https://developer.apple.com/unauthorized/. Instead people should visit https://developer.apple.com/download/more/ and search the list there for XCT 8.2.