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

nvcc fatal : Unknown option '-generate-dependencies-with-compile' #28

Open
OOF-dura opened this issue Jul 18, 2021 · 1 comment
Open

Comments

@OOF-dura
Copy link

I am using a conda to manage my environment. I got the following error:
python 36
cuda 10.1 (cuda10.0 tried too)
When I tried to install this pkg:

running install
running bdist_egg
running egg_info
writing mesh_intersection.egg-info/PKG-INFO
writing dependency_links to mesh_intersection.egg-info/dependency_links.txt
writing requirements to mesh_intersection.egg-info/requires.txt
writing top-level names to mesh_intersection.egg-info/top_level.txt
reading manifest file 'mesh_intersection.egg-info/SOURCES.txt'
writing manifest file 'mesh_intersection.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building 'bvh_cuda' extension
Emitting ninja build file /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/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/2] /usr/local/cuda-10.1/bin/nvcc --generate-dependencies-with-compile --dependency-output /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/build/temp.linux-x86_64-3.6/src/bvh_cuda_op.o.d -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/TH -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/THC -Iinclude '-I' -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/TH -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda-10.1/include -I/media/frank/easystore/anaconda3/envs/MANO/include/python3.6m -c -c /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/src/bvh_cuda_op.cu -o /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/build/temp.linux-x86_64-3.6/src/bvh_cuda_op.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'"'"'' -DPRINT_TIMINGS=0 -DDEBUG_PRINT=0 -DERROR_CHECKING=1 -DCOLLISION_ORDERING=1 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=bvh_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70 -ccbin /usr/bin/gcc-5 -std=c++14
FAILED: /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/build/temp.linux-x86_64-3.6/src/bvh_cuda_op.o 
/usr/local/cuda-10.1/bin/nvcc --generate-dependencies-with-compile --dependency-output /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/build/temp.linux-x86_64-3.6/src/bvh_cuda_op.o.d -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/TH -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/THC -Iinclude '-I' -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/TH -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda-10.1/include -I/media/frank/easystore/anaconda3/envs/MANO/include/python3.6m -c -c /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/src/bvh_cuda_op.cu -o /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/build/temp.linux-x86_64-3.6/src/bvh_cuda_op.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'"'"'' -DPRINT_TIMINGS=0 -DDEBUG_PRINT=0 -DERROR_CHECKING=1 -DCOLLISION_ORDERING=1 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=bvh_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70 -ccbin /usr/bin/gcc-5 -std=c++14
nvcc fatal   : Unknown option '-generate-dependencies-with-compile'
[2/2] /usr/bin/g++-5 -MMD -MF /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/build/temp.linux-x86_64-3.6/src/bvh.o.d -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/TH -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/THC -Iinclude '-I' -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/TH -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda-10.1/include -I/media/frank/easystore/anaconda3/envs/MANO/include/python3.6m -c -c /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/src/bvh.cpp -o /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/build/temp.linux-x86_64-3.6/src/bvh.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=bvh_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
FAILED: /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/build/temp.linux-x86_64-3.6/src/bvh.o 
/usr/bin/g++-5 -MMD -MF /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/build/temp.linux-x86_64-3.6/src/bvh.o.d -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/TH -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/THC -Iinclude '-I' -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/TH -I/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/THC -I/usr/local/cuda-10.1/include -I/media/frank/easystore/anaconda3/envs/MANO/include/python3.6m -c -c /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/src/bvh.cpp -o /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/build/temp.linux-x86_64-3.6/src/bvh.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=bvh_cuda -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/ATen/Parallel.h:140:0,
                 from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
                 from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
                 from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
                 from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:13,
                 from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
                 from /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/src/bvh.cpp:18:
/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/ATen/ParallelOpenMP.h:83:0: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
 #pragma omp parallel for if ((end - begin) >= grain_size)
 ^
/media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/src/bvh.cpp: In function ‘at::Tensor bvh_forward(at::Tensor, int)’:
/media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/src/bvh.cpp:25:39: warning: ‘at::DeprecatedTypeProperties& at::Tensor::type() const’ is deprecated: Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device(). [-Wdeprecated-declarations]
 #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
                                       ^
/media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/src/bvh.cpp:27:24: note: in expansion of macro ‘CHECK_CUDA’
 #define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
                        ^
/media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/src/bvh.cpp:30:5: note: in expansion of macro ‘CHECK_INPUT’
     CHECK_INPUT(triangles);
     ^
In file included from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/ATen/Tensor.h:3:0,
                 from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/ATen/Context.h:4,
                 from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/ATen/ATen.h:9,
                 from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3,
                 from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader_options.h:4,
                 from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/base.h:3,
                 from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader/stateful.h:3,
                 from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data/dataloader.h:3,
                 from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/data.h:3,
                 from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/csrc/api/include/torch/all.h:8,
                 from /media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/torch/extension.h:4,
                 from /media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/src/bvh.cpp:18:
/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/include/ATen/core/TensorBody.h:303:30: note: declared here
   DeprecatedTypeProperties & type() const {
                              ^
/media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/src/bvh.cpp:25:79: error: ‘AT_CHECK’ was not declared in this scope
 #define CHECK_CUDA(x) AT_CHECK(x.type().is_cuda(), #x " must be a CUDA tensor")
                                                                               ^
/media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/src/bvh.cpp:27:24: note: in expansion of macro ‘CHECK_CUDA’
 #define CHECK_INPUT(x) CHECK_CUDA(x); CHECK_CONTIGUOUS(x)
                        ^
/media/frank/easystore/Code/HPE/Video_based/torch-mesh-isect/src/bvh.cpp:30:5: note: in expansion of macro ‘CHECK_INPUT’
     CHECK_INPUT(triangles);
     ^
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1673, in _run_ninja_build
    env=env)
  File "/media/frank/easystore/anaconda3/envs/MANO/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 "setup.py", line 97, in <module>
    cmdclass={'build_ext': BuildExtension})
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/setuptools/__init__.py", line 163, in setup
    return distutils.core.setup(**attrs)
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/distutils/core.py", line 148, in setup
    dist.run_commands()
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/distutils/dist.py", line 955, in run_commands
    self.run_command(cmd)
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/setuptools/command/install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 175, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/setuptools/command/bdist_egg.py", line 161, in call_command
    self.run_command(cmdname)
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/setuptools/command/install_lib.py", line 11, in run
    self.build()
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/distutils/command/install_lib.py", line 107, in build
    self.run_command('build_ext')
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/distutils/cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/distutils/dist.py", line 974, in run_command
    cmd_obj.run()
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 87, in run
    _build_ext.run(self)
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 708, in build_extensions
    build_ext.build_extensions(self)
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
    self._build_extensions_serial()
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
    self.build_extension(ext)
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/setuptools/command/build_ext.py", line 208, in build_extension
    _build_ext.build_extension(self, ext)
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
    depends=ext.depends)
  File "/media/frank/easystore/anaconda3/envs/MANO/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 538, in unix_wrap_ninja_compile
    with_cuda=with_cuda)
  File "/media/frank/easystore/anaconda3/envs/MANO/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 "/media/frank/easystore/anaconda3/envs/MANO/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


@VisionaryMind
Copy link

Unfortunately, this library does not appear to be compatible with newer versions of CUDA (>9). I have seen the same error as you using CUDA 10 and 11, but not with 9. There are several projects that depend on torch-mesh-isect and, unfortunately, they cannot be used because they have CUDA 10 dependencies. Hopefully, the author of this library will update for compatibility with the newer libraries.

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