ashawkey / stable-dreamfusion

Text-to-3D & Image-to-3D & Mesh Exportation with NeRF + Diffusion.
Apache License 2.0
8k stars 710 forks source link

"pip install ./raymarching" build fails #56

Open varoudis opened 1 year ago

varoudis commented 1 year ago

Anyone had a similar fail to build? Clean Ubuntu 2204 with nvidia-470 drivers and base 22-4 cuda toolkit.

~/Downloads/stable-dreamfusion$ pip install ./raymarching
Processing ./raymarching
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: raymarching
  Building wheel for raymarching (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [92 lines of output]
      running bdist_wheel
      running build
      running build_ext
      /home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/utils/cpp_extension.py:813: UserWarning: The detected CUDA version (11.5) has a minor version mismatch with the version that was used to compile PyTorch (11.6). Most likely this shouldn't be a problem.
        warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
      /home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/utils/cpp_extension.py:820: UserWarning: There are no g++ version bounds defined for CUDA version 11.5
        warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
      building '_raymarching' extension
      Emitting ninja build file /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/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/bin/nvcc  -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/TH -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/THC -I/home/varoudis/miniconda3/envs/pytorch01/include/python3.10 -c -c /home/varoudis/Downloads/stable-dreamfusion/raymarching/src/raymarching.cu -o /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/home/varoudis/Downloads/stable-dreamfusion/raymarching/src/raymarching.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 -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=_raymarching -D_GLIBCXX_USE_CXX11_ABI=0
      FAILED: /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/home/varoudis/Downloads/stable-dreamfusion/raymarching/src/raymarching.o
      /usr/bin/nvcc  -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/TH -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/THC -I/home/varoudis/miniconda3/envs/pytorch01/include/python3.10 -c -c /home/varoudis/Downloads/stable-dreamfusion/raymarching/src/raymarching.cu -o /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/home/varoudis/Downloads/stable-dreamfusion/raymarching/src/raymarching.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 -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=_raymarching -D_GLIBCXX_USE_CXX11_ABI=0
      /home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/c10/core/SymInt.h(84): warning #68-D: integer conversion resulted in a change of sign

      /home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/c10/core/SymInt.h(84): warning #68-D: integer conversion resulted in a change of sign

      /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
        435 |         function(_Functor&& __f)
            |                                                                                                                                                 ^
      /usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
      /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
        530 |         operator=(_Functor&& __f)
            |                                                                                                                                                  ^
      /usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
      ninja: build stopped: subcommand failed.
      Traceback (most recent call last):
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1808, in _run_ninja_build
          subprocess.run(
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/subprocess.py", line 524, 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 "/home/varoudis/Downloads/stable-dreamfusion/raymarching/setup.py", line 44, in <module>
          setup(
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_commands
          self.run_command(cmd)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
          cmd_obj.run()
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/wheel/bdist_wheel.py", line 299, in run
          self.run_command('build')
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
          cmd_obj.run()
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/command/build.py", line 24, in run
          super().run()
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
          self.run_command(cmd_name)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
          cmd_obj.run()
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 79, in run
          _build_ext.run(self)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
          self.build_extensions()
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 765, in build_extensions
          build_ext.build_extensions(self)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 466, in build_extensions
          self._build_extensions_serial()
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 492, in _build_extensions_serial
          self.build_extension(ext)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
          _build_ext.build_extension(self, ext)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 547, in build_extension
          objects = self.compiler.compile(
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 586, in unix_wrap_ninja_compile
          _write_ninja_file_and_compile_objects(
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1487, in _write_ninja_file_and_compile_objects
          _run_ninja_build(
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/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 raymarching
  Running setup.py clean for raymarching
Failed to build raymarching
Installing collected packages: raymarching
  Running setup.py install for raymarching ... error
  error: subprocess-exited-with-error

  × Running setup.py install for raymarching did not run successfully.
  │ exit code: 1
  ╰─> [105 lines of output]
      running install
      /home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_ext
      /home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/utils/cpp_extension.py:813: UserWarning: The detected CUDA version (11.5) has a minor version mismatch with the version that was used to compile PyTorch (11.6). Most likely this shouldn't be a problem.
        warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
      /home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/utils/cpp_extension.py:820: UserWarning: There are no g++ version bounds defined for CUDA version 11.5
        warnings.warn(f'There are no {compiler_name} version bounds defined for CUDA version {cuda_str_version}')
      building '_raymarching' extension
      creating /home/varoudis/Downloads/stable-dreamfusion/raymarching/build
      creating /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310
      creating /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/home
      creating /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/home/varoudis
      creating /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/home/varoudis/Downloads
      creating /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/home/varoudis/Downloads/stable-dreamfusion
      creating /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/home/varoudis/Downloads/stable-dreamfusion/raymarching
      creating /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/home/varoudis/Downloads/stable-dreamfusion/raymarching/src
      Emitting ninja build file /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/build.ninja...
      Compiling objects...
      Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
      [1/2] c++ -MMD -MF /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/home/varoudis/Downloads/stable-dreamfusion/raymarching/src/bindings.o.d -pthread -B /home/varoudis/miniconda3/envs/pytorch01/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/varoudis/miniconda3/envs/pytorch01/include -fPIC -O2 -isystem /home/varoudis/miniconda3/envs/pytorch01/include -fPIC -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/TH -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/THC -I/home/varoudis/miniconda3/envs/pytorch01/include/python3.10 -c -c /home/varoudis/Downloads/stable-dreamfusion/raymarching/src/bindings.cpp -o /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/home/varoudis/Downloads/stable-dreamfusion/raymarching/src/bindings.o -O3 -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=_raymarching -D_GLIBCXX_USE_CXX11_ABI=0
      [2/2] /usr/bin/nvcc  -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/TH -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/THC -I/home/varoudis/miniconda3/envs/pytorch01/include/python3.10 -c -c /home/varoudis/Downloads/stable-dreamfusion/raymarching/src/raymarching.cu -o /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/home/varoudis/Downloads/stable-dreamfusion/raymarching/src/raymarching.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 -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=_raymarching -D_GLIBCXX_USE_CXX11_ABI=0
      FAILED: /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/home/varoudis/Downloads/stable-dreamfusion/raymarching/src/raymarching.o
      /usr/bin/nvcc  -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/TH -I/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/THC -I/home/varoudis/miniconda3/envs/pytorch01/include/python3.10 -c -c /home/varoudis/Downloads/stable-dreamfusion/raymarching/src/raymarching.cu -o /home/varoudis/Downloads/stable-dreamfusion/raymarching/build/temp.linux-x86_64-cpython-310/home/varoudis/Downloads/stable-dreamfusion/raymarching/src/raymarching.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 -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=_raymarching -D_GLIBCXX_USE_CXX11_ABI=0
      /home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/c10/core/SymInt.h(84): warning #68-D: integer conversion resulted in a change of sign

      /home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/include/c10/core/SymInt.h(84): warning #68-D: integer conversion resulted in a change of sign

      /usr/include/c++/11/bits/std_function.h:435:145: error: parameter packs not expanded with ‘...’:
        435 |         function(_Functor&& __f)
            |                                                                                                                                                 ^
      /usr/include/c++/11/bits/std_function.h:435:145: note:         ‘_ArgTypes’
      /usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
        530 |         operator=(_Functor&& __f)
            |                                                                                                                                                  ^
      /usr/include/c++/11/bits/std_function.h:530:146: note:         ‘_ArgTypes’
      ninja: build stopped: subcommand failed.
      Traceback (most recent call last):
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1808, in _run_ninja_build
          subprocess.run(
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/subprocess.py", line 524, 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 "/home/varoudis/Downloads/stable-dreamfusion/raymarching/setup.py", line 44, in <module>
          setup(
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/__init__.py", line 87, in setup
          return distutils.core.setup(**attrs)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 973, in run_commands
          self.run_command(cmd)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
          cmd_obj.run()
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/command/install.py", line 68, in run
          return orig.install.run(self)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/command/install.py", line 692, in run
          self.run_command('build')
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
          cmd_obj.run()
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/command/build.py", line 24, in run
          super().run()
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 132, in run
          self.run_command(cmd_name)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 319, in run_command
          self.distribution.run_command(command)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/dist.py", line 1217, in run_command
          super().run_command(command)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 992, in run_command
          cmd_obj.run()
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 79, in run
          _build_ext.run(self)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 346, in run
          self.build_extensions()
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 765, in build_extensions
          build_ext.build_extensions(self)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 466, in build_extensions
          self._build_extensions_serial()
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 492, in _build_extensions_serial
          self.build_extension(ext)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
          _build_ext.build_extension(self, ext)
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 547, in build_extension
          objects = self.compiler.compile(
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 586, in unix_wrap_ninja_compile
          _write_ninja_file_and_compile_objects(
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1487, in _write_ninja_file_and_compile_objects
          _run_ninja_build(
        File "/home/varoudis/miniconda3/envs/pytorch01/lib/python3.10/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.
╰─> raymarching

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

(pytorch01) varoudis@varoudis-Standard-PC-i440FX-PIIX-1996:~/Downloads/stable-dreamfusion$ ninja --version
1.10.2.git.kitware.jobserver-1

(pytorch01) varoudis@varoudis-Standard-PC-i440FX-PIIX-1996:~/Downloads/stable-dreamfusion$ gcc --version
gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(pytorch01) varoudis@varoudis-Standard-PC-i440FX-PIIX-1996:~/Downloads/stable-dreamfusion$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Thu_Nov_18_09:45:30_PST_2021
Cuda compilation tools, release 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0
bgpantojar commented 1 year ago

delete from the requirements.txt torch run: pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116 then install requirements.txt and the rest

MilesButler2019 commented 1 year ago

Installing g++ resolved this issue for me

varoudis commented 1 year ago

thank you both, Ill check it

xiazhi1 commented 1 year ago

thank you both, Ill check it

Hi , Have you solve it , I have the same issue like yours.

csawtelle commented 1 year ago

On a fresh build of ubuntu 22.04 I am seeing this same issue. Everything looks good till installing the "bash scripts/ install" step. Turns out this was a mismatch between torch and nvcc because I was using the ubuntu repo install instead of the installer from nvidia. After switching to CUDA 11.7 it worked fine.

nofreewill42 commented 1 year ago

Same issue here. Tried rm -r venv and recreating it with torch removed from requirements.txt and installed with one of these instead: pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116 pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117 But neither worked, same error :(

nofreewill42 commented 1 year ago

Okay so I had

nvcc --version -> 11.5
but
import torch; torch.__version__ -> 11.7

So I had to manually install https://developer.nvidia.com/cuda-11-7-1-download-archive?target_os=Linux&target_arch=x86_64&Distribution=Ubuntu&target_version=22.04&target_type=runfile_local

And now I have Successfully built raymarching

LauJohnC commented 9 months ago

Alright, it s been a while, but for those in the future. If you see problems like "[Ninja, -v]" or "nvcc error" (something like this), Just use gcc-10 version since CUDA11.6 is incompatiable when (gcc -v > 10) So, just use gcc-10, you will go to good apt install gcc-10 g++-10 rm /usr/bin/gcc you can totaly delete /usr/bin/gcc since it just some gcc's link (wrong version tho ln -s /usr/bin/gcc-10 /usr/bin/gcc ln -s /usr/bin/g++-10 /usr/bin/g++ You may need sudo for above

Hope this helps