Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building on macOS with CUDA failed #2881

Closed
ctongfei opened this issue Sep 27, 2017 · 3 comments
Closed

Building on macOS with CUDA failed #2881

ctongfei opened this issue Sep 27, 2017 · 3 comments

Comments

@ctongfei
Copy link

Environment: macOS 10.13 High Sierra, CUDA 9.0.197, cuDNN 7, Python 3.6.1 (Anaconda 5.0.0), AppleClang 8.0.0 (installed through Apple XCode CLT).

Invocation script: CC=clang CXX=clang++ NO_DISTRIBUTED=1 python setup.py install

I got the following error:

...
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/tongfei/anaconda/include -arch x86_64 -I/Users/tongfei/anaconda/include -arch x86_64 -I/Users/tongfei/my/proj/py/pytorch -I/Users/tongfei/my/proj/py/pytorch/torch/csrc -I/Users/tongfei/my/proj/py/pytorch/torch/lib/pybind11/include -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/TH -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/THPP -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/THNN -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/ATen -I/Users/tongfei/anaconda/lib/python3.6/site-packages/numpy/core/include -I/usr/local/cuda/include -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/THCUNN -I/usr/local/cuda/include -I/Users/tongfei/anaconda/include/python3.6m -c /Users/tongfei/my/proj/py/pytorch/torch/csrc/generated/cuda_TensorLong.cpp -o build/temp.macosx-10.7-x86_64-3.6/Users/tongfei/my/proj/py/pytorch/torch/csrc/generated/cuda_TensorLong.o -D_THP_CORE -std=c++11 -Wno-write-strings -fno-strict-aliasing -DWITH_NUMPY -DWITH_CUDA -DCUDA_LIB_PATH=/usr/local/cuda/lib -DWITH_CUDNN
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/tongfei/anaconda/include -arch x86_64 -I/Users/tongfei/anaconda/include -arch x86_64 -I/Users/tongfei/my/proj/py/pytorch -I/Users/tongfei/my/proj/py/pytorch/torch/csrc -I/Users/tongfei/my/proj/py/pytorch/torch/lib/pybind11/include -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/TH -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/THPP -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/THNN -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/ATen -I/Users/tongfei/anaconda/lib/python3.6/site-packages/numpy/core/include -I/usr/local/cuda/include -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/THCUNN -I/usr/local/cuda/include -I/Users/tongfei/anaconda/include/python3.6m -c /Users/tongfei/my/proj/py/pytorch/torch/csrc/generated/cuda_TensorFloat.cpp -o build/temp.macosx-10.7-x86_64-3.6/Users/tongfei/my/proj/py/pytorch/torch/csrc/generated/cuda_TensorFloat.o -D_THP_CORE -std=c++11 -Wno-write-strings -fno-strict-aliasing -DWITH_NUMPY -DWITH_CUDA -DCUDA_LIB_PATH=/usr/local/cuda/lib -DWITH_CUDNN
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/tongfei/anaconda/include -arch x86_64 -I/Users/tongfei/anaconda/include -arch x86_64 -I/Users/tongfei/my/proj/py/pytorch -I/Users/tongfei/my/proj/py/pytorch/torch/csrc -I/Users/tongfei/my/proj/py/pytorch/torch/lib/pybind11/include -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/TH -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/THPP -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/THNN -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/ATen -I/Users/tongfei/anaconda/lib/python3.6/site-packages/numpy/core/include -I/usr/local/cuda/include -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/THCUNN -I/usr/local/cuda/include -I/Users/tongfei/anaconda/include/python3.6m -c /Users/tongfei/my/proj/py/pytorch/torch/csrc/generated/TensorHalf.cpp -o build/temp.macosx-10.7-x86_64-3.6/Users/tongfei/my/proj/py/pytorch/torch/csrc/generated/TensorHalf.o -D_THP_CORE -std=c++11 -Wno-write-strings -fno-strict-aliasing -DWITH_NUMPY -DWITH_CUDA -DCUDA_LIB_PATH=/usr/local/cuda/lib -DWITH_CUDNN
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/tongfei/anaconda/include -arch x86_64 -I/Users/tongfei/anaconda/include -arch x86_64 -I/Users/tongfei/my/proj/py/pytorch -I/Users/tongfei/my/proj/py/pytorch/torch/csrc -I/Users/tongfei/my/proj/py/pytorch/torch/lib/pybind11/include -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/TH -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/THPP -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/THNN -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/ATen -I/Users/tongfei/anaconda/lib/python3.6/site-packages/numpy/core/include -I/usr/local/cuda/include -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/THCUNN -I/usr/local/cuda/include -I/Users/tongfei/anaconda/include/python3.6m -c /Users/tongfei/my/proj/py/pytorch/torch/csrc/generated/cuda_TensorByte.cpp -o build/temp.macosx-10.7-x86_64-3.6/Users/tongfei/my/proj/py/pytorch/torch/csrc/generated/cuda_TensorByte.o -D_THP_CORE -std=c++11 -Wno-write-strings -fno-strict-aliasing -DWITH_NUMPY -DWITH_CUDA -DCUDA_LIB_PATH=/usr/local/cuda/lib -DWITH_CUDNN
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/tongfei/anaconda/include -arch x86_64 -I/Users/tongfei/anaconda/include -arch x86_64 -I/Users/tongfei/my/proj/py/pytorch -I/Users/tongfei/my/proj/py/pytorch/torch/csrc -I/Users/tongfei/my/proj/py/pytorch/torch/lib/pybind11/include -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/TH -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/THPP -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/THNN -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/ATen -I/Users/tongfei/anaconda/lib/python3.6/site-packages/numpy/core/include -I/usr/local/cuda/include -I/Users/tongfei/my/proj/py/pytorch/torch/lib/tmp_install/include/THCUNN -I/usr/local/cuda/include -I/Users/tongfei/anaconda/include/python3.6m -c /Users/tongfei/my/proj/py/pytorch/torch/csrc/generated/cuda_TensorInt.cpp -o build/temp.macosx-10.7-x86_64-3.6/Users/tongfei/my/proj/py/pytorch/torch/csrc/generated/cuda_TensorInt.o -D_THP_CORE -std=c++11 -Wno-write-strings -fno-strict-aliasing -DWITH_NUMPY -DWITH_CUDA -DCUDA_LIB_PATH=/usr/local/cuda/lib -DWITH_CUDNN
error: command 'clang' failed with exit status 1
@ghost
Copy link

ghost commented Sep 29, 2017

You probably need to downgrade Xcode command line
I followed this video

@soumith soumith added this to binary packaging / builds in Issue Categories Oct 5, 2017
@zhanghang1989
Copy link

zhanghang1989 commented Oct 10, 2017

Got same error. any updates? I did downgrade the command line as in #3047

@ezyang
Copy link
Contributor

ezyang commented Feb 5, 2018

@ctongfei You're going to have to give us a longer snippet of the build failure, your posted log doesn't actually contain the command that failed. I'm going to close this because there is not really anything we can do to debug this, but feel free to reopen if you have a longer log.

@ezyang ezyang closed this as completed Feb 5, 2018
@soumith soumith removed this from binary packaging / builds in Issue Categories Feb 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants