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

Error in build : ‘uint8_t’ does not name a type #6

Open
0xdeaddc0de opened this issue Apr 7, 2024 · 0 comments
Open

Error in build : ‘uint8_t’ does not name a type #6

0xdeaddc0de opened this issue Apr 7, 2024 · 0 comments

Comments

@0xdeaddc0de
Copy link

0xdeaddc0de commented Apr 7, 2024

Just in case Arch user meet this error, during build process
Output of make -j9 :

[ 96%] Built target c_macho_reader
In file included from /home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/src/utils/file_operations.cpp:3:
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/lib/gzip-hpp/include/gzip/utils.hpp: In function ‘bool gzip::is_compressed(const char*, std::size_t)’:
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/lib/gzip-hpp/include/gzip/utils.hpp:14:32: error: ‘uint8_t’ does not name a type
   14 |                    static_cast<uint8_t>(data[0]) == 0x78 &&
      |                                ^~~~~~~
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/lib/gzip-hpp/include/gzip/utils.hpp:2:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
    1 | #include <cstdlib>
  +++ |+#include <cstdint>
    2 |
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/lib/gzip-hpp/include/gzip/utils.hpp:15:33: error: ‘uint8_t’ does not name a type
   15 |                    (static_cast<uint8_t>(data[1]) == 0x9C ||
      |                                 ^~~~~~~
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/lib/gzip-hpp/include/gzip/utils.hpp:15:33: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/lib/gzip-hpp/include/gzip/utils.hpp:16:33: error: ‘uint8_t’ does not name a type
   16 |                     static_cast<uint8_t>(data[1]) == 0x01 ||
      |                                 ^~~~~~~
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/lib/gzip-hpp/include/gzip/utils.hpp:16:33: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/lib/gzip-hpp/include/gzip/utils.hpp:17:33: error: ‘uint8_t’ does not name a type
   17 |                     static_cast<uint8_t>(data[1]) == 0xDA ||
      |                                 ^~~~~~~
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/lib/gzip-hpp/include/gzip/utils.hpp:17:33: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/lib/gzip-hpp/include/gzip/utils.hpp:18:33: error: ‘uint8_t’ does not name a type
   18 |                     static_cast<uint8_t>(data[1]) == 0x5E)) ||
      |                                 ^~~~~~~
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/lib/gzip-hpp/include/gzip/utils.hpp:18:33: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/lib/gzip-hpp/include/gzip/utils.hpp:20:29: error: ‘uint8_t’ does not name a type
   20 |                (static_cast<uint8_t>(data[0]) == 0x1F && static_cast<uint8_t>(data[1]) == 0x8B));
      |                             ^~~~~~~
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/lib/gzip-hpp/include/gzip/utils.hpp:20:29: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/lib/gzip-hpp/include/gzip/utils.hpp:20:70: error: ‘uint8_t’ does not name a type
   20 |                (static_cast<uint8_t>(data[0]) == 0x1F && static_cast<uint8_t>(data[1]) == 0x8B));
      |                                                                      ^~~~~~~
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/lib/gzip-hpp/include/gzip/utils.hpp:20:70: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
make[2]: *** [CMakeFiles/Cerberus.dir/build.make:328: CMakeFiles/Cerberus.dir/src/utils/file_operations.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/src/binaries/extractors/libelf_extractor.cpp: In member function ‘virtual BIN_ARCH LibelfExtractor::extract_arch()’:
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/src/binaries/extractors/libelf_extractor.cpp:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
   20 | }
      | ^
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/src/binaries/extractors/libelf_extractor.cpp: In member function ‘virtual std::vector<std::unique_ptr<SECTION> > LibelfExtractor::extract_sections()’:
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/src/binaries/extractors/libelf_extractor.cpp:126:1: warning: no return statement in function returning non-void [-Wreturn-type]
  126 | }
      | ^
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/src/binaries/extractors/go_extractor.cpp: In member function ‘virtual BIN_ARCH GoExtractor::extract_arch()’:
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/src/binaries/extractors/go_extractor.cpp:9:1: warning: no return statement in function returning non-void [-Wreturn-type]
    9 | }
      | ^
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/src/binaries/extractors/go_extractor.cpp: In member function ‘virtual std::vector<std::unique_ptr<SECTION> > GoExtractor::extract_sections()’:
/home/deadc0de/Bureau/FCSC/archiver/tmp/Cerberus/src/binaries/extractors/go_extractor.cpp:53:1: warning: no return statement in function returning non-void [-Wreturn-type]
   53 | }
      | ^
make[1]: *** [CMakeFiles/Makefile2:239: CMakeFiles/Cerberus.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Fix is simple, in lib/gzip-hpp/include/gzip/utils.hpp just add #include <cstdint>

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

1 participant