ashawkey / cubvh

CUDA Mesh BVH tools.
MIT License
156 stars 11 forks source link

bug in installation #4

Open WUMINGCHAzero opened 1 year ago

WUMINGCHAzero commented 1 year ago

Error when using command "pip install -e ." I've tried solutions here, but ending up with "cannot find Eigen/Dense". I've also solutions here but met another problem. Please help me. Many thanks!

''' Obtaining file:///data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh Preparing metadata (setup.py) ... done Requirement already satisfied: ninja in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from cubvh==0.1.0) (1.11.1) Requirement already satisfied: trimesh in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from cubvh==0.1.0) (3.21.3) Requirement already satisfied: opencv-python in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from cubvh==0.1.0) (4.7.0.72) Requirement already satisfied: torch in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from cubvh==0.1.0) (1.12.1+cu113) Requirement already satisfied: numpy in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from cubvh==0.1.0) (1.24.2) Requirement already satisfied: tqdm in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from cubvh==0.1.0) (4.65.0) Requirement already satisfied: matplotlib in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from cubvh==0.1.0) (3.7.1) Requirement already satisfied: contourpy>=1.0.1 in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from matplotlib->cubvh==0.1.0) (1.0.7) Requirement already satisfied: packaging>=20.0 in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from matplotlib->cubvh==0.1.0) (23.0) Requirement already satisfied: pyparsing>=2.3.1 in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from matplotlib->cubvh==0.1.0) (3.0.9) Requirement already satisfied: python-dateutil>=2.7 in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from matplotlib->cubvh==0.1.0) (2.8.2) Requirement already satisfied: pillow>=6.2.0 in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from matplotlib->cubvh==0.1.0) (9.4.0) Requirement already satisfied: kiwisolver>=1.0.1 in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from matplotlib->cubvh==0.1.0) (1.4.4) Requirement already satisfied: cycler>=0.10 in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from matplotlib->cubvh==0.1.0) (0.11.0) Requirement already satisfied: importlib-resources>=3.2.0 in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from matplotlib->cubvh==0.1.0) (5.12.0) Requirement already satisfied: fonttools>=4.22.0 in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from matplotlib->cubvh==0.1.0) (4.39.3) Requirement already satisfied: typing-extensions in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from torch->cubvh==0.1.0) (4.5.0) Requirement already satisfied: zipp>=3.1.0 in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from importlib-resources>=3.2.0->matplotlib->cubvh==0.1.0) (3.15.0) Requirement already satisfied: six>=1.5 in /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages (from python-dateutil>=2.7->matplotlib->cubvh==0.1.0) (1.16.0) Installing collected packages: cubvh Running setup.py develop for cubvh error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> [104 lines of output]
    Found Eigen version 3.3.4 at /usr/include/eigen3
    Found eigen at /usr/include/eigen3
    running develop
    running egg_info
    writing cubvh.egg-info/PKG-INFO
    writing dependency_links to cubvh.egg-info/dependency_links.txt
    writing requirements to cubvh.egg-info/requires.txt
    writing top-level names to cubvh.egg-info/top_level.txt
    reading manifest file 'cubvh.egg-info/SOURCES.txt'
    adding license file 'LICENSE'
    adding license file 'LICENSE_NVIDIA'
    writing manifest file 'cubvh.egg-info/SOURCES.txt'
    running build_ext
    building '_cubvh' extension
    Emitting ninja build file /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/build/temp.linux-x86_64-cpython-38/build.ninja...
    Compiling objects...
    Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
    /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
      warnings.warn(
    /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/utils/cpp_extension.py:813: UserWarning: The detected CUDA version (11.1) has a minor version mismatch with the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem.
      warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
    [1/2] /usr/local/cuda/bin/nvcc  -I/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/include -I/usr/include/eigen3 -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/TH -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/include/python3.8 -c -c /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/api.cu -o /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/build/temp.linux-x86_64-cpython-38/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/api.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 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70
    FAILED: /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/build/temp.linux-x86_64-cpython-38/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/api.o
    /usr/local/cuda/bin/nvcc  -I/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/include -I/usr/include/eigen3 -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/TH -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/include/python3.8 -c -c /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/api.cu -o /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/build/temp.linux-x86_64-cpython-38/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/api.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 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70
    /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/api.cu:1:9: warning: #pragma once in main file
     #pragma once
             ^~~~
    In file included from /usr/include/eigen3/Eigen/Dense:1:0,
                     from /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/include/cubvh/api.h:3,
                     from /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/api.cu:3:
    /usr/include/eigen3/Eigen/Core:42:14: fatal error: math_functions.hpp: No such file or directory
         #include <math_functions.hpp>
                  ^~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    [2/2] /usr/local/cuda/bin/nvcc  -I/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/include -I/usr/include/eigen3 -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/TH -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/include/python3.8 -c -c /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/bvh.cu -o /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/build/temp.linux-x86_64-cpython-38/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/bvh.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 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70
    FAILED: /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/build/temp.linux-x86_64-cpython-38/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/bvh.o
    /usr/local/cuda/bin/nvcc  -I/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/include -I/usr/include/eigen3 -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/TH -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/include/python3.8 -c -c /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/bvh.cu -o /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/build/temp.linux-x86_64-cpython-38/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/bvh.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 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70
    In file included from /usr/include/eigen3/Eigen/Dense:1:0,
                     from /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/include/cubvh/common.h:14,
                     from /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/bvh.cu:2:
    /usr/include/eigen3/Eigen/Core:42:14: fatal error: math_functions.hpp: No such file or directory
         #include <math_functions.hpp>
                  ^~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    ninja: build stopped: subcommand failed.
    Traceback (most recent call last):
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1808, in _run_ninja_build
        subprocess.run(
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/subprocess.py", line 516, in run
        raise CalledProcessError(retcode, process.args,
    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 2, in <module>
      File "<pip-setuptools-caller>", line 34, in <module>
      File "/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/setup.py", line 118, in <module>
        setup(
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
        return distutils.core.setup(**attrs)
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
        return run_commands(dist)
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
        dist.run_commands()
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
        self.run_command(cmd)
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/dist.py", line 1208, in run_command
        super().run_command(command)
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
        cmd_obj.run()
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/command/develop.py", line 34, in run
        self.install_for_development()
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/command/develop.py", line 114, in install_for_development
        self.run_command('build_ext')
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
        self.distribution.run_command(command)
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/dist.py", line 1208, in run_command
        super().run_command(command)
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
        cmd_obj.run()
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run
        _build_ext.run(self)
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
        self.build_extensions()
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 765, in build_extensions
        build_ext.build_extensions(self)
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 468, in build_extensions
        self._build_extensions_serial()
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 494, in _build_extensions_serial
        self.build_extension(ext)
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
        _build_ext.build_extension(self, ext)
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 549, in build_extension
        objects = self.compiler.compile(
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 586, in unix_wrap_ninja_compile
        _write_ninja_file_and_compile_objects(
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1487, in _write_ninja_file_and_compile_objects
        _run_ninja_build(
      File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1824, in _run_ninja_build
        raise RuntimeError(message) from e
    RuntimeError: Error compiling objects for extension
    [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

error: subprocess-exited-with-error

× python setup.py develop did not run successfully. │ exit code: 1 ╰─> [104 lines of output] Found Eigen version 3.3.4 at /usr/include/eigen3 Found eigen at /usr/include/eigen3 running develop running egg_info writing cubvh.egg-info/PKG-INFO writing dependency_links to cubvh.egg-info/dependency_links.txt writing requirements to cubvh.egg-info/requires.txt writing top-level names to cubvh.egg-info/top_level.txt reading manifest file 'cubvh.egg-info/SOURCES.txt' adding license file 'LICENSE' adding license file 'LICENSE_NVIDIA' writing manifest file 'cubvh.egg-info/SOURCES.txt' running build_ext building '_cubvh' extension Emitting ninja build file /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/build/temp.linux-x86_64-cpython-38/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( /home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/utils/cpp_extension.py:813: UserWarning: The detected CUDA version (11.1) has a minor version mismatch with the version that was used to compile PyTorch (11.3). Most likely this shouldn't be a problem. warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda)) [1/2] /usr/local/cuda/bin/nvcc -I/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/include -I/usr/include/eigen3 -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/TH -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/include/python3.8 -c -c /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/api.cu -o /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/build/temp.linux-x86_64-cpython-38/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/api.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70 FAILED: /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/build/temp.linux-x86_64-cpython-38/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/api.o /usr/local/cuda/bin/nvcc -I/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/include -I/usr/include/eigen3 -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/TH -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/include/python3.8 -c -c /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/api.cu -o /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/build/temp.linux-x86_64-cpython-38/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/api.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -O3 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -UCUDA_NO_HALF_OPERATORS -UCUDA_NO_HALF_CONVERSIONS -UCUDA_NO_HALF2_OPERATORS -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70 /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/api.cu:1:9: warning: #pragma once in main file

pragma once

         ^~~~
In file included from /usr/include/eigen3/Eigen/Dense:1:0,
                 from /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/include/cubvh/api.h:3,
                 from /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/api.cu:3:
/usr/include/eigen3/Eigen/Core:42:14: fatal error: math_functions.hpp: No such file or directory
     #include <math_functions.hpp>
              ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
[2/2] /usr/local/cuda/bin/nvcc  -I/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/include -I/usr/include/eigen3 -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/TH -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/include/python3.8 -c -c /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/bvh.cu -o /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/build/temp.linux-x86_64-cpython-38/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/bvh.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 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70
FAILED: /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/build/temp.linux-x86_64-cpython-38/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/bvh.o
/usr/local/cuda/bin/nvcc  -I/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/include -I/usr/include/eigen3 -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/TH -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/include/THC -I/usr/local/cuda/include -I/home/yqjiang/anaconda3/envs/fantaisa3d_un/include/python3.8 -c -c /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/bvh.cu -o /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/build/temp.linux-x86_64-cpython-38/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/bvh.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 -std=c++14 --expt-extended-lambda --expt-relaxed-constexpr -U__CUDA_NO_HALF_OPERATORS__ -U__CUDA_NO_HALF_CONVERSIONS__ -U__CUDA_NO_HALF2_OPERATORS__ -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_cubvh -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_70,code=compute_70 -gencode=arch=compute_70,code=sm_70
In file included from /usr/include/eigen3/Eigen/Dense:1:0,
                 from /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/include/cubvh/common.h:14,
                 from /data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/src/bvh.cu:2:
/usr/include/eigen3/Eigen/Core:42:14: fatal error: math_functions.hpp: No such file or directory
     #include <math_functions.hpp>
              ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1808, in _run_ninja_build
    subprocess.run(
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
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 2, in <module>
  File "<pip-setuptools-caller>", line 34, in <module>
  File "/data2/yqjiang/projects_new/fantasia3d.unofficial/dependencies/cubvh/setup.py", line 118, in <module>
    setup(
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/__init__.py", line 87, in setup
    return distutils.core.setup(**attrs)
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/dist.py", line 1208, in run_command
    super().run_command(command)
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/command/develop.py", line 34, in run
    self.install_for_development()
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/command/develop.py", line 114, in install_for_development
    self.run_command('build_ext')
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
    self.distribution.run_command(command)
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/dist.py", line 1208, in run_command
    super().run_command(command)
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
    cmd_obj.run()
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 84, in run
    _build_ext.run(self)
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
    self.build_extensions()
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 765, in build_extensions
    build_ext.build_extensions(self)
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 468, in build_extensions
    self._build_extensions_serial()
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 494, in _build_extensions_serial
    self.build_extension(ext)
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/command/build_ext.py", line 246, in build_extension
    _build_ext.build_extension(self, ext)
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/setuptools/_distutils/command/build_ext.py", line 549, in build_extension
    objects = self.compiler.compile(
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 586, in unix_wrap_ninja_compile
    _write_ninja_file_and_compile_objects(
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1487, in _write_ninja_file_and_compile_objects
    _run_ninja_build(
  File "/home/yqjiang/anaconda3/envs/fantaisa3d_un/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 1824, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error compiling objects for extension
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. '''

arturodrt commented 1 year ago

were you able to solve the issue? I am getting a pretty similar error and I have not been able to fix it.