macOS 10.13.4 and Xcode 9.3 compatibility broken with CUDA Toolkit 9.1

After the last release of Xcode 9.3, the compatibility between Xcode and CUDA Toolkit 9.1 has been broken. After doing a little bit of research, Nvidia simply hasn’t updated nvcc binary executable because it’s currently linked against an older version of libSystem.B.dylib library. For example, when I try to build one of the sample applications, I’m seeing the following error message:

$ make -C 1_Utilities/deviceQuery
/Developer/NVIDIA/CUDA-9.1/bin/nvcc -ccbin clang++ -I../../common/inc  -m64  -Xcompiler -arch -Xcompiler x86_64  -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_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_70,code=compute_70 -o deviceQuery.o -c deviceQuery.cpp
nvcc fatal   : The version ('90100') of the host compiler ('Apple clang') is not supported
make: *** [deviceQuery.o] Error 1

Why I am seeing this error message?

Nvidia nvcc tool is linking against the following libraries:

$ otool -L /Developer/NVIDIA/CUDA-9.1/bin/nvcc
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
	/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 489.0.0)

macOS actually has the following libraries:

otool -L /usr/lib/libSystem.B.dylib
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)

If Nvidia simply linked against /usr/lib/libgcc_s.1.dylib, then this library would have included the correct version of libSystem.B.dylib. For example,

$ otool -L /usr/lib/libgcc_s.1.dylib
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)

In short, nvcc is explicitly linking against /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1238.60.2)
and macOS 10.13.4 includes /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4).

In the future, I would recommend future proofing the software that you build as much as possible for macOS by doing the following:

  • not linking to a specific version of system libraries for the CUDA toolkit
  • not building specific web drivers for a specific macOS build (i.e. 17D47, 17D102, 17D2047, 17D2102, or 17E199)
  • build web drivers and CUDA toolkit versions which support a major version of macOS like 10.11, 10.12, 10.13, and so on
  • adding much better support for searching for Nvidia web drivers on the web site for ALL platforms including macOS
  • make sure that the CUDA toolkit sample code works with every release of the software
  • add a nightly build process for web drivers and CUDA toolkit for ALL platforms

Ideally, it would be a benefit for the macOS and customers in general if Nvidia open sourced Nvidia CUDA toolkit and web driver code. This would allow all operating systems (OS)s including macOS to add it to their respective plaform’s build and deploy pipeline for computer hardware that supports Nvidia GPUs. Finally, I would like to recommend getting ahead of web driver and CUDA toolkit development process so people like myself isn’t waiting for Nvidia to release this critical software.

I can confirm this unfortunate situation- there seems to be no formal channel to report bugs like this?

Hey @nvidia, I would recommend building your software to a release of @apple #macOS like 10.11, 10.12, or 10.13 instead of a specific build of it like 17E199. Otherwise, the next build will break your software. For example, CUDA driver is broken in #macOS 17E202.

Confirmed yet again. Good to know I am not the only one with this problem. I guess we’re dead in the water unless nVidia releases a new nvcc binary or we retrograde Xcode (not really an option in my case)?

Same here, I have the same problem.

@wayne66, @scosol, and @iuribeferrari Nvidia has updated the CUDA driver to support the current version of macOS 10.13 (17E202). For me, I was able to update through System Preferences -> CUDA Preferences. If this isn’t the case for you, one can download here:

However, the CUDA Toolkit 9.1 (i.e. nvcc) hasn’t been updated. Thus, the above error still happens on compile.

Think different and code well,


I am having the same issue: macOS 10.13, XCode 9.3 and failure to compile with the following error:

nvcc fatal : The version (‘90100’) of the host compiler (‘Apple clang’) is not supported

As opposed to the original poster my OSX libSystem.B.dylib is as follows:

$ otool -L /usr/lib/libSystem.B.dylib
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.0.0)

Same issue here, macOS 10.13.4 and Xcode 9.3.

Typical, MacOSX users/developers/researchers are treated as 2nd-class citizens by both NVidia and (!!!) Apple.

Good news. I am back in business building CUDA code with Xcode and the bin utils. Essentially I followed the instructions at

At this point I have two versions of Xcode and the command line tools installed and switch between them between developing MacOS apps and CUDA apps. Here is essentially what I did:

(1) Download the version of Xcode that works with the latest nvcc which is Xcode 2 released last December:

(2) Extract the version of Xcode in the xip file, rename to Xcode_9.2, and move it to the /Applications folder.

(3) Select the older version using xcode-select:
$ sudo xcode-select -s /Applications/Xcode_9.2/Contents/Developer

(4) Install the older version of the command line tools:
$ xcode-select --install

(5) Verity
$ clang --version
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.5.0
Thread model: posix
InstalledDir: /Applications/

Make sure you are using the latest nVidia Web Driver and CUDA tools.

Boom! My CUDA apps now build just fine with nvcc.
When I want to go back to the newer version of Xcode and command line tools, I can do so with steps 3 and 4 above using the latest installed Xcode.

Well said that man! Nvidia support fo Mac OS is pedestrian and pretty amatuerish considering they are leveraging llvm this is rather ironic since Apple funded that. Still the closed source, closed off attitudes of Nvidai w.r.t. to OpenCL – which is what they fell out about with Apple - hence no nvidia gpus in latest apple kit (and probably why they drag their feet with support for OS X these days) tells me who the good guys are. I’m not going to use nvidia h/w or CUDA anymore on any of our scientific compute platforms until they straighten their act out.

This is super annoying. I would have expected that they straighten this out with the CUDA 9.2 release but that one is again only compatible with a legacy Xcode version. I don’t get it…

I really wish they have this conflict fixed soon.
I’ve using different types of system to get this working.

YEEESSSSSSSSS… After 7 month of blod sweet and tears the box is alive…

MacPro with Thunderbolt 2 only, AORUS eGPU with NVIDIA 1070 board.
OSX 10.13.6, the PurgeWrangler solution, csrutil disabled, Latest NVIDIA driver, and latest CUDA 9.2
Dual Xcode with version 9.2 activated… And the HDMI Blind Plugg connected to the eGPU, set at 1920*1080 screen size.

The additional monitor is shown in the About/Displays, the NVIDIA board Is detected and drivers are loaded on the PCI buss…

And the Coda 9.2 samples can be compiled, and… what do you give me… they run…
Just now I run the simpleGL sample, and the screen is rendered on my main screen as it should, and the motion is perfect…

Thank you .