facebookresearch / detectron2

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
https://detectron2.readthedocs.io/en/latest/
Apache License 2.0
30.34k stars 7.46k forks source link

Built detectron2 from source error #3597

Closed Zhang-ze-peng closed 3 years ago

Zhang-ze-peng commented 3 years ago

Hi, thanks for you great work! I'm sorry I can't build detectron2 from source. I do exactly same as the Installation Instructions, but it just keep failed.

The details:

Firstly, I corrctly install Pytorch and torchvison with CUDA10.1. And then after clone the project and run

python -m pip install -e detectron2

then it going wrong, the Full logs is as follows:

Obtaining file:///home/host/Project/detectron2
Requirement already satisfied: Pillow>=7.1 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (8.3.1)
Requirement already satisfied: matplotlib in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (3.3.4)
Requirement already satisfied: pycocotools>=2.0.2 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (2.0.2)
Requirement already satisfied: termcolor>=1.1 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (1.1.0)
Requirement already satisfied: yacs>=0.1.8 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (0.1.8)
Requirement already satisfied: tabulate in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (0.8.9)
Requirement already satisfied: cloudpickle in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (2.0.0)
Requirement already satisfied: tqdm>4.29.0 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (4.62.3)
Requirement already satisfied: tensorboard in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (2.7.0)
Requirement already satisfied: fvcore<0.1.6,>=0.1.5 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (0.1.5.post20211015)
Requirement already satisfied: iopath<0.1.10,>=0.1.7 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (0.1.8)
Requirement already satisfied: future in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (0.18.2)
Requirement already satisfied: pydot in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (1.4.2)
Requirement already satisfied: omegaconf>=2.1 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (2.1.1)
Requirement already satisfied: hydra-core>=1.1 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (1.1.1)
Requirement already satisfied: black==21.4b2 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (21.4b2)
Requirement already satisfied: dataclasses in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from detectron2==0.5) (0.8)
Requirement already satisfied: cycler>=0.10 in /home/host/.local/lib/python3.6/site-packages/cycler-0.10.0-py3.6.egg (from matplotlib->detectron2==0.5) (0.10.0)
Requirement already satisfied: numpy>=1.15 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from matplotlib->detectron2==0.5) (1.19.5)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.3 in /home/host/.local/lib/python3.6/site-packages/pyparsing-3.0.0a2-py3.6.egg (from matplotlib->detectron2==0.5) (3.0.0a2)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/host/.local/lib/python3.6/site-packages/kiwisolver-1.2.0-py3.6-linux-x86_64.egg (from matplotlib->detectron2==0.5) (1.2.0)
Requirement already satisfied: python-dateutil>=2.1 in /home/host/.local/lib/python3.6/site-packages/python_dateutil-2.8.1-py3.6.egg (from matplotlib->detectron2==0.5) (2.8.1)
Requirement already satisfied: setuptools>=18.0 in /home/host/anaconda3/envs/centernet/lib/python3.6/site-packages (from pycocotools>=2.0.2->detectron2==0.5) (49.6.0.post20200814)
Requirement already satisfied: cython>=0.27.3 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from pycocotools>=2.0.2->detectron2==0.5) (0.29.24)
Requirement already satisfied: PyYAML in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from yacs>=0.1.8->detectron2==0.5) (6.0)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from tensorboard->detectron2==0.5) (0.6.1)
Requirement already satisfied: werkzeug>=0.11.15 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from tensorboard->detectron2==0.5) (2.0.2)
Requirement already satisfied: absl-py>=0.4 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from tensorboard->detectron2==0.5) (0.14.1)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from tensorboard->detectron2==0.5) (0.4.6)
Requirement already satisfied: google-auth<3,>=1.6.3 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from tensorboard->detectron2==0.5) (2.3.0)
Requirement already satisfied: grpcio>=1.24.3 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from tensorboard->detectron2==0.5) (1.41.0)
Requirement already satisfied: markdown>=2.6.8 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from tensorboard->detectron2==0.5) (3.3.4)
Requirement already satisfied: wheel>=0.26 in /home/host/anaconda3/envs/centernet/lib/python3.6/site-packages (from tensorboard->detectron2==0.5) (0.35.1)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from tensorboard->detectron2==0.5) (1.8.0)
Requirement already satisfied: protobuf>=3.6.0 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from tensorboard->detectron2==0.5) (3.18.1)
Requirement already satisfied: requests<3,>=2.21.0 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from tensorboard->detectron2==0.5) (2.26.0)
Requirement already satisfied: portalocker in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from iopath<0.1.10,>=0.1.7->detectron2==0.5) (2.3.2)
Requirement already satisfied: antlr4-python3-runtime==4.8 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from omegaconf>=2.1->detectron2==0.5) (4.8)
Requirement already satisfied: importlib-resources; python_version < "3.9" in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from hydra-core>=1.1->detectron2==0.5) (5.3.0)
Requirement already satisfied: appdirs in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from black==21.4b2->detectron2==0.5) (1.4.4)
Requirement already satisfied: typing-extensions>=3.7.4; python_version < "3.8" in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from black==21.4b2->detectron2==0.5) (3.10.0.2)
Requirement already satisfied: typed-ast>=1.4.2; python_version < "3.8" in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from black==21.4b2->detectron2==0.5) (1.4.3)
Requirement already satisfied: regex>=2020.1.8 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from black==21.4b2->detectron2==0.5) (2021.10.8)
Requirement already satisfied: mypy-extensions>=0.4.3 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from black==21.4b2->detectron2==0.5) (0.4.3)
Requirement already satisfied: click>=7.1.2 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from black==21.4b2->detectron2==0.5) (8.0.3)
Requirement already satisfied: toml>=0.10.1 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from black==21.4b2->detectron2==0.5) (0.10.2)
Requirement already satisfied: pathspec<1,>=0.8.1 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from black==21.4b2->detectron2==0.5) (0.9.0)
Requirement already satisfied: six in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from cycler>=0.10->matplotlib->detectron2==0.5) (1.16.0)
Requirement already satisfied: requests-oauthlib>=0.7.0 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard->detectron2==0.5) (1.3.0)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from google-auth<3,>=1.6.3->tensorboard->detectron2==0.5) (4.2.4)
Requirement already satisfied: rsa<5,>=3.1.4 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from google-auth<3,>=1.6.3->tensorboard->detectron2==0.5) (4.7.2)
Requirement already satisfied: pyasn1-modules>=0.2.1 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from google-auth<3,>=1.6.3->tensorboard->detectron2==0.5) (0.2.8)
Requirement already satisfied: importlib-metadata; python_version < "3.8" in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from markdown>=2.6.8->tensorboard->detectron2==0.5) (4.8.1)
Requirement already satisfied: charset-normalizer~=2.0.0; python_version >= "3" in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from requests<3,>=2.21.0->tensorboard->detectron2==0.5) (2.0.7)
Requirement already satisfied: idna<4,>=2.5; python_version >= "3" in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from requests<3,>=2.21.0->tensorboard->detectron2==0.5) (3.3)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from requests<3,>=2.21.0->tensorboard->detectron2==0.5) (1.26.7)
Requirement already satisfied: certifi>=2017.4.17 in /home/host/anaconda3/envs/centernet/lib/python3.6/site-packages (from requests<3,>=2.21.0->tensorboard->detectron2==0.5) (2020.6.20)
Requirement already satisfied: zipp>=3.1.0; python_version < "3.10" in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from importlib-resources; python_version < "3.9"->hydra-core>=1.1->detectron2==0.5) (3.6.0)
Requirement already satisfied: oauthlib>=3.0.0 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard->detectron2==0.5) (3.1.1)
Requirement already satisfied: pyasn1>=0.1.3 in /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages (from rsa<5,>=3.1.4->google-auth<3,>=1.6.3->tensorboard->detectron2==0.5) (0.4.8)
Installing collected packages: detectron2
  Attempting uninstall: detectron2
    Found existing installation: detectron2 0.5+cu101
    Uninstalling detectron2-0.5+cu101:
      Successfully uninstalled detectron2-0.5+cu101
  Running setup.py develop for detectron2
    ERROR: Command errored out with exit status 1:
     command: /home/host/anaconda3/envs/detectron2/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/host/Project/detectron2/setup.py'"'"'; __file__='"'"'/home/host/Project/detectron2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: /home/host/Project/detectron2/
    Complete output (163 lines):
    running develop
    running egg_info
    writing detectron2.egg-info/PKG-INFO
    writing dependency_links to detectron2.egg-info/dependency_links.txt
    writing requirements to detectron2.egg-info/requires.txt
    writing top-level names to detectron2.egg-info/top_level.txt
    reading manifest file 'detectron2.egg-info/SOURCES.txt'
    writing manifest file 'detectron2.egg-info/SOURCES.txt'
    running build_ext
    building 'detectron2._C' extension
    Emitting ninja build file /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/build.ninja...
    Compiling objects...
    Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
    [1/5] /usr/local/cuda/bin/nvcc  -DWITH_CUDA -I/home/host/Project/detectron2/detectron2/layers/csrc -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/TH -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/host/anaconda3/envs/detectron2/include/python3.6m -c -c /home/host/Project/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.cu -o /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/home/host/Project/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_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'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
    FAILED: /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/home/host/Project/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.o
    /usr/local/cuda/bin/nvcc  -DWITH_CUDA -I/home/host/Project/detectron2/detectron2/layers/csrc -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/TH -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/host/anaconda3/envs/detectron2/include/python3.6m -c -c /home/host/Project/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_cuda.cu -o /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/home/host/Project/detectron2/detectron2/layers/csrc/box_iou_rotated/box_iou_rotated_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'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
    /usr/include/c++/7/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/include/c++/7/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/include/c++/7/bits/basic_string.h:5042: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/include/c++/7/bits/basic_string.h:5063: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/include/c++/7/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/include/c++/7/bits/basic_string.h:6688:95:   required from here
    /usr/include/c++/7/bits/basic_string.tcc:1067:16: 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/include/c++/7/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/include/c++/7/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/include/c++/7/bits/basic_string.h:5042: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/include/c++/7/bits/basic_string.h:5063: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/include/c++/7/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/include/c++/7/bits/basic_string.h:6693:95:   required from here
    /usr/include/c++/7/bits/basic_string.tcc:1067:16: 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
    [2/5] /usr/local/cuda/bin/nvcc  -DWITH_CUDA -I/home/host/Project/detectron2/detectron2/layers/csrc -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/TH -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/host/anaconda3/envs/detectron2/include/python3.6m -c -c /home/host/Project/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.cu -o /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/home/host/Project/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_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'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
    FAILED: /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/home/host/Project/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.o
    /usr/local/cuda/bin/nvcc  -DWITH_CUDA -I/home/host/Project/detectron2/detectron2/layers/csrc -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/TH -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/host/anaconda3/envs/detectron2/include/python3.6m -c -c /home/host/Project/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_cuda.cu -o /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/home/host/Project/detectron2/detectron2/layers/csrc/ROIAlignRotated/ROIAlignRotated_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'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
    /usr/include/c++/7/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/include/c++/7/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/include/c++/7/bits/basic_string.h:5042: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/include/c++/7/bits/basic_string.h:5063: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/include/c++/7/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/include/c++/7/bits/basic_string.h:6688:95:   required from here
    /usr/include/c++/7/bits/basic_string.tcc:1067:16: 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/include/c++/7/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/include/c++/7/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/include/c++/7/bits/basic_string.h:5042: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/include/c++/7/bits/basic_string.h:5063: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/include/c++/7/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/include/c++/7/bits/basic_string.h:6693:95:   required from here
    /usr/include/c++/7/bits/basic_string.tcc:1067:16: 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
    [3/5] /usr/local/cuda/bin/nvcc  -DWITH_CUDA -I/home/host/Project/detectron2/detectron2/layers/csrc -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/TH -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/host/anaconda3/envs/detectron2/include/python3.6m -c -c /home/host/Project/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu -o /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/home/host/Project/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_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'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
    FAILED: /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/home/host/Project/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.o
    /usr/local/cuda/bin/nvcc  -DWITH_CUDA -I/home/host/Project/detectron2/detectron2/layers/csrc -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/TH -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/host/anaconda3/envs/detectron2/include/python3.6m -c -c /home/host/Project/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu -o /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/home/host/Project/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_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'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
    /usr/include/c++/7/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/include/c++/7/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/include/c++/7/bits/basic_string.h:5042: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/include/c++/7/bits/basic_string.h:5063: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/include/c++/7/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/include/c++/7/bits/basic_string.h:6688:95:   required from here
    /usr/include/c++/7/bits/basic_string.tcc:1067:16: 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/include/c++/7/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/include/c++/7/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/include/c++/7/bits/basic_string.h:5042: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/include/c++/7/bits/basic_string.h:5063: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/include/c++/7/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/include/c++/7/bits/basic_string.h:6693:95:   required from here
    /usr/include/c++/7/bits/basic_string.tcc:1067:16: 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
    [4/5] /usr/local/cuda/bin/nvcc  -DWITH_CUDA -I/home/host/Project/detectron2/detectron2/layers/csrc -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/TH -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/host/anaconda3/envs/detectron2/include/python3.6m -c -c /home/host/Project/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.cu -o /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/home/host/Project/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.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'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
    FAILED: /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/home/host/Project/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.o
    /usr/local/cuda/bin/nvcc  -DWITH_CUDA -I/home/host/Project/detectron2/detectron2/layers/csrc -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/TH -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/host/anaconda3/envs/detectron2/include/python3.6m -c -c /home/host/Project/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.cu -o /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/home/host/Project/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda_kernel.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'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
    /usr/include/c++/7/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/include/c++/7/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/include/c++/7/bits/basic_string.h:5042: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/include/c++/7/bits/basic_string.h:5063: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/include/c++/7/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/include/c++/7/bits/basic_string.h:6688:95:   required from here
    /usr/include/c++/7/bits/basic_string.tcc:1067:16: 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/include/c++/7/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/include/c++/7/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/include/c++/7/bits/basic_string.h:5042: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/include/c++/7/bits/basic_string.h:5063: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/include/c++/7/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/include/c++/7/bits/basic_string.h:6693:95:   required from here
    /usr/include/c++/7/bits/basic_string.tcc:1067:16: 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
    [5/5] /usr/local/cuda/bin/nvcc  -DWITH_CUDA -I/home/host/Project/detectron2/detectron2/layers/csrc -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/TH -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/host/anaconda3/envs/detectron2/include/python3.6m -c -c /home/host/Project/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu -o /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/home/host/Project/detectron2/detectron2/layers/csrc/deformable/deform_conv_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'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
    FAILED: /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/home/host/Project/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.o
    /usr/local/cuda/bin/nvcc  -DWITH_CUDA -I/home/host/Project/detectron2/detectron2/layers/csrc -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/TH -I/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/host/anaconda3/envs/detectron2/include/python3.6m -c -c /home/host/Project/detectron2/detectron2/layers/csrc/deformable/deform_conv_cuda.cu -o /home/host/Project/detectron2/build/temp.linux-x86_64-3.6/home/host/Project/detectron2/detectron2/layers/csrc/deformable/deform_conv_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'"'"'' -O3 -DCUDA_HAS_FP16=1 -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=compute_61 -gencode=arch=compute_61,code=sm_61 -std=c++14
    /usr/include/c++/7/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/include/c++/7/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/include/c++/7/bits/basic_string.h:5042: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/include/c++/7/bits/basic_string.h:5063: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/include/c++/7/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/include/c++/7/bits/basic_string.h:6688:95:   required from here
    /usr/include/c++/7/bits/basic_string.tcc:1067:16: 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/include/c++/7/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/include/c++/7/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/include/c++/7/bits/basic_string.h:5042: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/include/c++/7/bits/basic_string.h:5063: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/include/c++/7/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/include/c++/7/bits/basic_string.h:6693:95:   required from here
    /usr/include/c++/7/bits/basic_string.tcc:1067:16: 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
    ninja: build stopped: subcommand failed.
    Traceback (most recent call last):
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1673, in _run_ninja_build
        env=env)
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/subprocess.py", line 438, in run
        output=stdout, stderr=stderr)
    subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/host/Project/detectron2/setup.py", line 207, in <module>
        cmdclass={"build_ext": torch.utils.cpp_extension.BuildExtension},
      File "/home/host/anaconda3/envs/centernet/lib/python3.6/site-packages/setuptools/__init__.py", line 163, in setup
        return distutils.core.setup(**attrs)
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/host/anaconda3/envs/centernet/lib/python3.6/site-packages/setuptools/command/develop.py", line 38, in run
        self.install_for_development()
      File "/home/host/anaconda3/envs/centernet/lib/python3.6/site-packages/setuptools/command/develop.py", line 140, in install_for_development
        self.run_command('build_ext')
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/host/anaconda3/envs/centernet/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 87, in run
        _build_ext.run(self)
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
        _build_ext.build_ext.run(self)
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/distutils/command/build_ext.py", line 339, in run
        self.build_extensions()
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 708, in build_extensions
        build_ext.build_extensions(self)
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
        _build_ext.build_ext.build_extensions(self)
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
        self._build_extensions_serial()
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
        self.build_extension(ext)
      File "/home/host/anaconda3/envs/centernet/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 208, in build_extension
        _build_ext.build_extension(self, ext)
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
        depends=ext.depends)
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 538, in unix_wrap_ninja_compile
        with_cuda=with_cuda)
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1359, in _write_ninja_file_and_compile_objects
        error_prefix='Error compiling objects for extension')
      File "/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1683, in _run_ninja_build
        raise RuntimeError(message) from e
    RuntimeError: Error compiling objects for extension
    ----------------------------------------
  Rolling back uninstall of detectron2
  Moving to /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/detectron2-0.5+cu101.dist-info/
   from /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/~etectron2-0.5+cu101.dist-info
  Moving to /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/detectron2/
   from /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/~etectron2
  Moving to /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/tools/
   from /home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/~ools
