ashawkey/RAD-NeRF

Did any body have this problem about :bash scripts/install_ext.sh?

XiaoYuanJun-zy opened this issue · 2 comments

Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Processing ./freqencoder
Preparing metadata (setup.py) ... done
Building wheels for collected packages: freqencoder
Building wheel for freqencoder (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [90 lines of output]
running bdist_wheel
running build
running build_ext
/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/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 'freqencoder' extension
creating /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/build
creating /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/build/temp.linux-x86_64-3.9
creating /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/build/temp.linux-x86_64-3.9/sdc
creating /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/build/temp.linux-x86_64-3.9/sdc/home
creating /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/build/temp.linux-x86_64-3.9/sdc/home/zhaoyuan
creating /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/build/temp.linux-x86_64-3.9/sdc/home/zhaoyuan/download
creating /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/build/temp.linux-x86_64-3.9/sdc/home/zhaoyuan/download/RAD-NeRF-main
creating /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/build/temp.linux-x86_64-3.9/sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder
creating /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/build/temp.linux-x86_64-3.9/sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/src
Emitting ninja build file /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/build/temp.linux-x86_64-3.9/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 /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/build/temp.linux-x86_64-3.9/sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/src/bindings.o.d -pthread -B /sdc/home/zhaoyuan/anaconda3/envs/geneface2/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /sdc/home/zhaoyuan/anaconda3/envs/geneface2/include -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/include -fPIC -O2 -isystem /sdc/home/zhaoyuan/anaconda3/envs/geneface2/include -fPIC -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/include -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/include/TH -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/include/THC -I/sdc/home/zhaoyuan/CUDA/include -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/include/python3.9 -c -c /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/src/bindings.cpp -o /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/build/temp.linux-x86_64-3.9/sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/src/bindings.o -O3 -std=c++14 -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1013"' -DTORCH_EXTENSION_NAME=freqencoder -D_GLIBCXX_USE_CXX11_ABI=0
[2/2] /sdc/home/zhaoyuan/CUDA/bin/nvcc -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/include -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/include/TH -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/include/THC -I/sdc/home/zhaoyuan/CUDA/include -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/include/python3.9 -c -c /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/src/freqencoder.cu -o /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/build/temp.linux-x86_64-3.9/sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/src/freqencoder.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__ -use_fast_math -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="gcc"' '-DPYBIND11_STDLIB="libstdcpp"' '-DPYBIND11_BUILD_ABI="cxxabi1013"' -DTORCH_EXTENSION_NAME=freqencoder -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80
FAILED: /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/build/temp.linux-x86_64-3.9/sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/src/freqencoder.o
/sdc/home/zhaoyuan/CUDA/bin/nvcc -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/include -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/include/TH -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/include/THC -I/sdc/home/zhaoyuan/CUDA/include -I/sdc/home/zhaoyuan/anaconda3/envs/geneface2/include/python3.9 -c -c /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/src/freqencoder.cu -o /sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/build/temp.linux-x86_64-3.9/sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/src/freqencoder.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__ -use_fast_math -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1013"' -DTORCH_EXTENSION_NAME=_freqencoder -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_80,code=compute_80 -gencode=arch=compute_80,code=sm_80
/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/include/c10/core/SymInt.h(84): warning #68-D: integer conversion resulted in a change of sign

  /sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/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 "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1808, in _run_ninja_build
      subprocess.run(
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/subprocess.py", line 528, 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 "/sdc/home/zhaoyuan/download/RAD-NeRF-main/freqencoder/setup.py", line 33, in <module>
      setup(
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 364, in run
      self.run_command("build")
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 79, in run
      _build_ext.run(self)
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/distutils/command/build_ext.py", line 340, in run
      self.build_extensions()
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 765, in build_extensions
      build_ext.build_extensions(self)
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/distutils/command/build_ext.py", line 449, in build_extensions
      self._build_extensions_serial()
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/distutils/command/build_ext.py", line 474, in _build_extensions_serial
      self.build_extension(ext)
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/setuptools/command/build_ext.py", line 202, in build_extension
      _build_ext.build_extension(self, ext)
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/distutils/command/build_ext.py", line 529, in build_extension
      objects = self.compiler.compile(sources,
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 586, in unix_wrap_ninja_compile
      _write_ninja_file_and_compile_objects(
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1487, in _write_ninja_file_and_compile_objects
      _run_ninja_build(
    File "/sdc/home/zhaoyuan/anaconda3/envs/geneface2/lib/python3.9/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 freqencoder
Running setup.py clean for freqencoder
Failed to build freqencoder
ERROR: Could not build wheels for freqencoder, which is required to install pyproject.toml-based projects
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Processing ./shencoder
Preparing metadata (setup.py) ... done
Building wheels for collected packages: shencoder
Building wheel for shencoder (setup.py) ... |^Z
[3]+ Stopped bash scripts/install_ext.sh

@XiaoYuanJun-zy

I faced the same issue, and I fixed it by changing the environment settings.
You could try different versions of CUDA and Python, and also check the gcc/g++ version to solve the problem

I fix up this problem by this article.

https://blog.csdn.net/BarryA11en/article/details/132894702

If you need to change GCC/G++ version, you can refer to this article.

https://blog.csdn.net/qq_37346140/article/details/127686966