bulk_extractor icon indicating copy to clipboard operation
bulk_extractor copied to clipboard

Error during compilation on Linux (‘uint16_t’ does not name a type)

Open rick-gnous opened this issue 7 months ago • 1 comments

I'm compiling bulk_extractor on the last commit (same problem with v1.4.0) on Gentoo, using GCC 15.1.0. I got an error, due to a missing header file.

g++ -std=gnu++17  -DHAVE_CONFIG_H -I. -I..  -pthread  -I../src/be20_api -I../src/be20_api/utfcpp/source -DUTC_OFFSET=+0000 -I/usr/local/include   -MD -O2 -O3 -Wall -Wcast-align -Wdisabled-optimi
zation -Weffc++ -Wfloat-equal -Wmissing-noreturn -Wmultichar -Woverloaded-virtual -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-promo -Wwrite-strings -fPIC -g  -MT exif_reader.o -MD -MP -MF
$depbase.Tpo -c -o exif_reader.o exif_reader.cpp &&\
mv -f $depbase.Tpo $depbase.Po
In file included from exif_reader.h:19,
                 from exif_reader.cpp:17:
exif_entry.h:15:11: error: ‘uint16_t’ does not name a type
   15 |     const uint16_t ifd_type {};
      |           ^~~~~~~~
exif_entry.h:6:1: note: ‘uint16_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
    5 | #include <memory>
  +++ |+#include <cstdint>
    6 |
exif_entry.h:18:24: error: expected ‘)’ before ‘ifd_type_’
   18 |     exif_entry(uint16_t ifd_type_, const std::string &name_, const std::string &value_);
      |               ~        ^~~~~~~~~~
      |                        )

With include cstdint, the compilation is OK. I can submit a PR to fix that.

rick-gnous avatar May 12 '25 22:05 rick-gnous

Please do! Thank you!

On Mon, May 12, 2025 at 6:19 PM rick @.***> wrote:

rick-gnous created an issue (simsong/bulk_extractor#491) https://github.com/simsong/bulk_extractor/issues/491

I'm compiling bulk_extractor on the last commit (same problem with v1.4.0) on Gentoo, using GCC 15.1.0. I got an error, due to a missing header file.

g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I.. -pthread -I../src/be20_api -I../src/be20_api/utfcpp/source -DUTC_OFFSET=+0000 -I/usr/local/include -MD -O2 -O3 -Wall -Wcast-align -Wdisabled-optimi zation -Weffc++ -Wfloat-equal -Wmissing-noreturn -Wmultichar -Woverloaded-virtual -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-promo -Wwrite-strings -fPIC -g -MT exif_reader.o -MD -MP -MF $depbase.Tpo -c -o exif_reader.o exif_reader.cpp &&
mv -f $depbase.Tpo $depbase.Po In file included from exif_reader.h:19, from exif_reader.cpp:17: exif_entry.h:15:11: error: ‘uint16_t’ does not name a type 15 | const uint16_t ifd_type {}; | ^~~~~~~~ exif_entry.h:6:1: note: ‘uint16_t’ is defined in header ‘’; this is probably fixable by adding ‘#include ’ 5 | #include +++ |+#include 6 | exif_entry.h:18:24: error: expected ‘)’ before ‘ifd_type_’ 18 | exif_entry(uint16_t ifd_type_, const std::string &name_, const std::string &value_); | ~ ^~~~~~~~~~ | )

With include cstdint, the compilation is OK. I can submit a PR to fix that.

— Reply to this email directly, view it on GitHub https://github.com/simsong/bulk_extractor/issues/491, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMFHLA3SLE2NPT64L2IREL26EM7DAVCNFSM6AAAAAB47BFEWSVHI2DSMVQWIX3LMV43ASLTON2WKOZTGA2TQMRYGE4DINQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

simsong avatar May 12 '25 23:05 simsong