ERROR: Command errored out with exit status 1: /home/host/anaconda3/envs/detectron2/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/host/Project/detectron2/setup.py'"'"'; __file__='"'"'/home/host/Project/detectron2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.

Environment:

Here is my environment info:

----------------------  -----------------------------------------------------------------------------------
sys.platform            linux
Python                  3.6.13 |Anaconda, Inc.| (default, Jun  4 2021, 14:25:59) [GCC 7.5.0]
numpy                   1.19.5
detectron2              0.5 @/home/host/Project/detectron2/detectron2
detectron2._C           not built correctly: No module named 'detectron2._C'
Compiler ($CXX)         c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
CUDA compiler           Cuda compilation tools, release 9.1, V9.1.85
DETECTRON2_ENV_MODULE   <not set>
PyTorch                 1.8.0 @/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torch
PyTorch debug build     False
GPU available           Yes
GPU 0,1                 GeForce GTX 1080 Ti (arch=6.1)
Driver version          440.100
CUDA_HOME               /usr
Pillow                  8.3.1
torchvision             0.9.0 @/home/host/anaconda3/envs/detectron2/lib/python3.6/site-packages/torchvision
torchvision arch flags  3.5, 5.0, 6.0, 7.0, 7.5
fvcore                  0.1.5.post20211015
iopath                  0.1.8
cv2                     4.4.0
----------------------  -----------------------------------------------------------------------------------
PyTorch built with:
  - GCC 7.3
  - C++ Version: 201402
  - Intel(R) oneAPI Math Kernel Library Version 2021.3-Product Build 20210617 for Intel(R) 64 architecture applications
  - Intel(R) MKL-DNN v1.7.0 (Git Hash 7aed236906b1f7a05c0917e5257a1af05e9ff683)
  - OpenMP 201511 (a.k.a. OpenMP 4.5)
  - NNPACK is enabled
  - CPU capability usage: AVX2
  - CUDA Runtime 10.1
  - NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_37,code=compute_37
  - CuDNN 7.6.3
  - Magma 2.5.2
  - Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=10.1, CUDNN_VERSION=7.6.3, CXX_COMPILER=/opt/rh/devtoolset-7/root/usr/bin/c++, CXX_FLAGS= -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.8.0, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, 

Testing NCCL connectivity ... this should not hang.
NCCL succeeded.

I don't know what the problem is. I hope I can get some advice and help from you.

Thanks a lot!

github-actions[bot] commented 3 years ago

You've chosen to report an unexpected problem or bug. Unless you already know the root cause of it, please include details about it by filling the issue template. The following information is missing: "Instructions To Reproduce the Issue and Full Logs";

ppwwyyxx commented 3 years ago

Answered in https://detectron2.readthedocs.io/en/latest/tutorials/install.html#common-installation-issues under "C++ compilation errors from NVCC"