MacOS Sierra (10.12) Build Fail via luarocks #522

eek opened this Issue Sep 30, 2016 · 6 comments


None yet

7 participants

eek commented Sep 30, 2016

I have seen a lot of comments with Build fail on previous version of MacOS / XCode, unfortunately, the easiest answer that most proposed with the xcode-select --install doesn't work.

The problem is cutorch installation fails with:

Error: Build error: Failed building.

because of:

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

Any ideas on fixes? :D

Using: CUDA 8.0, XCode 8.0, Apple LLVM version 8.0.0 (clang-800.0.38)


My OS X is 10.11.6, got the same error:

nvcc fatal   : The version ('80000') of the host compiler ('Applen vcclca nfga't)a li s   n:o tT hseu pvpeorrstieodn
 ('80000') of the host compiler ('Apple clang') is not supported
nvcc fatal   : The version ('80000') of the host compiler ('Apple clang') is not supported
CMake Error at (message):
  Error generating
  /tmp/luarocks_cutorch-scm-1-3139/cutorch/build/lib/THC/CMakeFilCeMsa/kTeH CE.rdriorr/ /a.t/ TTHHCC__ggeenneerraatteedd__TTHHCCBTleanss.ocruC.oop
.cmake:207 (message):
  Error generating
subzerofun commented Oct 9, 2016 edited

Same for me. Tried the switch to the 7.2 Command Line Tools - but unfortunately the nvcc still uses the new one - '80000'...

Should i manually delete the new clang? Did you find any solutions?

Had a working torch install, but upgrading to Sierra must have deleted something because it didn´t work with the new neural style project of jcjohnson:

Update: Seems i have found the solution!

As someone on stackoverflow pointed out (

you need to install the old Command Line Tools from XCode 7.2:
Login in to your Apple Dev account, then download this

Next execute this command in the terminal:
sudo xcode-select --switch /Library/Developer/CommandLineTools

Then check the version with
clang --version

Should be (of course) 7.2

Now the missing part:

The problem was in the install folder

there were still temp files from the first make attempt with the new clang.

So i did reload my bash profile
source ~/.bash_profile

cd ~/torch

make clean


And then again

Now nvcc was using the old clang and everything compiled fine!

Tell me if that fixed it for you too!

jake17007 commented Nov 12, 2016 edited

I got the same error as the OP:
nvcc fatal : The version ('80000') of the host compiler ('Apple clang') is not supported

Your solution, @subzerofun , worked perfectly for me.

Thank you!

macOS Sierra
Version 10.12.1
MacBook Pro (Retina, 15-inch, Mid 2014)
Graphics: Intel Iris Pro 1536 and NVIDIA GeForce GT 750M


How if I want to switch back to clang 8?

Thanks a lot

ivar commented Nov 27, 2016

@vinhqdang the most common way to switch back to clang 8 is sudo xcode-select --switch /Applications/ .. more info with xcode-select -h

hfarazi commented Feb 4, 2017 edited

I had the same problem but instead of downgrading my clang, I upgraded my Cuda to 8 and now it compiles fine.
OS: 10.12.3

clang --version
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.4.0
Thread model: posix
InstalledDir: /Applications/

@malreddysid malreddysid referenced this issue in torch/distro Feb 15, 2017

Install error on OS X El Capitan #142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment