pierotofy / OpenSplat

Production-grade 3D gaussian splatting with CPU/GPU support for Windows, Mac and Linux 🚀
https://antimatter15.com/splat/?url=https://splat.uav4geo.com/banana.splat
GNU Affero General Public License v3.0
939 stars 87 forks source link

fatal error: json.hpp: No such file or directory 2 | #include <json.hpp> #11

Closed ichsan2895 closed 9 months ago

ichsan2895 commented 9 months ago

I got error when building it

git clone https://github.com/pierotofy/OpenSplat OpenSplat
cd OpenSplat/
mkdir build && cd build
cmake -DCMAKE_PREFIX_PATH=/workspace/OPENSPLAT/libtorch .. && make -j$(nproc)

image

Using Runpod environment with this specification

Ubuntu 22.04 LTS
Python 3.10
libtorch 2.0.1+cu118
RTX A6000 with 48 GB VRAM
ichsan2895 commented 9 months ago

Well, it works when I change a bit the code

git clone --recursive https://github.com/pierotofy/OpenSplat OpenSplat
cd OpenSplat/
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=/workspace/OPENSPLAT/libtorch .. && make -j$(nproc)

image

pierotofy commented 9 months ago

Huh, strange, the project doesn't have submodules so the --recursive flag shouldn't be needed. Also the compiler should have looked in the vendor/json library for headers, but for some reason it didn't.

I have modified the code https://github.com/pierotofy/OpenSplat/commit/7c37be4941eb915cf516c0bb0ebb591ec2e80cf2 to explicitly reference the path to that library, hopefully it resolves this issue?

ichsan2895 commented 9 months ago

I have modified the code https://github.com/pierotofy/OpenSplat/commit/7c37be4941eb915cf516c0bb0ebb591ec2e80cf2 to explicitly reference the path to that library, hopefully it resolves this issue?

Huh, strange, the project doesn't have submodules so the --recursive flag shouldn't be needed. Also the compiler should have looked in the vendor/json library for headers, but for some reason it didn't.

I have modified the code 7c37be4 to explicitly reference the path to that library, hopefully it resolves this issue?

Already fixed with this command. It worked, I never touch it again :100:

git clone --recursive https://github.com/pierotofy/OpenSplat OpenSplat
cd OpenSplat/
mkdir build
cd build
cmake -DCMAKE_PREFIX_PATH=/workspace/OPENSPLAT/libtorch .. && make -j$(nproc)