gsplat icon indicating copy to clipboard operation
gsplat copied to clipboard

Long errors install gsplat

Open 7yzx opened this issue 1 year ago • 1 comments

I clone this repo and use pip install -e . , then I get very very long logs(or errors, I don't know) are shown below, I find the key maybe

    ninja: build stopped: subcommand failed.
    Traceback (most recent call last):
      File "D:\Software\Miniforge3\envs\nerfstudio2\lib\site-packages\torch\utils\cpp_extension.py", line 1893, in _run_ninja_build
        subprocess.run(
      File "D:\Software\Miniforge3\envs\nerfstudio2\lib\subprocess.py", line 516, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['ninja', '-v', '-j', '10']' returned non-zero exit status 1.

but I have installed ninja , and ninja --version is 1.11.1.git.kitware.jobserver-1. I'm confused about these , and cannot find a solution, need help

image image image image image not all ,just a part of them.

7yzx avatar Jul 30 '24 08:07 7yzx

It looks like all of these are warnings, can you show the very end of the message where the error is?

kerrj avatar Aug 05 '24 17:08 kerrj

The same problem is encountered,have you solved it?

PolarisKyle avatar Sep 03 '24 06:09 PolarisKyle

Same problem. Have you resolved it yet?

luh-j avatar Sep 15 '24 01:09 luh-j

No, I used windows10 and 1080ti encounter this error, but I used ubuntu22 and 1080ti ,it told me the gpu cannot compile this, maybe the gpu version is old and can’t do this. 4090ti is ok

------------------ Original ------------------ From: luh-j @.> Date: Sun,Sep 15,2024 9:14 AM To: nerfstudio-project/gsplat @.> Cc: YeZixiao @.>, Author @.> Subject: Re: [nerfstudio-project/gsplat] Long errors install gsplat (Issue#307)

7yzx avatar Sep 15 '24 01:09 7yzx

I'm on ubuntu 22.04 and a5000 and it throws the same error. But I do notice that

In file included from /mnt/data1/home/xsun90/gsplat/gsplat/cuda_legacy/csrc/bindings.cu:4:
    /mnt/data1/home/xsun90/gsplat/gsplat/cuda_legacy/csrc/helpers.cuh:2:10: fatal error: glm/glm.hpp: No such file or directory
        2 | #include <glm/glm.hpp>
          |          ^~~~~~~~~~~~~
    compilation terminated.
    [4/4] c++ -MMD -MF /mnt/data1/home/xsun90/gsplat/build/temp.linux-x86_64-cpython-38/gsplat/cuda_legacy/csrc/ext.o.d -pthread -B /home/xsun90/miniconda3/envs/nerfstudio/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Igsplat/cuda/csrc -I/mnt/data1/home/xsun90/gsplat/gsplat/cuda/csrc/third_party/glm -I/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/include -I/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/include/TH -I/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/include/THC -I/home/xsun90/miniconda3/envs/nerfstudio/include -I/home/xsun90/miniconda3/envs/nerfstudio/include/python3.8 -c -c /mnt/data1/home/xsun90/gsplat/gsplat/cuda_legacy/csrc/ext.cpp -o /mnt/data1/home/xsun90/gsplat/build/temp.linux-x86_64-cpython-38/gsplat/cuda_legacy/csrc/ext.o -O3 -Wno-sign-compare -DAT_PARALLEL_OPENMP -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=csrc_legacy -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
    cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    ninja: build stopped: subcommand failed.
    Traceback (most recent call last):
      File "/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 2100, in _run_ninja_build
        subprocess.run(
      File "/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/subprocess.py", line 516, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['ninja', '-v', '-j', '10']' returned non-zero exit status 1.
    
    The above exception was the direct cause of the following exception:

There's a line saying that glm.hpp: no such file or directory. Did you also get a similar error message before?

luh-j avatar Sep 15 '24 01:09 luh-j

I'm on ubuntu 22.04 and a5000 and it throws the same error. But I do notice that

In file included from /mnt/data1/home/xsun90/gsplat/gsplat/cuda_legacy/csrc/bindings.cu:4:
    /mnt/data1/home/xsun90/gsplat/gsplat/cuda_legacy/csrc/helpers.cuh:2:10: fatal error: glm/glm.hpp: No such file or directory
        2 | #include <glm/glm.hpp>
          |          ^~~~~~~~~~~~~
    compilation terminated.
    [4/4] c++ -MMD -MF /mnt/data1/home/xsun90/gsplat/build/temp.linux-x86_64-cpython-38/gsplat/cuda_legacy/csrc/ext.o.d -pthread -B /home/xsun90/miniconda3/envs/nerfstudio/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Igsplat/cuda/csrc -I/mnt/data1/home/xsun90/gsplat/gsplat/cuda/csrc/third_party/glm -I/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/include -I/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/include/TH -I/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/include/THC -I/home/xsun90/miniconda3/envs/nerfstudio/include -I/home/xsun90/miniconda3/envs/nerfstudio/include/python3.8 -c -c /mnt/data1/home/xsun90/gsplat/gsplat/cuda_legacy/csrc/ext.cpp -o /mnt/data1/home/xsun90/gsplat/build/temp.linux-x86_64-cpython-38/gsplat/cuda_legacy/csrc/ext.o -O3 -Wno-sign-compare -DAT_PARALLEL_OPENMP -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=csrc_legacy -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
    cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    ninja: build stopped: subcommand failed.
    Traceback (most recent call last):
      File "/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 2100, in _run_ninja_build
        subprocess.run(
      File "/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/subprocess.py", line 516, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['ninja', '-v', '-j', '10']' returned non-zero exit status 1.
    
    The above exception was the direct cause of the following exception:

There's a line saying that glm.hpp: no such file or directory. Did you also get a similar error message before?

No, I didn't encounter such an error. It looks like missing some installation of glm, try sudo apt-get install libglm-dev

7yzx avatar Sep 15 '24 01:09 7yzx

I'm on ubuntu 22.04 and a5000 and it throws the same error. But I do notice that

In file included from /mnt/data1/home/xsun90/gsplat/gsplat/cuda_legacy/csrc/bindings.cu:4:
    /mnt/data1/home/xsun90/gsplat/gsplat/cuda_legacy/csrc/helpers.cuh:2:10: fatal error: glm/glm.hpp: No such file or directory
        2 | #include <glm/glm.hpp>
          |          ^~~~~~~~~~~~~
    compilation terminated.
    [4/4] c++ -MMD -MF /mnt/data1/home/xsun90/gsplat/build/temp.linux-x86_64-cpython-38/gsplat/cuda_legacy/csrc/ext.o.d -pthread -B /home/xsun90/miniconda3/envs/nerfstudio/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Igsplat/cuda/csrc -I/mnt/data1/home/xsun90/gsplat/gsplat/cuda/csrc/third_party/glm -I/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/include -I/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/include/torch/csrc/api/include -I/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/include/TH -I/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/include/THC -I/home/xsun90/miniconda3/envs/nerfstudio/include -I/home/xsun90/miniconda3/envs/nerfstudio/include/python3.8 -c -c /mnt/data1/home/xsun90/gsplat/gsplat/cuda_legacy/csrc/ext.cpp -o /mnt/data1/home/xsun90/gsplat/build/temp.linux-x86_64-cpython-38/gsplat/cuda_legacy/csrc/ext.o -O3 -Wno-sign-compare -DAT_PARALLEL_OPENMP -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=csrc_legacy -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++17
    cc1plus: warning: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    ninja: build stopped: subcommand failed.
    Traceback (most recent call last):
      File "/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/site-packages/torch/utils/cpp_extension.py", line 2100, in _run_ninja_build
        subprocess.run(
      File "/home/xsun90/miniconda3/envs/nerfstudio/lib/python3.8/subprocess.py", line 516, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['ninja', '-v', '-j', '10']' returned non-zero exit status 1.
    
    The above exception was the direct cause of the following exception:

There's a line saying that glm.hpp: no such file or directory. Did you also get a similar error message before?

CC https://github.com/nerfstudio-project/gsplat/issues/403#issuecomment-2351460260.

npurson avatar Sep 18 '24 08:09 npurson

Closing this issue because we now provide prebuilt wheels. Please checkout the latest README

liruilong940607 avatar Sep 27 '24 07:09 liruilong940607

Hi @liruilong940607 ,

I went through several attempts to install properly my environment for Nerfstudio (Win10) and all my failures with weird import messages and other complicated issues probably caused by these two major facts:

  1. Windows guide recommends install python=3.8 and I was installing python=3.11
  2. Only wheels for python=3.10 are provided here I suspect that the mismatch between python version I initialize my environment from and available wheels leads to the problem that gsplat binaries are not there (see this message), but it pops up as a bit cryptic import failure message. Related to from gsplat import crsc as _C line. The gsplat win installation documentation page says that wheels are provided and you need just take care of pytorch and cuda specified properly there. But it doesn't say that actually only python=3.10 wheels are provided.

I think I would like to summarize all type of errors I went through into some sort of updated win guide. Pages with relevant errors:

  • https://github.com/nerfstudio-project/nerfstudio/issues/3313
  • https://github.com/nerfstudio-project/gsplat/issues/327
  • https://github.com/nerfstudio-project/nerfstudio/issues/2727
  • https://github.com/nerfstudio-project/gsplat/issues/311

I've documented the whole installation process and I suggest to unify this guide (which is extremely important actually) written for Win11 with my experience running it for Win10 and with a couple other important additions and update Windows installation guide. What do you think?

ishipachev avatar May 03 '25 19:05 ishipachev

@ishipachev yeah our win installation page is quite out dated. fell free to PR an update on the instructions! that would be helpful!

liruilong940607 avatar May 04 '25 05:05 liruilong940607