build pytorch_scatter in MacOS 10.13
See original GitHub issueI have used MACOSX_DEPLOYMENT_TARGET=10.13.6 CC=clang CXX=clang++ python setup.py install
to install pytorch_scatter, but failed, here is the information of my system and log. Please help me to solve this problem, I want to use it to implement GNN in my paper.
Ps: I also used gcc, but still falied.
System
- OS: MacOS 10.13.6
- PyTorch version: 1.1.0
- How you installed PyTorch (conda, pip, source): source
- Python version: Anaconda python 3.6.4
- CUDA/cuDNN version: CUDA 10.1
- GPU models and configuration: GeForce GTX 1080
- GCC version (if compiling from source): Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Log
MACOSX_DEPLOYMENT_TARGET=10.13.6 CC=clang CXX=clang++ python setup.py install running install running bdist_egg running egg_info writing torch_scatter.egg-info/PKG-INFO writing dependency_links to torch_scatter.egg-info/dependency_links.txt writing top-level names to torch_scatter.egg-info/top_level.txt reading manifest file ‘torch_scatter.egg-info/SOURCES.txt’ reading manifest template ‘MANIFEST.in’ writing manifest file ‘torch_scatter.egg-info/SOURCES.txt’ installing library code to build/bdist.macosx-10.7-x86_64/egg running install_lib running build_py running build_ext building ‘torch_scatter.scatter_cuda’ extension clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/kiwee/anaconda3/include -arch x86_64 -I/Users/kiwee/anaconda3/include -arch x86_64 -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/TH -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/Users/kiwee/anaconda3/include/python3.6m -c cuda/scatter.cpp -o build/temp.macosx-10.7-x86_64-3.6/cuda/scatter.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=scatter_cuda -std=c++11 /usr/local/cuda/bin/nvcc -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/TH -I/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/Users/kiwee/anaconda3/include/python3.6m -c cuda/scatter_kernel.cu -o build/temp.macosx-10.7-x86_64-3.6/cuda/scatter_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --compiler-options ‘-fPIC’ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=scatter_cuda -std=c++11 /Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/util/UniqueVoidPtr.h(69): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/Allocator.h(96): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(175): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(185): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(194): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(199): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(206): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(221): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(228): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(235): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/util/UniqueVoidPtr.h(69): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/Allocator.h(96): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(175): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(185): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(194): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(199): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(206): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(221): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(228): warning: attribute namespace “clang” is unrecognized
/Users/kiwee/anaconda3/lib/python3.6/site-packages/torch/include/c10/core/TensorOptions.h(235): warning: attribute namespace “clang” is unrecognized
clang++ -bundle -undefined dynamic_lookup -L/Users/kiwee/anaconda3/lib -arch x86_64 -L/Users/kiwee/anaconda3/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.7-x86_64-3.6/cuda/scatter.o build/temp.macosx-10.7-x86_64-3.6/cuda/scatter_kernel.o -L/usr/local/cuda/lib64 -lcudart -o build/lib.macosx-10.7-x86_64-3.6/torch_scatter/scatter_cuda.cpython-36m-darwin.so ld: warning: directory not found for option ‘-L/usr/local/cuda/lib64’ ld: library not found for -lcudart clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command ‘clang++’ failed with exit status 1
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (6 by maintainers)
As far as I know,
MACOSX_DEPLOYMENT_TARGET
should at least be set to10.9
. There should be no differences.@rusty1s Wow, it works!!! Thanks for your help and patience. I just use
sudo ln -s /usr/local/cuda/lib /usr/local/cuda/lib64
, and install all packages with prefixMACOSX_DEPLOYMENT_TARGET=10.13 CC=clang CXX=clang++
.