V2AI / Det3D

World's first general purpose 3D object detection codebse.
https://arxiv.org/abs/1908.09492
Apache License 2.0
1.49k stars 298 forks source link

Fail running setup.py #73

Closed ilopezfr closed 4 years ago

ilopezfr commented 4 years ago

When running:

Det3D$ python setup.py build develop

I get:

/home/iglopezfrancos/miniconda3/envs/py3D/lib/python3.7/site-packages/setuptools/dist.py:476: UserWarning: Normalizing '1.0.rc0+11f2398' to '1.0rc0+11f2398'
  normalized_version,
running build
running build_py
copying det3d/version.py -> build/lib.linux-x86_64-3.7/det3d
running build_ext
building 'det3d.ops.nms.nms' extension
gcc -pthread -B /home/iglopezfrancos/miniconda3/envs/py3D/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/iglopezfrancos/miniconda3/envs/py3D/lib/python3.7/site-packages/torch/include -I/home/iglopezfrancos/miniconda3/envs/py3D/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/iglopezfrancos/miniconda3/envs/py3D/lib/python3.7/site-packages/torch/include/TH -I/home/iglopezfrancos/miniconda3/envs/py3D/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/iglopezfrancos/miniconda3/envs/py3D/include/python3.7m -c det3d/ops/nms/nms.cc -o build/temp.linux-x86_64-3.7/det3d/ops/nms/nms.o -g -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=nms -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
/usr/local/cuda/bin/nvcc -I/home/iglopezfrancos/miniconda3/envs/py3D/lib/python3.7/site-packages/torch/include -I/home/iglopezfrancos/miniconda3/envs/py3D/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/iglopezfrancos/miniconda3/envs/py3D/lib/python3.7/site-packages/torch/include/TH -I/home/iglopezfrancos/miniconda3/envs/py3D/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/iglopezfrancos/miniconda3/envs/py3D/include/python3.7m -c det3d/ops/nms/nms_kernel.cu -o build/temp.linux-x86_64-3.7/det3d/ops/nms/nms_kernel.o -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr --compiler-options '-fPIC' -O2 -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=nms -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_60,code=sm_60 -std=c++11
In file included from /usr/local/cuda/include/cuda_runtime.h:120:0,
                 from <command-line>:0:
/usr/local/cuda/include/crt/common_functions.h:74:24: error: token ""__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions
 #define __CUDACC_VER__ "__CUDACC_VER__ is no longer supported.  Use __CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, and __CUDACC_VER_BUILD__ instead."
                        ^
error: command '/usr/local/cuda/bin/nvcc' failed with exit status 1

My system has:

ilopezfr commented 4 years ago

Commenting out the following from setup.py, which was added in this merge, allowed me to compile it.

CUDAExtension(
                name="det3d.ops.nms.nms",
                sources=[
                    "det3d/ops/nms/nms.cc",
                    # "det3d/ops/nms/nms.h",
                    "det3d/ops/nms/nms_kernel.cu",
                    # "det3d/ops/nms/nms_cpu.h",
                ],
                extra_compile_args={"cxx": ["-g"], "nvcc": ["-O2"]},
            ),

But it then causes this other issue ModuleNotFoundError: No module named 'det3d.ops.nms.nms' when running python tools/create_data.py. So how do we fix the setup issue in the first place?

tianweiy commented 4 years ago

For your first question,

/usr/local/cuda/include/crt/common_functions.h:74:24: error: token ""__CUDACC_VER is no longer supported. Use CUDACC_VER_MAJOR, CUDACC_VER_MINOR, and CUDACC_VER_BUILD__ instead."" is not valid in preprocessor expressions

define CUDACC_VER "CUDACC_VER is no longer supported. Use CUDACC_VER_MAJOR, CUDACC_VER_MINOR, and CUDACC_VER_BUILD instead."

That seems to be some cuda/torch/python version error. Maybe try the thing I mentioned here #71.