jbwang1997 / OBBDetection

OBBDetection is an oriented object detection library, which is based on MMdetection.
Apache License 2.0
520 stars 111 forks source link

配置环境最后一步编译报错 #141

Open Ryanye2000 opened 2 years ago

Ryanye2000 commented 2 years ago

Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. 我看网上说这个错误要降级torch,但是这个项目需要mmcv要求,不能降级到1.3.0
  3. The bug has not been fixed in the latest version.

Describe the bug A clear and concise description of what the bug is. 主要是报这个错 subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1. 我使用的pytorch1.6 cuda10.1 gcc5.5 ninja也安装了是1.7.2

Error traceback If applicable, paste the error trackback here.

running develop running egg_info writing mmdet.egg-info/PKG-INFO writing dependency_links to mmdet.egg-info/dependency_links.txt writing requirements to mmdet.egg-info/requires.txt writing top-level names to mmdet.egg-info/top_level.txt reading manifest file 'mmdet.egg-info/SOURCES.txt' adding license file 'LICENSE' writing manifest file 'mmdet.egg-info/SOURCES.txt' running build_ext building 'mmdet.ops.utils.compiling_info' extension Emitting ninja build file /home/jing/anaconda3/envs/obbdetection/OBBDetection/build/temp.linux-x86_64-3.7/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) ninja: no work to do. g++ -pthread -shared -B /home/jing/anaconda3/envs/obbdetection/compiler_compat -L/home/jing/anaconda3/envs/obbdetection/lib -Wl,-rpath=/home/jing/anaconda3/envs/obbdetection/lib -Wl,--no-as-needed -Wl,--sysroot=/ /home/jing/anaconda3/envs/obbdetection/OBBDetection/build/temp.linux-x86_64-3.7/mmdet/ops/utils/src/compiling_info.o -L/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/torch/lib -L:/usr/local/cuda-10.1/lib64 -lc10 -ltorch -ltorch_cpu -ltorch_python -lcudart -lc10_cuda -ltorch_cuda -o build/lib.linux-x86_64-3.7/mmdet/ops/utils/compiling_info.cpython-37m-x86_64-linux-gnu.so building 'mmdet.ops.nms.nms_ext' extension Emitting ninja build file /home/jing/anaconda3/envs/obbdetection/OBBDetection/build/temp.linux-x86_64-3.7/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/1] :/usr/local/cuda-10.1/bin/nvcc -DWITH_CUDA -I/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/torch/include -I/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/torch/include/TH -I/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda-10.1/include -I/home/jing/anaconda3/envs/obbdetection/include/python3.7m -c -c /home/jing/anaconda3/envs/obbdetection/OBBDetection/mmdet/ops/nms/src/cuda/nms_kernel.cu -o /home/jing/anaconda3/envs/obbdetection/OBBDetection/build/temp.linux-x86_64-3.7/mmdet/ops/nms/src/cuda/nms_kernel.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=nms_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14 FAILED: /home/jing/anaconda3/envs/obbdetection/OBBDetection/build/temp.linux-x86_64-3.7/mmdet/ops/nms/src/cuda/nms_kernel.o :/usr/local/cuda-10.1/bin/nvcc -DWITH_CUDA -I/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/torch/include -I/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/torch/include/TH -I/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/torch/include/THC -I:/usr/local/cuda-10.1/include -I/home/jing/anaconda3/envs/obbdetection/include/python3.7m -c -c /home/jing/anaconda3/envs/obbdetection/OBBDetection/mmdet/ops/nms/src/cuda/nms_kernel.cu -o /home/jing/anaconda3/envs/obbdetection/OBBDetection/build/temp.linux-x86_64-3.7/mmdet/ops/nms/src/cuda/nms_kernel.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=nms_ext -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_61,code=sm_61 -std=c++14 /bin/sh: 1: :/usr/local/cuda-10.1/bin/nvcc: not found ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1515, in _run_ninja_build env=env) File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/subprocess.py", line 512, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "setup.py", line 318, in zip_safe=False) File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/setuptools/init.py", line 153, in setup return distutils.core.setup(**attrs) File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/distutils/core.py", line 148, in setup dist.run_commands() File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/setuptools/command/develop.py", line 34, in run self.install_for_development() File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/setuptools/command/develop.py", line 114, in install_for_development self.run_command('build_ext') File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 79, in run _build_ext.run(self) File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run _build_ext.build_ext.run(self) File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/distutils/command/build_ext.py", line 340, in run self.build_extensions() File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 649, in build_extensions build_ext.build_extensions(self) File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions _build_ext.build_ext.build_extensions(self) File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/distutils/command/build_ext.py", line 449, in build_extensions self._build_extensions_serial() File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/distutils/command/build_ext.py", line 474, in _build_extensions_serial self.build_extension(ext) File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 202, in build_extension _build_ext.build_extension(self, ext) File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/distutils/command/build_ext.py", line 534, in build_extension depends=ext.depends) File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 478, in unix_wrap_ninja_compile with_cuda=with_cuda) File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1233, in _write_ninja_file_and_compile_objects error_prefix='Error compiling objects for extension') File "/home/jing/anaconda3/envs/obbdetection/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1529, in _run_ninja_build raise RuntimeError(message) RuntimeError: Error compiling objects for exten

请问作者这个你遇到过吗,或者怎么解决啊

Bug fix If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!

coderclear commented 2 years ago

解决了吗

Ryanye2000 commented 2 years ago

解决了吗 还没,我降到了pytorch1.3编译通过了

coderclear commented 2 years ago

已收到!