microsoft / O-CNN

O-CNN: Octree-based Convolutional Neural Networks for 3D Shape Analysis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cmake installation error

harris56 opened this issue · comments

Hi, I followed the installation instruction and try to install octree with pytorch. Here's the error I occurred:

(octree) harris_huang@instance-1:~/O-CNN/octree$ cmake . && cmake --build . --config Release
-- octree: USE_CUDA
-- octree: CMAKE_CUDA_STANDARD=11
-- octree: _GLIBCXX_USE_CXX11_ABI=0
-- octree: USE_MINIBALL
-- octree: KEY64
CMake Deprecation Warning at external/octree-ext/googletest/CMakeLists.txt:4 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at external/octree-ext/googletest/googlemock/CMakeLists.txt:45 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at external/octree-ext/googletest/googletest/CMakeLists.txt:56 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- Configuring done
CMake Warning (dev) in CMakeLists.txt:
Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104"
for policy details. Use the cmake_policy command to set the policy and
suppress this warning.

CUDA_ARCHITECTURES is empty for target "octree_lib".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/harris_huang/O-CNN/octree
Consolidate compiler generated dependencies of target rply
[ 2%] Built target rply
Consolidate compiler generated dependencies of target octree_lib
[ 30%] Built target octree_lib
Consolidate compiler generated dependencies of target adaptive_octree
[ 32%] Built target adaptive_octree
Consolidate compiler generated dependencies of target bbox
[ 34%] Built target bbox
Consolidate compiler generated dependencies of target octree
[ 36%] Linking CXX executable octree
/usr/bin/ld: cannot open output file octree: Is a directory
collect2: error: ld returned 1 exit status
CMakeFiles/octree.dir/build.make:97: recipe for target 'octree' failed
make[2]: *** [octree] Error 1
CMakeFiles/Makefile2:292: recipe for target 'CMakeFiles/octree.dir/all' failed
make[1]: *** [CMakeFiles/octree.dir/all] Error 2
Makefile:135: recipe for target 'all' failed
make: *** [all] Error 2

After I installed the pytorch relevant packages and built O-CNN under PyTorch I also occured:

(octree) harris_huang@instance-1:~/O-CNN/pytorch$ python setup.py install --build_octree
mkdir /home/harris_huang/O-CNN/octree/build && cd /home/harris_huang/O-CNN/octree/build && cmake .. -DABI=ON -DKEY64=ON && cmake --build . --config Release && ./octree_test
-- octree: USE_CUDA
-- octree: CMAKE_CUDA_STANDARD=11
-- octree: _GLIBCXX_USE_CXX11_ABI=0
-- octree: USE_MINIBALL
-- octree: KEY64
CMake Deprecation Warning at external/octree-ext/googletest/CMakeLists.txt:4 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at external/octree-ext/googletest/googlemock/CMakeLists.txt:45 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

CMake Deprecation Warning at external/octree-ext/googletest/googletest/CMakeLists.txt:56 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- Configuring done
CMake Warning (dev) in CMakeLists.txt:
Policy CMP0104 is not set: CMAKE_CUDA_ARCHITECTURES now detected for NVCC,
empty CUDA_ARCHITECTURES not allowed. Run "cmake --help-policy CMP0104"
for policy details. Use the cmake_policy command to set the policy and
suppress this warning.

CUDA_ARCHITECTURES is empty for target "octree_lib".
This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/harris_huang/O-CNN/octree
Error: could not load cache
running install
/home/harris_huang/anaconda3/envs/octree/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
/home/harris_huang/anaconda3/envs/octree/lib/python3.7/site-packages/setuptools/command/easy_install.py:147: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
EasyInstallDeprecationWarning,
running bdist_egg
running egg_info
writing ocnn.egg-info/PKG-INFO
writing dependency_links to ocnn.egg-info/dependency_links.txt
writing requirements to ocnn.egg-info/requires.txt
writing top-level names to ocnn.egg-info/top_level.txt
reading manifest file 'ocnn.egg-info/SOURCES.txt'
writing manifest file 'ocnn.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building 'ocnn.nn' extension
Emitting ninja build file /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/build.ninja...
Compiling objects...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
g++ -pthread -B /home/harris_huang/anaconda3/envs/octree/compiler_compat -Wl,--sysroot=/ -pthread -shared -B /home/harris_huang/anaconda3/envs/octree/compiler_compat -L/home/harris_huang/anaconda3/envs/octree/lib -Wl,-rpath=/home/harris_huang/anaconda3/envs/octree/lib -Wl,--no-as-needed -Wl,--sysroot=/ /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/./cpp/octree2col.o /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/./cpp/octree_align.o /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/./cpp/octree_batch.o /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/./cpp/octree_conv.o /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/./cpp/octree_grow.o /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/./cpp/octree_key.o /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/./cpp/octree_pad.o /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/./cpp/octree_pool.o /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/./cpp/octree_property.o /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/./cpp/octree_samples.o /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/./cpp/point2octree.o /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/./cpp/points_property.o /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/./cpp/pybind.o /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/./cpp/transform_octree.o /home/harris_huang/O-CNN/pytorch/build/temp.linux-x86_64-3.7/./cpp/transform_points.o -L/home/harris_huang/O-CNN/octree/build -L/home/harris_huang/anaconda3/envs/octree/lib/python3.7/site-packages/torch/lib -L/usr/local/cuda-10.2/lib64 -loctree_lib -lcublas -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-3.7/ocnn/nn.cpython-37m-x86_64-linux-gnu.so
/home/harris_huang/anaconda3/envs/octree/compiler_compat/ld: cannot find -loctree_lib: No such file or directory
collect2: error: ld returned 1 exit status
error: command '/usr/bin/g++' failed with exit code 1

It's stuck due to this for a long time. Please have a look and thank you for the time!

Please try to build the code with the official docker provided by pytorch: docker pull pytorch/pytorch:1.9.0-cuda10.2-cudnn7-devel

And here is the ocnn docker I built based on the official pytorch docker: docker pull wangps/ocnn:pytorch-1.9.0