OpenSplat icon indicating copy to clipboard operation
OpenSplat copied to clipboard

Installation issues

Open briancantwe opened this issue 11 months ago • 7 comments

Hello! Working through the installation on a CUDA machine and WSL/Ubuntu 2204.3 on WIndows 11 and getting tripped up during the cmake command in the readme.

I followed the Build (CUDA) steps in the readme, ending here with the last command:

(opensplat) proclocal@PROC66:/mnt/c/Users/PROCLOCAL/Documents/github/opensplat/build$ cmake -DCMAKE_PREFIX_PATH=$PWD/libtorch ..  && make -j$(nproc)
-- Found CUDAToolkit: /usr/include (found version "11.5.119")
-- Found CUDAToolkit: /usr/include (found version "11.5.119")
-- Caffe2: CUDA detected: 11.5
-- Caffe2: CUDA nvcc is: /usr/bin/nvcc
-- Caffe2: CUDA toolkit directory: /usr
-- Caffe2: Header version is: 11.5
-- /usr/lib/x86_64-linux-gnu/libnvrtc.so shorthash is 65f2c18b
-- USE_CUDNN is set to 0. Compiling without cuDNN support
-- USE_CUSPARSELT is set to 0. Compiling without cuSPARSELt support
-- Autodetected CUDA architecture(s):  7.5 7.5
-- Added CUDA NVCC flags for: -gencode;arch=compute_75,code=sm_75
CMake Warning at /mnt/c/Users/PROCLOCAL/Documents/GitHub/OpenSplat/build/libtorch/share/cmake/Torch/TorchConfig.cmake:22 (message):
  static library c10_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /mnt/c/Users/PROCLOCAL/Documents/GitHub/OpenSplat/build/libtorch/share/cmake/Torch/TorchConfig.cmake:70 (append_torchlib_if_found)
  CMakeLists.txt:51 (find_package)


CMake Warning at /mnt/c/Users/PROCLOCAL/Documents/GitHub/OpenSplat/build/libtorch/share/cmake/Torch/TorchConfig.cmake:22 (message):
  static library kineto_LIBRARY-NOTFOUND not found.
Call Stack (most recent call first):
  /mnt/c/Users/PROCLOCAL/Documents/GitHub/OpenSplat/build/libtorch/share/cmake/Torch/TorchConfig.cmake:127 (append_torchlib_if_found)
  CMakeLists.txt:51 (find_package)

CMake Error at /snap/cmake/1366/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Torch (missing: TORCH_LIBRARY)
Call Stack (most recent call first):
  /snap/cmake/1366/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /mnt/c/Users/PROCLOCAL/Documents/GitHub/OpenSplat/build/libtorch/share/cmake/Torch/TorchConfig.cmake:190 (find_package_handle_standard_args)
  CMakeLists.txt:51 (find_package)


-- Configuring incomplete, errors occurred!

Any insight?

Thanks!

briancantwe avatar Mar 20 '24 18:03 briancantwe

Looks like it's not finding libtorch. Is libtorch actually in /mnt/c/Users/PROCLOCAL/Documents/github/opensplat/build/libtorch? I wouldn't recommend putting libtorch in the build directory.

pierotofy avatar Mar 20 '24 19:03 pierotofy

Ah yes it was. (I tied copying it a few places to see if anything changed.)

I moved it out of the build dir. But I still get the same error as above when I run this command too:

(opensplat) proclocal@PROC66/mnt/c/Users/PROCLOCAL/Documents/github/opensplat/build$ cmake -DCMAKE_PREFIX_PATH=/mnt/c/users/proclocal/documents/github/opensplat/libtorch .. && make -j$(nproc)

Maybe I messed something else up. After I downloaded the libtorch .zip file from pytorch.org, I unzipped it, and pointed DCMAKE_PREFIX_PATH to the libtorch directory it contained. Is that the right thing to have done?

Thanks!

briancantwe avatar Mar 20 '24 19:03 briancantwe

You might need to look into this: "static library c10_LIBRARY-NOTFOUND not found."

It might have to do with the WSL environment, but I'm not sure.

OpenSplat runs natively on Windows, I would recommend to compile natively as an alternative.

pierotofy avatar Mar 20 '24 19:03 pierotofy

Ok, great, moving over to Windows. What are the corresponding installation instructions for libopencv-dev on Windows?

briancantwe avatar Mar 20 '24 21:03 briancantwe

This comment might help: https://github.com/pierotofy/OpenSplat/issues/3#issuecomment-1962344524

pierotofy avatar Mar 20 '24 21:03 pierotofy

Or you can use this Windows build action as a reference

pfxuan avatar Mar 20 '24 21:03 pfxuan

The #3 comment thread did the trick. All set up now, thank you!

briancantwe avatar Mar 20 '24 21:03 briancantwe