Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
MacOS Sierra (10.12) Build Fail via luarocks #522
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
The problem is cutorch installation fails with:
Any ideas on fixes? :D
My OS X is 10.11.6, got the same error:
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:
Next execute this command in the terminal:
Then check the version with
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
And then again
Now nvcc was using the old clang and everything compiled fine!
Tell me if that fixed it for you too!
I got the same error as the OP:
Your solution, @subzerofun , worked perfectly for me.
I had the same problem but instead of downgrading my clang, I upgraded my Cuda to 8 and now it compiles fine.
I did as @subzerofun said, yet I'm still encountering my problem. I'm assuming it has to do with how when I checked
Error: Build error: Failed building."
@Wrongful Since i've posted that little "fix" torch has already been updated and should work with CUDA 8 and the newest clang version. So please ignore my message from above!
I would suggest that you upgrade to CUDA 8:
Warning: If your current CUDA version is 7.x and you have forked/installed github repos that rely on CUDA 7.x please check (project page/documentation) if they also work with CUDA 8.
Also upgrade XCode to the newest version. If you are already are up-to-date (as of now Xcode 8.2.1 – ignoring the beta version), download the Command Line Tools for your macOS/XCode version:
If you don't have an Apple dev account you need to create one to download files from the links above.
Install the command line tools and check in the Terminal if they are installed correctly:
Output should be:
If you get a different output, switch manually to the new version:
When everything is OK with the command line tools and you have finished the CUDA 8 installation, switch back to your torch folder (in Terminal of course) and clean everything, then try again:
Hope that helps!
@aaronn were you able to get this running? I'm getting the same issue
partial output from end of building torch-distro
okay, I have downgraded to CLT 8.2 and but im still getting the error when trying to install torch. running
Here is the end of my build output
okay, I took a peek at the file that was generating the error and it said
Since it had something to do with cuda, I just uninstalled cuda from my mac and the install completed successfully.
Thank you for your info @aaronn, it was helpful to me to figure this out.
@tylerlindell Don't you need CUDA support for torch? Now you can only run torch in CPU mode - which in most cases is way too slow for most popular ML projects involving ConvNets, GANs etc.
If you have an Nvidia card i would suggest that you try to fix your CUDA install to benefit from the processing power of your GPU!
this was the error :
This was referenced
May 14, 2017
I have Sierra 10.12.4 and Xcode 8.3.2 on a machine with Core 2 Duo CPU ( SSSE4.1 only - no SSSE4.2, no AVX)
output of clang --version is
I am installing Torch for the first time before installing Cuda
The fix is mentioned in issue #32 by @yongduek - there is a bad edge case that means this CPU fails to include the file that defines the symbol. Just add the line he mentions and you will probably compile - I did.
There are also multiple other issues which are relevant to people installing this software on a clean copy of macOS
1/ if ~/.bashrc or ~/.profile don't exist (they won't on a clean macOS), then the script does not warn or prompt to create - it silently fails and subsequent steps in the docs will fail. Just
and it will prompt you at the end of the script
2/ There are multiple configuration errors regarding a missing Qt , e.g.
This can be verified by separately trying
post-install - this fails
Trying to install the deprecated Qt4 with brew on Sierra gives
to make qmake available, which reveals that
(and the Torch install script) has installed Qt 5.8.0 by default on Sierra- which now produces
as suggested here [https://github.com/cartr/homebrew-qt4] for Sierra to get Qt 4.8.7_1
qmake is linked to
After installing Cuda 8.0.61 and
Any idea how far I have to go back with the Command Line Tools to get a version that is compatible with the latest nvcc ?
Hope you solve the problem and share the knowledge.
I have had the same problem several months ago, and turned off cuda support. Actually, heavy learning is done in a new linux machine with 4 nvidia titan X, through remote login from my mac.