mmp / pbrt-v4

Source code to pbrt, the ray tracer described in the forthcoming 4th edition of the "Physically Based Rendering: From Theory to Implementation" book.
https://pbrt.org
Apache License 2.0
2.83k stars 440 forks source link

[Ubuntu] Unable to build TEV; uintptr_t not declared in scope. #418

Open tdelanversin opened 6 months ago

tdelanversin commented 6 months ago

I'm on a debian machine, and am unable to finish building the repo. I believe the issue is because I am on a new version of GCC. Here is a link to an issue I made for tev with a very similar problem and the fix they found. link.

➜  pbrt-v4 git:(master) cmake --build build
[  0%] Built target soac
[  0%] Built target rgb2spec_opt
[  1%] Built target pbrt_soa_generated
[ 18%] Built target pbrt_lib
[ 19%] Built target glad
[ 21%] Built target deflate
[ 21%] Built target Half
[ 22%] Built target Iex
[ 22%] Built target IexMath
[ 24%] Built target Imath
[ 26%] Built target IlmThread
[ 26%] Building CXX object src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfDwaCompressor.cpp.o
/home/tilmand/repos/pbrt-v4/src/ext/openexr/OpenEXR/IlmImf/ImfDwaCompressor.cpp: In member function ‘void Imf_2_5::DwaCompressor::LossyDctDecoderBase::execute()’:
/home/tilmand/repos/pbrt-v4/src/ext/openexr/OpenEXR/IlmImf/ImfDwaCompressor.cpp:745:31: error: ‘uintptr_t’ does not name a type
  745 |         if ((reinterpret_cast<uintptr_t>(rowBlockHandle + i) & _SSE_ALIGNMENT_MASK) == 0)
      |                               ^~~~~~~~~
/home/tilmand/repos/pbrt-v4/src/ext/openexr/OpenEXR/IlmImf/ImfDwaCompressor.cpp:176:1: note: ‘uintptr_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
  175 | #include "dwaLookups.h"
  +++ |+#include <cstdint>
  176 | 
/home/tilmand/repos/pbrt-v4/src/ext/openexr/OpenEXR/IlmImf/ImfDwaCompressor.cpp:1013:38: error: ‘uintptr_t’ does not name a type
 1013 |                 if (reinterpret_cast<uintptr_t>(_rowPtrs[comp][y]) & _SSE_ALIGNMENT_MASK)
      |                                      ^~~~~~~~~
/home/tilmand/repos/pbrt-v4/src/ext/openexr/OpenEXR/IlmImf/ImfDwaCompressor.cpp:1013:38: note: ‘uintptr_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
gmake[2]: *** [src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/build.make:454: src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfDwaCompressor.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:2116: src/ext/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
➜  pbrt-v4 git:(master) 
genmeblog commented 4 weeks ago

Exactly the same here.