Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ubuntu] Unable to build TEV; uint64_t, nBytes, uint8_t, and uintptr_t not declared in scope. #223

Closed
tdelanversin opened this issue Mar 13, 2024 · 2 comments

Comments

@tdelanversin
Copy link

tdelanversin commented Mar 13, 2024

I'm on a debian machine, and followed the steps in the installation guide for building TEV, and am unable to finish the build. I'm not very experienced, but I believe the issue might be my compiler, and would appreciate a little bit of explanation with regards to what I need to do if the problem is my machine.

My current package versions are:

➜  tev git:(master) gcc --version
gcc (Ubuntu 13.2.0-4ubuntu3) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

➜  tev git:(master) cmake --version
cmake version 3.27.4

CMake suite maintained and supported by Kitware (kitware.com/cmake).

And the error message is:

➜  tev git:(master) cmake --build build --config Release -j       
[  3%] Built target Iex
[  3%] Built target clip
[  3%] Built target Half
[ 10%] Built target glfw_objects
[ 10%] Built target IexMath
[ 17%] Built target IlmThread
[ 35%] Built target nanogui
[ 39%] Built target Imath
[ 41%] Building CXX object dependencies/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfHuf.cpp.o
[ 41%] Building CXX object dependencies/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfMisc.cpp.o
[ 41%] Building CXX object dependencies/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfDwaCompressor.cpp.o
/home/tilmand/repos/tev/dependencies/openexr/OpenEXR/IlmImf/ImfHuf.cpp: In function ‘void Imf_2_5::hufUncompress(const char*, int, short unsigned int*, int)’:
/home/tilmand/repos/tev/dependencies/openexr/OpenEXR/IlmImf/ImfHuf.cpp:1105:5: error: ‘uint64_t’ was not declared in this scope
 1105 |     uint64_t nBytes = (static_cast<uint64_t>(nBits)+7) / 8 ;
      |     ^~~~~~~~
/home/tilmand/repos/tev/dependencies/openexr/OpenEXR/IlmImf/ImfHuf.cpp:56:1: note: ‘uint64_t’ is defined in header ‘<cstdint>; did you forget to ‘#include <cstdint>’?
   55 | #include <algorithm>
  +++ |+#include <cstdint>
   56 | 
/home/tilmand/repos/tev/dependencies/openexr/OpenEXR/IlmImf/ImfHuf.cpp:1107:16: error: ‘nBytes’ was not declared in this scope; did you mean ‘nBits’?
 1107 |     if ( ptr + nBytes > compressed+nCompressed)
      |                ^~~~~~
      |                nBits
/home/tilmand/repos/tev/dependencies/openexr/OpenEXR/IlmImf/ImfHuf.cpp:1124:31: error: ‘nBytes’ was not declared in this scope; did you mean ‘nBits’?
 1124 |         if( ptr-compressed  + nBytes > nCompressed)
      |                               ^~~~~~
      |                               nBits
gmake[2]: *** [dependencies/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/build.make:328: dependencies/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfHuf.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
/home/tilmand/repos/tev/dependencies/openexr/OpenEXR/IlmImf/ImfMisc.cpp:1392:17: error: ‘uint8_t’ does not name a type
 1392 | struct FBytes { uint8_t b[4]; };
      |                 ^~~~~~~
/home/tilmand/repos/tev/dependencies/openexr/OpenEXR/IlmImf/ImfMisc.cpp:55:1: note: ‘uint8_t’ is defined in header ‘<cstdint>; did you forget to ‘#include <cstdint>’?
   54 | #include <ImfTileDescription.h>
  +++ |+#include <cstdint>
   55 | #include "ImfNamespace.h"
gmake[2]: *** [dependencies/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/build.make:468: dependencies/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfMisc.cpp.o] Error 1
/home/tilmand/repos/tev/dependencies/openexr/OpenEXR/IlmImf/ImfDwaCompressor.cpp: In member function ‘void Imf_2_5::DwaCompressor::LossyDctDecoderBase::execute()’:
/home/tilmand/repos/tev/dependencies/openexr/OpenEXR/IlmImf/ImfDwaCompressor.cpp:746:31: error: ‘uintptr_t’ does not name a type
  746 |         if ((reinterpret_cast<uintptr_t>(rowBlockHandle + i) & _SSE_ALIGNMENT_MASK) == 0)
      |                               ^~~~~~~~~
/home/tilmand/repos/tev/dependencies/openexr/OpenEXR/IlmImf/ImfDwaCompressor.cpp:177:1: note: ‘uintptr_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>?
  176 | #include "dwaLookups.h"
  +++ |+#include <cstdint>
  177 | 
/home/tilmand/repos/tev/dependencies/openexr/OpenEXR/IlmImf/ImfDwaCompressor.cpp:1014:38: error: ‘uintptr_t’ does not name a type
 1014 |                 if (reinterpret_cast<uintptr_t>(_rowPtrs[comp][y]) & _SSE_ALIGNMENT_MASK)
      |                                      ^~~~~~~~~
/home/tilmand/repos/tev/dependencies/openexr/OpenEXR/IlmImf/ImfDwaCompressor.cpp:1014:38: note: ‘uintptr_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>?
gmake[2]: *** [dependencies/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/build.make:454: dependencies/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/ImfDwaCompressor.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1743: dependencies/openexr/OpenEXR/IlmImf/CMakeFiles/IlmImf.dir/all] Error 2
gmake: *** [Makefile:156: all] Error 2
➜  tev git:(master) 

Thanks for the help!

@Tom94
Copy link
Owner

Tom94 commented Mar 14, 2024

Hi, thanks for reporting this! Could you try re-cloning the project and compiling again? You can alternatively delete your build folder, run

git pull origin master
git submodule sync --recursive
git submodule update --init --recursive

and then try compiling again.

I suspect the issue was an incompatibility between the (old) version of OpenEXR tev used until now and the (very new) version of gcc you've got. I migrated to a newer OpenEXR version just now and am hopeful that it fixed the issue.

@tdelanversin
Copy link
Author

Works perfectly, thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants