ShenhanQian / VHAP

A complete head tracking pipeline from videos to NeRF/3DGS-ready datasets.
Other
66 stars 10 forks source link

subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1. #12

Open rorrewang opened 2 days ago

rorrewang commented 2 days ago

Hello, thank you very much for your excellent work, but I followed the tutorial and got an error when executing this code: python vhap/track.py --data.root_folder "data/monocular" --exp.output_folder $TRACK_OUTPUT_FOLDER --data.sequence $SEQUENCE I got error infos like:

2024-10-07 18:14:41.496835: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-10-07 18:14:41.530414: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-10-07 18:14:41.994391: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Ignoring unknown cluster teeth.
/home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/pytorch3d/ops/laplacian_matrices.py:51: UserWarning: torch.sparse.SparseTensor(indices, values, shape, *, device=) is deprecated.  Please use torch.sparse_coo_tensor(indices, values, shape, dtype=, device=). (Triggered internally at ../torch/csrc/utils/tensor_new.cpp:641.)
  A = torch.sparse.FloatTensor(idx, ones, (V, V))
/home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/utils/cpp_extension.py:1965: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation. 
If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
  warnings.warn(
Traceback (most recent call last):
  File "/home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 2105, in _run_ninja_build
    subprocess.run(
  File "/home/wly/anaconda3/envs/vh/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 "/mnt/PC/VHAP/vhap/track.py", line 20, in <module>
    tracker = GlobalTracker(cfg)
  File "/mnt/PC/VHAP/vhap/model/tracker.py", line 1325, in __init__
    super().__init__(cfg)
  File "/mnt/PC/VHAP/vhap/model/tracker.py", line 68, in __init__
    self.render = NVDiffRenderer(
  File "/mnt/PC/VHAP/vhap/util/render_nvdiffrast.py", line 72, in __init__
    self.glctx = dr.RasterizeGLContext() if use_opengl else dr.RasterizeCudaContext()
  File "/home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/torch/ops.py", line 228, in __init__
    self.cpp_wrapper = _get_plugin(gl=True).RasterizeGLStateWrapper(output_db, mode == 'automatic', cuda_device_idx)
  File "/home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/torch/ops.py", line 125, in _get_plugin
    torch.utils.cpp_extension.load(name=plugin_name, sources=source_paths, extra_cflags=common_opts+cc_opts, extra_cuda_cflags=common_opts+['-lineinfo'], extra_ldflags=ldflags, with_cuda=True, verbose=False)
  File "/home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1312, in load
    return _jit_compile(
  File "/home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1722, in _jit_compile
    _write_ninja_file_and_build_library(
  File "/home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1834, in _write_ninja_file_and_build_library
    _run_ninja_build(
  File "/home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 2121, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error building extension 'nvdiffrast_plugin_gl': [1/4] c++ -MMD -MF rasterize_gl.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/TH -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/THC -isystem /home/wly/anaconda3/envs/VHAP/include -isystem /home/wly/anaconda3/envs/vh/include/python3.9 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -DNVDR_TORCH -c /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/common/rasterize_gl.cpp -o rasterize_gl.o 
FAILED: rasterize_gl.o 
c++ -MMD -MF rasterize_gl.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/TH -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/THC -isystem /home/wly/anaconda3/envs/VHAP/include -isystem /home/wly/anaconda3/envs/vh/include/python3.9 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -DNVDR_TORCH -c /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/common/rasterize_gl.cpp -o rasterize_gl.o 
In file included from /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/common/rasterize_gl.h:16,
                 from /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/common/rasterize_gl.cpp:9:
/home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/common/glutil.h:36:10: fatal error: EGL/egl.h: 没有那个文件或目录
   36 | #include <EGL/egl.h>
      |          ^~~~~~~~~~~
compilation terminated.
[2/4] c++ -MMD -MF glutil.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/TH -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/THC -isystem /home/wly/anaconda3/envs/VHAP/include -isystem /home/wly/anaconda3/envs/vh/include/python3.9 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -DNVDR_TORCH -c /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/common/glutil.cpp -o glutil.o 
FAILED: glutil.o 
c++ -MMD -MF glutil.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/TH -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/THC -isystem /home/wly/anaconda3/envs/VHAP/include -isystem /home/wly/anaconda3/envs/vh/include/python3.9 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -DNVDR_TORCH -c /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/common/glutil.cpp -o glutil.o 
In file included from /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/common/glutil.cpp:14:
/home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/common/glutil.h:36:10: fatal error: EGL/egl.h: 没有那个文件或目录
   36 | #include <EGL/egl.h>
      |          ^~~~~~~~~~~
compilation terminated.
[3/4] c++ -MMD -MF torch_rasterize_gl.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/TH -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/THC -isystem /home/wly/anaconda3/envs/VHAP/include -isystem /home/wly/anaconda3/envs/vh/include/python3.9 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -DNVDR_TORCH -c /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/torch/torch_rasterize_gl.cpp -o torch_rasterize_gl.o 
FAILED: torch_rasterize_gl.o 
c++ -MMD -MF torch_rasterize_gl.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/TH -isystem /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/torch/include/THC -isystem /home/wly/anaconda3/envs/VHAP/include -isystem /home/wly/anaconda3/envs/vh/include/python3.9 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -DNVDR_TORCH -c /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/torch/torch_rasterize_gl.cpp -o torch_rasterize_gl.o 
In file included from /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/torch/../common/rasterize_gl.h:16,
                 from /home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/torch/torch_rasterize_gl.cpp:12:
/home/wly/anaconda3/envs/vh/lib/python3.9/site-packages/nvdiffrast/torch/../common/glutil.h:36:10: fatal error: EGL/egl.h: 没有那个文件或目录
   36 | #include <EGL/egl.h>
      |          ^~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.

And:

2024-10-07 18:18:11.766603: I tensorflow/core/util/port.cc:110] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-10-07 18:18:11.800357: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-10-07 18:18:12.268259: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Ignoring unknown cluster teeth.
/home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/pytorch3d/ops/laplacian_matrices.py:51: UserWarning: torch.sparse.SparseTensor(indices, values, shape, *, device=) is deprecated.  Please use torch.sparse_coo_tensor(indices, values, shape, dtype=, device=). (Triggered internally at ../torch/csrc/utils/tensor_new.cpp:641.)
  A = torch.sparse.FloatTensor(idx, ones, (V, V))
/home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/utils/cpp_extension.py:1965: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation. 
If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
  warnings.warn(
Traceback (most recent call last):
  File "/home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2105, in _run_ninja_build
    subprocess.run(
  File "/home/wly/anaconda3/envs/VHAP/lib/python3.10/subprocess.py", line 526, 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 "/mnt/PC/VHAP/vhap/track.py", line 20, in <module>
    tracker = GlobalTracker(cfg)
  File "/mnt/PC/VHAP/vhap/model/tracker.py", line 1325, in __init__
    super().__init__(cfg)
  File "/mnt/PC/VHAP/vhap/model/tracker.py", line 68, in __init__
    self.render = NVDiffRenderer(
  File "/mnt/PC/VHAP/vhap/util/render_nvdiffrast.py", line 72, in __init__
    self.glctx = dr.RasterizeGLContext() if use_opengl else dr.RasterizeCudaContext()
  File "/home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/torch/ops.py", line 228, in __init__
    self.cpp_wrapper = _get_plugin(gl=True).RasterizeGLStateWrapper(output_db, mode == 'automatic', cuda_device_idx)
  File "/home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/torch/ops.py", line 125, in _get_plugin
    torch.utils.cpp_extension.load(name=plugin_name, sources=source_paths, extra_cflags=common_opts+cc_opts, extra_cuda_cflags=common_opts+['-lineinfo'], extra_ldflags=ldflags, with_cuda=True, verbose=False)
  File "/home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1312, in load
    return _jit_compile(
  File "/home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1722, in _jit_compile
    _write_ninja_file_and_build_library(
  File "/home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1834, in _write_ninja_file_and_build_library
    _run_ninja_build(
  File "/home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 2121, in _run_ninja_build
    raise RuntimeError(message) from e
RuntimeError: Error building extension 'nvdiffrast_plugin_gl': [1/6] /home/wly/anaconda3/envs/VHAP/bin/x86_64-conda-linux-gnu-c++ -MMD -MF common.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/TH -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/THC -isystem /home/wly/anaconda3/envs/VHAP/include -isystem /home/wly/anaconda3/envs/VHAP/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -DNVDR_TORCH -c /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/common/common.cpp -o common.o 
[2/6] /home/wly/anaconda3/envs/VHAP/bin/x86_64-conda-linux-gnu-c++ -MMD -MF torch_rasterize_gl.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/TH -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/THC -isystem /home/wly/anaconda3/envs/VHAP/include -isystem /home/wly/anaconda3/envs/VHAP/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -DNVDR_TORCH -c /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/torch/torch_rasterize_gl.cpp -o torch_rasterize_gl.o 
FAILED: torch_rasterize_gl.o 
/home/wly/anaconda3/envs/VHAP/bin/x86_64-conda-linux-gnu-c++ -MMD -MF torch_rasterize_gl.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/TH -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/THC -isystem /home/wly/anaconda3/envs/VHAP/include -isystem /home/wly/anaconda3/envs/VHAP/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -DNVDR_TORCH -c /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/torch/torch_rasterize_gl.cpp -o torch_rasterize_gl.o 
In file included from /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/torch/../common/rasterize_gl.h:16,
                 from /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/torch/torch_rasterize_gl.cpp:12:
/home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/torch/../common/glutil.h:36:10: fatal error: EGL/egl.h: No such file or directory
   36 | #include <EGL/egl.h>
      |          ^~~~~~~~~~~
compilation terminated.
[3/6] /home/wly/anaconda3/envs/VHAP/bin/x86_64-conda-linux-gnu-c++ -MMD -MF glutil.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/TH -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/THC -isystem /home/wly/anaconda3/envs/VHAP/include -isystem /home/wly/anaconda3/envs/VHAP/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -DNVDR_TORCH -c /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/common/glutil.cpp -o glutil.o 
FAILED: glutil.o 
/home/wly/anaconda3/envs/VHAP/bin/x86_64-conda-linux-gnu-c++ -MMD -MF glutil.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/TH -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/THC -isystem /home/wly/anaconda3/envs/VHAP/include -isystem /home/wly/anaconda3/envs/VHAP/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -DNVDR_TORCH -c /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/common/glutil.cpp -o glutil.o 
In file included from /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/common/glutil.cpp:14:
/home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/common/glutil.h:36:10: fatal error: EGL/egl.h: No such file or directory
   36 | #include <EGL/egl.h>
      |          ^~~~~~~~~~~
compilation terminated.
[4/6] /home/wly/anaconda3/envs/VHAP/bin/x86_64-conda-linux-gnu-c++ -MMD -MF rasterize_gl.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/TH -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/THC -isystem /home/wly/anaconda3/envs/VHAP/include -isystem /home/wly/anaconda3/envs/VHAP/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -DNVDR_TORCH -c /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/common/rasterize_gl.cpp -o rasterize_gl.o 
FAILED: rasterize_gl.o 
/home/wly/anaconda3/envs/VHAP/bin/x86_64-conda-linux-gnu-c++ -MMD -MF rasterize_gl.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/TH -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/THC -isystem /home/wly/anaconda3/envs/VHAP/include -isystem /home/wly/anaconda3/envs/VHAP/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -DNVDR_TORCH -c /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/common/rasterize_gl.cpp -o rasterize_gl.o 
In file included from /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/common/rasterize_gl.h:16,
                 from /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/common/rasterize_gl.cpp:9:
/home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/common/glutil.h:36:10: fatal error: EGL/egl.h: No such file or directory
   36 | #include <EGL/egl.h>
      |          ^~~~~~~~~~~
compilation terminated.
[5/6] /home/wly/anaconda3/envs/VHAP/bin/x86_64-conda-linux-gnu-c++ -MMD -MF torch_bindings_gl.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin_gl -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE=\"_gcc\" -DPYBIND11_STDLIB=\"_libstdcpp\" -DPYBIND11_BUILD_ABI=\"_cxxabi1011\" -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/TH -isystem /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/torch/include/THC -isystem /home/wly/anaconda3/envs/VHAP/include -isystem /home/wly/anaconda3/envs/VHAP/include/python3.10 -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++17 -DNVDR_TORCH -c /home/wly/anaconda3/envs/VHAP/lib/python3.10/site-packages/nvdiffrast/torch/torch_bindings_gl.cpp -o torch_bindings_gl.o 
ninja: build stopped: subcommand failed.

When I run ninja -v ,I got output like:

/mnt/PC/VHAP$ ninja -v
ninja: error: loading 'build.ninja': No such file or directory

Is this a problem with my machine? I have tried many ways to solve this, such as run: pip install ninja sudo apt-get install ninja-build sudo apt install generate-ninja But I still can't solve this problem, could you please give me some advice?Thanks a lot!

ShenhanQian commented 2 days ago

Seems to be the same problem here.