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

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

Open
caglasozen opened this issue May 9, 2023 · 3 comments
Open

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

caglasozen opened this issue May 9, 2023 · 3 comments

Comments

@caglasozen
Copy link

caglasozen commented May 9, 2023

Issue Description

I believe this is the same issue as #38 . When trying to run the setup.py for any extension. The following error occurs. Indeed the problem is related to g++ and gcc versions as described here.

building 'chamfer' extension
/usr/bin/nvcc -I/home/caglasozen/.cache/pypoetry/virtualenvs/pointr-V-JpY-Pz-py3.8/lib/python3.8/site-packages/torch/include -I/home/caglasozen/.cache/pypoetry/virtualenvs/pointr-V-JpY-Pz-py3.8/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/caglasozen/.cache/pypoetry/virtualenvs/pointr-V-JpY-Pz-py3.8/lib/python3.8/site-packages/torch/include/TH -I/home/caglasozen/.cache/pypoetry/virtualenvs/pointr-V-JpY-Pz-py3.8/lib/python3.8/site-packages/torch/include/THC -I/home/caglasozen/.cache/pypoetry/virtualenvs/pointr-V-JpY-Pz-py3.8/include -I/home/caglasozen/.pyenv/versions/3.8.10/include/python3.8 -c chamfer.cu -o build/temp.linux-x86_64-cpython-38/chamfer.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' -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
/usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with '...':
  435 |         function(_Functor&& __f)
      |                                                                                                                                                 ^ 
/usr/include/c++/11/bits/std_function.h:435:145: note:         '_ArgTypes'
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with '...':
  530 |         operator=(_Functor&& __f)
      |                                                                                                                                                  ^ 
/usr/include/c++/11/bits/std_function.h:530:146: note:         '_ArgTypes'
error: command '/usr/bin/nvcc' failed with exit code 1

Solution

Downgrade gcc and g++. I followed this suggestion. to downgrade to 9.5.0 and now it works. Better solution would be to replace parts of c++ code that causes the issue as suggested here.

sudo apt-get install gcc-9 g++-9

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-9

sudo update-alternatives --config gcc

System & Environment

  • gcc version 11.3.0
  • Pytorch 11.1.0
  • Python 3.8
  • cuda 11.5
  • nvcc 11.5
  • Ubuntu 22.04
@caglasozen
Copy link
Author

more errors appearing unfortunately

@caglasozen caglasozen reopened this May 11, 2023
@wbiedatkhai
Copy link

@caglasozen were you able to fix this problem?

@Gary-bk
Copy link

Gary-bk commented Dec 16, 2024

@caglasozen Have u solved this problem?

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