graphdeco-inria / gaussian-splatting

Original reference implementation of "3D Gaussian Splatting for Real-Time Radiance Field Rendering"
https://repo-sam.inria.fr/fungraph/3d-gaussian-splatting/
Other
14.9k stars 1.95k forks source link

build diff-gaussian-rasterization failed #645

Open Mr-ind1fferent opened 10 months ago

Mr-ind1fferent commented 10 months ago

unable to pip install diff-gaussian-rasterization Below is the error log. Any help is appreciated.

Processing ./submodules/diff-gaussian-rasterization Preparing metadata (setup.py) ... done Building wheels for collected packages: diff_gaussian_rasterization Building wheel for diff_gaussian_rasterization (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [97 lines of output] running bdist_wheel running build running build_py running build_ext /data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py:820: UserWarning: There are no g++ version bounds defined for CUDA version 11.6 warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}') building 'diff_gaussian_rasterization._C' extension Emitting ninja build file /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/build.ninja... Compiling objects... Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N) [1/3] /usr/local/cuda-11.6/bin/nvcc -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.6/include -I/data/swwu/anaconda3/envs/gaussian_splatting/include/python3.7m -c -c /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/forward.cu -o /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/forward.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -I/data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 FAILED: /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/forward.o /usr/local/cuda-11.6/bin/nvcc -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.6/include -I/data/swwu/anaconda3/envs/gaussian_splatting/include/python3.7m -c -c /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/forward.cu -o /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/forward.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -I/data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 In file included from /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/forward.cu:12: /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/forward.h:19:10: fatal error: glm/glm.hpp: No such file or directory 19 | #include <glm/glm.hpp> | ^~~~~ compilation terminated. [2/3] /usr/local/cuda-11.6/bin/nvcc -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.6/include -I/data/swwu/anaconda3/envs/gaussian_splatting/include/python3.7m -c -c /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/backward.cu -o /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/backward.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -I/data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 FAILED: /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/backward.o /usr/local/cuda-11.6/bin/nvcc -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.6/include -I/data/swwu/anaconda3/envs/gaussian_splatting/include/python3.7m -c -c /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/backward.cu -o /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/backward.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -I/data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 In file included from /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/backward.cu:12: /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/backward.h:19:10: fatal error: glm/glm.hpp: No such file or directory 19 | #include <glm/glm.hpp> | ^~~~~ compilation terminated. [3/3] /usr/local/cuda-11.6/bin/nvcc -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.6/include -I/data/swwu/anaconda3/envs/gaussian_splatting/include/python3.7m -c -c /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/rasterizer_impl.cu -o /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/rasterizer_impl.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -I/data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 FAILED: /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/rasterizer_impl.o /usr/local/cuda-11.6/bin/nvcc -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.6/include -I/data/swwu/anaconda3/envs/gaussian_splatting/include/python3.7m -c -c /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/rasterizer_impl.cu -o /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/rasterizer_impl.o -DCUDA_NO_HALF_OPERATORS -DCUDA_NO_HALF_CONVERSIONS -DCUDA_NO_BFLOAT16_CONVERSIONS -DCUDA_NO_HALF2_OPERATORS --expt-relaxed-constexpr --compiler-options ''"'"'-fPIC'"'"'' -I/data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14 /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/rasterizer_impl.cu:23:10: fatal error: glm/glm.hpp: No such file or directory 23 | #include <glm/glm.hpp> | ^~~~~ compilation terminated. ninja: build stopped: subcommand failed. Traceback (most recent call last): File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1814, in _run_ninja_build env=env) File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/subprocess.py", line 512, 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 36, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/setup.py", line 32, in <module>
      'build_ext': BuildExtension
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/dist.py", line 963, in run_command
      super().run_command(command)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 368, in run
      self.run_command("build")
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/dist.py", line 963, in run_command
      super().run_command(command)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build.py", line 131, in run
      self.run_command(cmd_name)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/dist.py", line 963, in run_command
      super().run_command(command)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 88, in run
      _build_ext.run(self)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
      self.build_extensions()
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 765, in build_extensions
      build_ext.build_extensions(self)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
      self._build_extensions_serial()
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
      self.build_extension(ext)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 249, in build_extension
      _build_ext.build_extension(self, ext)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 555, in build_extension
      depends=ext.depends,
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 595, in unix_wrap_ninja_compile
      with_cuda=with_cuda)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1492, in _write_ninja_file_and_compile_objects
      error_prefix='Error compiling objects for extension')
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/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: Failed building wheel for diff_gaussian_rasterization Running setup.py clean for diff_gaussian_rasterization Failed to build diff_gaussian_rasterization Installing collected packages: diff_gaussian_rasterization Running setup.py install for diff_gaussian_rasterization ... error error: subprocess-exited-with-error

