nvcc & clang 7 (no typo here)

Okay, El Capitan (OS X 10.11) reports that its clang version is 7.0.
I’ve talked to Apple asking what does this mean. At least to report on what llvm commit it is based on. But, they are not going to do that and from now on clang on OS X will report the version of Xcode (which is also 7).

The problem I have is that nvcc checks what version the host compiler reports and does not compiles if it can’t identify it. I understand that this is done to prevent potential frustration when trying to use incompatible compiler version.
But is there a way to make nvcc skip that compiler version check ? I am pretty sure it will work just fine with clang 7 as it did with three point whatever.
So I need nvcc --i-claim-this-clang-is-3-X-and-not-7-0 or something …

The check is there for a reason. The CUDA toolkit is qualified against certain versions of the OS. Currently, CUDA 7.5 declares support for OSX 10.9, and 10.10. 10.11 is not on the list:

[url]http://docs.nvidia.com/cuda/cuda-installation-guide-mac-os-x/index.html#abstract[/url]

(XCODE 7 is also not officially supported)

What actual error are you getting?

Thank you for your answer.
I know that the version is not supported, I was wondering if there is a way to skip the check (knowing that the result might be undefined after that).
The error is when invoking nvcc, “nvcc fatal: The version (‘70000’) of the clang compiler is not supported”.

I could not find anything in /usr/local/cuda/include - not in host_config.h nor host_defines.h.
Fount that this error code is compiled inside nvcc.

->>Edit: Sorry looks like I repeated your previous posts :( - just want to be in thread if someone finds any workaround …
So I think there are 2 options:

  • if is there any switch inside nvcc to override/skip that check …
  • is there possibility to fool nvcc and pretend that clang is in another version
    In reality (probably) I will finish with installing second (old ) version of xcode, but I really don’t like that mess.

Inserting a shim between nvcc and the clang compiler might work. That shim could be an intermediate binary (or shell script) that forwards all command line options to clang, but fakes a different version number when asked to by nvcc.

I am also wondering about this. I have upgraded to 7.5 today (but it actually it says CUDA-7.0), and now
I had to carry on using CUDA-6.0 (which seems to work with the latest clang). Surely an option for people to
be up-to-date with their dev tools needs to be given.

The released version of CUDA 7.5 works fine with CLANG 7.0. This was an issue with the release candidate only and was fixed for the final release. NVCC should report itself as being 7.5, so if it is reporting 7.0 then something is wrong with the installation.

~ maddyscientist$ /usr/local/cuda/bin/nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_15:14:46_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17

~ maddyscientist$ clang --version
Apple LLVM version 7.0.0 (clang-700.0.72)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

Actually I got the same problem, I have Mac OS 10.10, XCode 7, I downloaded the Network Installer from CUDA Toolkit 11.7 Update 1 Downloads | NVIDIA Developer and this is what I get:

<...>$ make -C 0_Simple/vectorAdd
/Developer/NVIDIA/CUDA-7.5/bin/nvcc -ccbin clang++ -I../../common/inc  -m64  -Xcompiler -arch -Xcompiler x86_64  -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_37,code=sm_37 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_52,code=sm_52 -gencode arch=compute_52,code=compute_52 -o vectorAdd.o -c vectorAdd.cu
nvcc fatal   : The version ('70000') of the host compiler ('Apple clang') is not supported
make: *** [vectorAdd.o] Error 1

<...>$ /usr/local/cuda/bin/nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Tue_Aug_11_15:14:46_CDT_2015
Cuda compilation tools, release 7.5, V7.5.17

<...>$ clang --version
Apple LLVM version 7.0.0 (clang-700.0.72)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

Same problem for me with CUDA 7.5 and CLANG 7.0, exactly same data as alrigazzi.

I will try as Roetfuss working with CUDA 6.

Just wanted too add myself as a datapoint along with alrigazzi and Wocka. CUDA 7.5 isn’t working for me with clang 7 either. Same configuration alrigazzi also.

Same issue (brand new install of CUDA-7.5 and XCode 7 (which supplies clang 7.0.0) today. Had to manually downgrade XCode to 6.2, which, as pointed out above, is the highest supported version at the moment.

Same issue with the new Xcode 7 and CUDA-7.5. My solution is using a side by side installation of Xcode 7 and Xcode 6.4.
I restored the previous Xcode 6.4 and placed it in Applications with different name. After selecting the Command Line Tools Xcode 6.4 (6E35b) in Xcode 7, everything works fine.
You can check the selection of the correct tools by running ‘xcode-select -p’ from terminal. This should give something like ‘/Applications/[Xcode 6.4 application name]/Contents/Developer’.

If you use CMake it needs complete reconfigure of your project.

I salvaged the old Xcode from TimeMachine, then ‘xcode-select --switch’ worked fine.(only when using cuda)
Thanks for the advice.

Solution of using clang 7.0.0

Nvidia released the new version of CUDA for OS X.(Version 10.11 was added on the download form.)
Xcode 7 seems not officially be supported yet, but a compilation process has passed.

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Thu_Sep_24_00:26:39_CDT_2015
Cuda compilation tools, release 7.5, V7.5.19

I confirm that the new CUDA package for OSX 10.11 works perfectly on a freshly upgraded (to OSX 10.11 and XCode 7 .01) system.

OSX was updated to 10.11.4. Also Xcode has been upgraded, Clang version was changed (7.3.0) Problem is continuing.
I do not understand why it does NVCC version control.

The issue is here on OSX 10.11.4, XCode 7.3 :(
Is there some ways to solve this? (excepting downgrading of XCode)

OSX 10.11.3, Xcode 7.3, nvcc 7.5.19 same problem as you guys:

nvcc fatal   : The version ('70300') of the host compiler ('Apple clang') is not supported

The version (‘70300’) of the host compiler (‘Apple clang’) is not supported <— Getting this. Any solution?