yuxumin/PoinTr

setup.py issue with g++ and gcc version >10

Opened this issue · 1 comments

I believe it's the same issue as #110.

running install
/home/q84sun/miniconda3/envs/pointr_py3.7/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/q84sun/miniconda3/envs/pointr_py3.7/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 chamfer.egg-info/PKG-INFO
writing dependency_links to chamfer.egg-info/dependency_links.txt
writing top-level names to chamfer.egg-info/top_level.txt
/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/utils/cpp_extension.py:352: 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 'chamfer.egg-info/SOURCES.txt'
writing manifest file 'chamfer.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
building 'chamfer' extension
/usr/local/cuda/bin/nvcc -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include/TH -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/q84sun/miniconda3/envs/pointr_py3.7/include/python3.7m -c chamfer.cu -o build/temp.linux-x86_64-cpython-37/chamfer.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=chamfer -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_80,code=sm_80 -std=c++14
In file included from /usr/local/cuda/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/local/cuda/include/crt/host_config.h:139:2: error: #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
  139 | #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
      |  ^~~~~
error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1
running install
/home/q84sun/miniconda3/envs/pointr_py3.7/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/q84sun/miniconda3/envs/pointr_py3.7/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 cubic_feature_sampling.egg-info/PKG-INFO
writing dependency_links to cubic_feature_sampling.egg-info/dependency_links.txt
writing top-level names to cubic_feature_sampling.egg-info/top_level.txt
/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/utils/cpp_extension.py:352: 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 'cubic_feature_sampling.egg-info/SOURCES.txt'
writing manifest file 'cubic_feature_sampling.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
building 'cubic_feature_sampling' extension
/usr/local/cuda/bin/nvcc -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include/TH -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/q84sun/miniconda3/envs/pointr_py3.7/include/python3.7m -c cubic_feature_sampling.cu -o build/temp.linux-x86_64-cpython-37/cubic_feature_sampling.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=cubic_feature_sampling -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_80,code=sm_80 -std=c++14
In file included from /usr/local/cuda/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/local/cuda/include/crt/host_config.h:139:2: error: #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
  139 | #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
      |  ^~~~~
error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1
running install
/home/q84sun/miniconda3/envs/pointr_py3.7/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/q84sun/miniconda3/envs/pointr_py3.7/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 gridding.egg-info/PKG-INFO
writing dependency_links to gridding.egg-info/dependency_links.txt
writing top-level names to gridding.egg-info/top_level.txt
/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/utils/cpp_extension.py:352: 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 'gridding.egg-info/SOURCES.txt'
writing manifest file 'gridding.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
building 'gridding' extension
/usr/local/cuda/bin/nvcc -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include/TH -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/q84sun/miniconda3/envs/pointr_py3.7/include/python3.7m -c gridding.cu -o build/temp.linux-x86_64-cpython-37/gridding.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=gridding -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_80,code=sm_80 -std=c++14
In file included from /usr/local/cuda/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/local/cuda/include/crt/host_config.h:139:2: error: #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
  139 | #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
      |  ^~~~~
error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1
running install
/home/q84sun/miniconda3/envs/pointr_py3.7/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/q84sun/miniconda3/envs/pointr_py3.7/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 gridding_distance.egg-info/PKG-INFO
writing dependency_links to gridding_distance.egg-info/dependency_links.txt
writing top-level names to gridding_distance.egg-info/top_level.txt
/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/utils/cpp_extension.py:352: 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 'gridding_distance.egg-info/SOURCES.txt'
writing manifest file 'gridding_distance.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
building 'gridding_distance' extension
/usr/local/cuda/bin/nvcc -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include/TH -I/home/q84sun/miniconda3/envs/pointr_py3.7/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/q84sun/miniconda3/envs/pointr_py3.7/include/python3.7m -c gridding_distance.cu -o build/temp.linux-x86_64-cpython-37/gridding_distance.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -DTORCH_EXTENSION_NAME=gridding_distance -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_80,code=sm_80 -std=c++14
In file included from /usr/local/cuda/include/cuda_runtime.h:83,
                 from <command-line>:
/usr/local/cuda/include/crt/host_config.h:139:2: error: #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
  139 | #error -- unsupported GNU version! gcc versions later than 10 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk.
      |  ^~~~~
error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1

Their solution is sudo apt-get install gcc-9 g++-9.
However, I don't have sudo permission. Any optional solution?

  • python: 3.7
  • pytorch: 1.7
  • cuda: 12.2
  • nvcc: 11.2
  • ubuntu: 22.04

Excuse me, do u solve this problem?