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 and GCC version #279

Closed
jlgao2 opened this issue Sep 4, 2020 · 1 comment
Closed

setup.py and GCC version #279

jlgao2 opened this issue Sep 4, 2020 · 1 comment

Comments

@jlgao2
Copy link

jlgao2 commented Sep 4, 2020

Thanks for making this repository public!

I was setting this up today and I had some issues building the cuda extensions when I use gcc8.1.0, however when I used gcc 6.1.0 I was able to build successfully.

The error I received is shown below.

/usr/local/cuda/10.1/bin/nvcc -DWITH_CUDA -I/projects/qg35/jlgao2/venvs/lib/python3.7/site-packages/torch/include -I/projects/qg35/jlgao2/venvs/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/projects/qg35/jlgao2/venvs/lib/python3.7/site-packages/torch/include/TH -I/projects/qg35/jlgao2/venvs/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/10.1/include -I/projects/qg35/jlgao2/venvs/include -I/usr/local/python/3.7.3-system/include/python3.7m -c basicsr/models/ops/dcn/src/deform_conv_cuda_kernel.cu -o build/temp.linux-x86_64-3.7/basicsr/models/ops/dcn/src/deform_conv_cuda_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=deform_conv_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14 /usr/local/gcc/8.1.0/include/c++/8.1.0/bits/basic_string.tcc: In instantiation of 'static std::basic_string<_CharT, _Traits, _Alloc>::_Rep* std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_create(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]': /usr/local/gcc/8.1.0/include/c++/8.1.0/bits/basic_string.tcc:578:28: required from 'static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&, std::forward_iterator_tag) [with _FwdIterator = const char16_t*; _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]' /usr/local/gcc/8.1.0/include/c++/8.1.0/bits/basic_string.h:5033:20: required from 'static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct_aux(_InIterator, _InIterator, const _Alloc&, std::__false_type) [with _InIterator = const char16_t*; _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]' /usr/local/gcc/8.1.0/include/c++/8.1.0/bits/basic_string.h:5054:24: required from 'static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&) [with _InIterator = const char16_t*; _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]' /usr/local/gcc/8.1.0/include/c++/8.1.0/bits/basic_string.tcc:656:134: required from 'std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]' /usr/local/gcc/8.1.0/include/c++/8.1.0/bits/basic_string.h:6686:95: required from here /usr/local/gcc/8.1.0/include/c++/8.1.0/bits/basic_string.tcc:1067:1: error: cannot call member function 'void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char16_t; _Traits = std::char_traits<char16_t>; _Alloc = std::allocator<char16_t>]' without object __p->_M_set_sharable(); ^ ~~~~~~~~~ /usr/local/gcc/8.1.0/include/c++/8.1.0/bits/basic_string.tcc: In instantiation of 'static std::basic_string<_CharT, _Traits, _Alloc>::_Rep* std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_create(std::basic_string<_CharT, _Traits, _Alloc>::size_type, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]': /usr/local/gcc/8.1.0/include/c++/8.1.0/bits/basic_string.tcc:578:28: required from 'static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&, std::forward_iterator_tag) [with _FwdIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]' /usr/local/gcc/8.1.0/include/c++/8.1.0/bits/basic_string.h:5033:20: required from 'static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct_aux(_InIterator, _InIterator, const _Alloc&, std::__false_type) [with _InIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]' /usr/local/gcc/8.1.0/include/c++/8.1.0/bits/basic_string.h:5054:24: required from 'static _CharT* std::basic_string<_CharT, _Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&) [with _InIterator = const char32_t*; _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]' /usr/local/gcc/8.1.0/include/c++/8.1.0/bits/basic_string.tcc:656:134: required from 'std::basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT*, std::basic_string<_CharT, _Traits, _Alloc>::size_type, const _Alloc&) [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>; std::basic_string<_CharT, _Traits, _Alloc>::size_type = long unsigned int]' /usr/local/gcc/8.1.0/include/c++/8.1.0/bits/basic_string.h:6691:95: required from here /usr/local/gcc/8.1.0/include/c++/8.1.0/bits/basic_string.tcc:1067:1: error: cannot call member function 'void std::basic_string<_CharT, _Traits, _Alloc>::_Rep::_M_set_sharable() [with _CharT = char32_t; _Traits = std::char_traits<char32_t>; _Alloc = std::allocator<char32_t>]' without object error: command '/usr/local/cuda/10.1/bin/nvcc' failed with exit status 1

@xinntao
Copy link
Member

xinntao commented Sep 5, 2020

@jlgao2
I have not tried gcc8. 1, maybe it's because of the compatible issue. I do not know how to resolve the error. Maybe this could provide some info: pytorch/vision#1893

gcc 5~gcc 7 is OK.

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

2 participants