× Running setup.py install for diff_gaussian_rasterization did not run successfully. │ exit code: 1 ╰─> [125 lines of output] running install /data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !!

          ********************************************************************************
          Please avoid running ``setup.py`` directly.
          Instead, use pypa/build, pypa/installer or other
          standards-based tools.

          See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
          ********************************************************************************

  !!
    self.initialize_options()
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-cpython-37
  creating build/lib.linux-x86_64-cpython-37/diff_gaussian_rasterization
  copying diff_gaussian_rasterization/__init__.py -> build/lib.linux-x86_64-cpython-37/diff_gaussian_rasterization
  running build_ext
  /data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py:820: UserWarning: There are no g++ version bounds defined for CUDA version 11.6
    warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
  building 'diff_gaussian_rasterization._C' extension
  creating /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37
  creating /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer
  Emitting ninja build file /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/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-11.6/bin/nvcc  -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.6/include -I/data/swwu/anaconda3/envs/gaussian_splatting/include/python3.7m -c -c /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/backward.cu -o /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/backward.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'"'"'' -I/data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
  FAILED: /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/backward.o
  /usr/local/cuda-11.6/bin/nvcc  -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.6/include -I/data/swwu/anaconda3/envs/gaussian_splatting/include/python3.7m -c -c /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/backward.cu -o /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/backward.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'"'"'' -I/data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
  In file included from /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/backward.cu:12:
  /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/backward.h:19:10: fatal error: glm/glm.hpp: No such file or directory
     19 | #include <glm/glm.hpp>
        |          ^~~~~~~~~~~~~
  compilation terminated.
  [2/5] /usr/local/cuda-11.6/bin/nvcc  -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.6/include -I/data/swwu/anaconda3/envs/gaussian_splatting/include/python3.7m -c -c /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/forward.cu -o /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/forward.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'"'"'' -I/data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
  FAILED: /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/forward.o
  /usr/local/cuda-11.6/bin/nvcc  -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.6/include -I/data/swwu/anaconda3/envs/gaussian_splatting/include/python3.7m -c -c /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/forward.cu -o /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/forward.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'"'"'' -I/data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
  In file included from /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/forward.cu:12:
  /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/forward.h:19:10: fatal error: glm/glm.hpp: No such file or directory
     19 | #include <glm/glm.hpp>
        |          ^~~~~~~~~~~~~
  compilation terminated.
  [3/5] /usr/local/cuda-11.6/bin/nvcc  -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.6/include -I/data/swwu/anaconda3/envs/gaussian_splatting/include/python3.7m -c -c /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/rasterizer_impl.cu -o /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/rasterizer_impl.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'"'"'' -I/data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
  FAILED: /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/rasterizer_impl.o
  /usr/local/cuda-11.6/bin/nvcc  -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.6/include -I/data/swwu/anaconda3/envs/gaussian_splatting/include/python3.7m -c -c /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/rasterizer_impl.cu -o /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/cuda_rasterizer/rasterizer_impl.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'"'"'' -I/data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
  /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/cuda_rasterizer/rasterizer_impl.cu:23:10: fatal error: glm/glm.hpp: No such file or directory
     23 | #include <glm/glm.hpp>
        |          ^~~~~~~~~~~~~
  compilation terminated.
  [4/5] c++ -MMD -MF /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/ext.o.d -pthread -B /data/swwu/anaconda3/envs/gaussian_splatting/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.6/include -I/data/swwu/anaconda3/envs/gaussian_splatting/include/python3.7m -c -c /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/ext.cpp -o /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/ext.o -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 -std=c++14
  cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
  [5/5] /usr/local/cuda-11.6/bin/nvcc  -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/TH -I/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/THC -I/usr/local/cuda-11.6/include -I/data/swwu/anaconda3/envs/gaussian_splatting/include/python3.7m -c -c /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/rasterize_points.cu -o /data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-37/rasterize_points.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'"'"'' -I/data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/third_party/glm/ -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_86,code=compute_86 -gencode=arch=compute_86,code=sm_86 -std=c++14
  /data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/c10/core/SymInt.h(84): warning #68-D: integer conversion resulted in a change of sign

  /data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/include/c10/core/SymInt.h(84): warning #68-D: integer conversion resulted in a change of sign

  ninja: build stopped: subcommand failed.
  Traceback (most recent call last):
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1814, in _run_ninja_build
      env=env)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/subprocess.py", line 512, 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 36, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/data/swwu/gaussian-splatting/submodules/diff-gaussian-rasterization/setup.py", line 32, in <module>
      'build_ext': BuildExtension
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/__init__.py", line 103, in setup
      return distutils.core.setup(**attrs)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/dist.py", line 963, in run_command
      super().run_command(command)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/command/install.py", line 78, in run
      return orig.install.run(self)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/install.py", line 697, in run
      self.run_command('build')
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/dist.py", line 963, in run_command
      super().run_command(command)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build.py", line 131, in run
      self.run_command(cmd_name)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
      self.distribution.run_command(command)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/dist.py", line 963, in run_command
      super().run_command(command)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
      cmd_obj.run()
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 88, in run
      _build_ext.run(self)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run
      self.build_extensions()
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 765, in build_extensions
      build_ext.build_extensions(self)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions
      self._build_extensions_serial()
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial
      self.build_extension(ext)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/command/build_ext.py", line 249, in build_extension
      _build_ext.build_extension(self, ext)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/setuptools/_distutils/command/build_ext.py", line 555, in build_extension
      depends=ext.depends,
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 595, in unix_wrap_ninja_compile
      with_cuda=with_cuda)
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1492, in _write_ninja_file_and_compile_objects
      error_prefix='Error compiling objects for extension')
    File "/data/swwu/anaconda3/envs/gaussian_splatting/lib/python3.7/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: legacy-install-failure

× Encountered error while trying to install package. ╰─> diff_gaussian_rasterization

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

ZiqianHuan9 commented 10 months ago
conda activate gaussian_splatting_test
export CPLUS_INCLUDE_PATH=/code-path/third_party/glm:$CPLUS_INCLUDE_PATH
export C_INCLUDE_PATH=/path/to/glm:$C_INCLUDE_PATH/code-path/third_party/glm:$C_INCLUDE_PATH

I encountered the same issue when I try to install this. I found after downloading GLM, need to include its path. I tired to run these lines to add the path of the glm package, this method works for me.

Snosixtyboo commented 9 months ago

Hi,

the error message states that you don't have GLM. Make sure you have all the submodules checked out, e.g., by following the README and cloning the repo with --recursive. Hth!

NagabhushanSN24 commented 4 months ago

Installing libglm-dev helped me (Ubuntu 20.04)

sudo apt-get install libglm-dev

Reference: https://github.com/mocapNCTU/UI_Pangolin/issues/1#issuecomment-282993404