facebookresearch / SparseConvNet

Submanifold sparse convolutional networks
https://github.com/facebookresearch/SparseConvNet
Other
2.04k stars 332 forks source link

Building failure related to gcc version #237

Open lyhsieh opened 1 year ago

lyhsieh commented 1 year ago

Hello, I clone this project and use bash build.sh to build in a conda environment but fail. The error message is as below.

running install
/home/leo/anaconda3/envs/venv/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/home/leo/anaconda3/envs/venv/lib/python3.10/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running bdist_egg
running egg_info
creating sparseconvnet.egg-info
writing sparseconvnet.egg-info/PKG-INFO
writing dependency_links to sparseconvnet.egg-info/dependency_links.txt
writing top-level names to sparseconvnet.egg-info/top_level.txt
writing manifest file 'sparseconvnet.egg-info/SOURCES.txt'
package init file 'sparseconvnet/SCN/__init__.py' not found (or not a regular file)
/home/leo/anaconda3/envs/venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py:411: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
  warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'sparseconvnet.egg-info/SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'sparseconvnet.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib.linux-x86_64-3.10
creating build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/activations.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/metadata.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/unPooling.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/averagePooling.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/ioLayers.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/inputBatch.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/spectral_norm.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/maxPooling.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/networkArchitectures.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/submanifoldConvolution.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/randomizedStrideMaxPooling.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/shapeContext.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/convolution.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/dropout.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/randomizedStrideConvolution.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/batchNormalization.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/sparseConvNetTensor.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/sequential.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/deconvolution.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/denseToSparse.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/identity.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/__init__.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/fullConvolution.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/tables.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/utils.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/classificationTrainValidate.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/permutohedralSubmanifoldConvolution.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/sparsify.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/networkInNetwork.py -> build/lib.linux-x86_64-3.10/sparseconvnet
copying sparseconvnet/sparseToDense.py -> build/lib.linux-x86_64-3.10/sparseconvnet
running build_ext
/home/leo/anaconda3/envs/venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py:813: UserWarning: The detected CUDA version (10.1) has a minor version mismatch with the version that was used to compile PyTorch (10.2). Most likely this shouldn't be a problem.
  warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
/home/leo/anaconda3/envs/venv/lib/python3.10/site-packages/torch/utils/cpp_extension.py:820: UserWarning: There are no g++ version bounds defined for CUDA version 10.1
  warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
building 'sparseconvnet.SCN' extension
creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/sparseconvnet
creating build/temp.linux-x86_64-3.10/sparseconvnet/SCN
/usr/local/cuda/bin/nvcc -I/home/leo/SparseConvNet/sparseconvnet/SCN/ -I/home/leo/anaconda3/envs/venv/lib/python3.10/site-packages/torch/include -I/home/leo/anaconda3/envs/venv/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/leo/anaconda3/envs/venv/lib/python3.10/site-packages/torch/include/TH -I/home/leo/anaconda3/envs/venv/lib/python3.10/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/leo/anaconda3/envs/venv/include/python3.10 -c sparseconvnet/SCN/cuda.cu -o build/temp.linux-x86_64-3.10/sparseconvnet/SCN/cuda.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -std=c++14 -Xcompiler -fopenmp -O3 -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=SCN -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_52,code=compute_52 -gencode=arch=compute_52,code=sm_52
In file included from /usr/local/cuda/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/local/cuda/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
  138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
      |  ^~~~~
error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1

It says that gcc versions later than 8 are not supported. Is there any solution to this problem rather than downgrade gcc version? Thanks for your help!