simsong / bulk_extractor

This is the development tree. Production downloads are at:
https://github.com/simsong/bulk_extractor/releases
Other
1.11k stars 187 forks source link

Compilation error #126

Closed ZikyHD closed 4 years ago

ZikyHD commented 4 years ago

Last commit of Bulk Extractor doesn't build properly.

Reason:

New scanner implemented but not declared in src/bulk_extractor.h

simsong commented 4 years ago

You trust committers, and then you get burned. I need to implement some kind of continuous integration. Thanks. I'll fix it.

qinidema commented 4 years ago

At least on GCC 9.1.0 there are the following errors:

bulk_extractor_scanners.cpp:74:5: error: ‘scan_evtx’ was not declared in this scope; did you mean ‘scan_extx’?
   74 |     scan_evtx,
      |     ^~~~~~~~~
      |     scan_extx
bulk_extractor_scanners.cpp:75:5: error: ‘scan_ntfsindx’ was not declared in this scope; did you mean ‘scan_ntfsusn’?
   75 |     scan_ntfsindx,
      |     ^~~~~~~~~~~~~
      |     scan_ntfsusn
bulk_extractor_scanners.cpp:76:5: error: ‘scan_ntfslogfile’ was not declared in this scope
   76 |     scan_ntfslogfile,
      |     ^~~~~~~~~~~~~~~~
bulk_extractor_scanners.cpp:77:5: error: ‘scan_ntfsmft’ was not declared in this scope; did you mean ‘scan_ntfsusn’?
   77 |     scan_ntfsmft,
      |     ^~~~~~~~~~~~
      |     scan_ntfsusn
bulk_extractor_scanners.cpp:79:5: error: ‘scan_utmp’ was not declared in this scope; did you mean ‘scan_zip’?
   79 |     scan_utmp,
      |     ^~~~~~~~~
      |     scan_zip
make[2]: *** [Makefile:1049: bulk_extractor_scanners.o] Error 1

After adding extern "C" scanner_t scan_evtx; and so on to src/bulk_extractor.h the error seems to be gone.

simsong commented 4 years ago

On which OS are you running GCC 9.1.0?

simsong commented 4 years ago

I just pushed f4a39b0 which compiles on my macOS machine with:

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.3 (clang-1103.0.32.59)
Target: x86_64-apple-darwin19.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
qinidema commented 4 years ago

On Linux. After that change it compiled successfully. Thank you, at the same time that I've prepared the pull request for you - you've already done that a few seconds ago. Amazing speed! :)

simsong commented 4 years ago

Oh, the "Amazing speed!" is because I just happened to be logged in. Glad I could help. I'm looking forward to seeing your pull requests; I want to add more automated testing. Please feel free to add more unit checks!