gaussian-splatting icon indicating copy to clipboard operation
gaussian-splatting copied to clipboard

glog was not properly included?

Open truncs opened this issue 5 months ago • 1 comments

Stacktrace

c++ -MMD -MF /zfs/aditya/workspace/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-311/ext.o.d -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -ffat-lto-objects -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/python/src=/usr/src/debug/python -flto=auto -fPIC -I/usr/lib/python3.11/site-packages/torch/include -I/usr/lib/python3.11/site-packages/torch/include/torch/csrc/api/include -I/usr/lib/python3.11/site-packages/torch/include/TH -I/usr/lib/python3.11/site-packages/torch/include/THC -I/opt/cuda/include -I/zfs/aditya/workspace/gaussian-splatting/env/include -I/usr/include/python3.11 -c -c /zfs/aditya/workspace/gaussian-splatting/submodules/diff-gaussian-rasterization/ext.cpp -o /zfs/aditya/workspace/gaussian-splatting/submodules/diff-gaussian-rasterization/build/temp.linux-x86_64-cpython-311/ext.o -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1017"' -DTORCH_EXTENSION_NAME=_C -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++17
      In file included from /usr/include/c10/util/logging_is_google_glog.h:50,
                       from /usr/include/c10/util/Logging.h:26,
                       from /usr/include/ATen/core/ivalue_inl.h:25,
                       from /usr/include/ATen/core/ivalue.h:1551,
                       from /usr/include/ATen/core/List_inl.h:4,
                       from /usr/include/ATen/core/List.h:490,
                       from /usr/include/ATen/core/IListRef_inl.h:3,
                       from /usr/include/ATen/core/IListRef.h:631,
                       from /usr/include/ATen/WrapDimUtils.h:3,
                       from /usr/include/ATen/TensorNames.h:3,
                       from /usr/include/ATen/NamedTensorUtils.h:3,
                       from /usr/include/torch/csrc/autograd/variable.h:11,
                       from /usr/include/torch/csrc/autograd/autograd.h:3,
                       from /usr/lib/python3.11/site-packages/torch/include/torch/csrc/api/include/torch/autograd.h:3,
                       from /usr/lib/python3.11/site-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
                       from /usr/include/torch/extension.h:5,
                       from /zfs/aditya/workspace/gaussian-splatting/submodules/diff-gaussian-rasterization/ext.cpp:12:
      /usr/include/glog/logging.h:60:4: error: #error <glog/logging.h> was not included correctly. See the documention for how to consume the library.
         60 | #  error <glog/logging.h> was not included correctly. See the documention for how to consume the library.
            |    ^~~~~
      In file included from /usr/include/glog/logging.h:63:
      /usr/include/glog/flags.h:45:4: error: #error <glog/flags.h> was not included correctly. See the documention for how to consume the library.
         45 | #  error <glog/flags.h> was not included correctly. See the documention for how to consume the library.
            |    ^~~~~
      In file included from /usr/include/glog/logging.h:77:

Env

Pytorch

torch.__version__
2.2.0

CUDA

CUDA Version: 12.4

Linux Kernel

uname -a
Linux earth 6.7.9-arch1-1 #1 SMP PREEMPT_DYNAMIC 

Thoughts?

truncs avatar Mar 18 '24 19:03 truncs

i got around this issue by modifying my /usr/include/c10/util/Logging.h file. There i found in line 25 a precompiler statement: #ifdef C10_USE_GLOG i just made the precompiler always choose the else case so that #include <c10/util/logging_is_not_google_glog.h> is included instead of #include <c10/util/logging_is_google_glog.h>

Furthermore i had to add the following line to submodules/diff-gaussian-rasterization/cuda_rasterizer/rasterizer_impl.h #include <cstdint>

SRaent avatar Apr 08 '24 14:04 SRaent