MacOS Sierra (10.12) Build Fail via luarocks #522

Open
eek opened this Issue Sep 30, 2016 · 6 comments

Projects

None yet

7 participants

@eek
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)

@dongyuwei

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 THC_generated_THCBlas.cu.o.cmake:207 (message):
  Error generating
  /tmp/luarocks_cutorch-scm-1-3139/cutorch/build/lib/THC/CMakeFilCeMsa/kTeH CE.rdriorr/ /a.t/ TTHHCC__ggeenneerraatteedd__TTHHCCBTleanss.ocruC.oop
y
.cu.o
.cmake:207 (message):
  Error generating
  /tmp/luarocks_cutorch-scm-1-3139/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCTensorCopy.cu.o
@subzerofun
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: https://github.com/jcjohnson/fast-neural-style


Update: Seems i have found the solution!

As someone on stackoverflow pointed out (http://stackoverflow.com/questions/36250949/revert-apple-clang-version-for-nvcc)

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
/Users/YOU/torch

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

Then
make clean

./clean.sh

And then again
./install.sh


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

Tell me if that fixed it for you too!

@jake17007
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

@vinhqdang

How if I want to switch back to clang 8?

Thanks a lot

@ivar
ivar commented Nov 27, 2016

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

@hfarazi
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/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

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

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