simsong / bulk_extractor

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

Does not build under Debian 10 out-of-the-box; produces error `/usr/include/c++/8/bits/fs_path.h:185: undefined reference to 'std::filesystem::__cxx11::path::_M_split_cmpts()'` #392

Closed zdavatz closed 1 year ago

zdavatz commented 1 year ago
  1. ./configure runs fine
  2. make -j3 results in
    be20_api/feature_recorder.o: In function `feature_recorder::fname_in_outdir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int) const':
    /usr/include/c++/8/bits/fs_path.h:185: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
    /usr/include/c++/8/bits/fs_path.h:546: undefined reference to `std::filesystem::__cxx11::path::compare(std::filesystem::__cxx11::path const&) const'
    /usr/include/c++/8/bits/fs_path.h:185: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
    /usr/include/c++/8/bits/fs_path.h:381: undefined reference to `std::filesystem::__cxx11::path::has_root_directory() const'
    /usr/include/c++/8/bits/fs_path.h:178: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
    be20_api/feature_recorder.o: In function `feature_recorder::fname_in_outdir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int) const':
    /usr/include/c++/8/bits/fs_ops.h:121: undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
    be20_api/feature_recorder.o: In function `feature_recorder::fname_in_outdir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int) const':
    /usr/include/c++/8/bits/fs_path.h:310: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
    /usr/include/c++/8/bits/fs_path.h:258: undefined reference to `std::filesystem::__cxx11::path::has_filename() const'
    /usr/include/c++/8/bits/fs_path.h:261: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
    /usr/include/c++/8/bits/fs_path.h:178: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
    /usr/include/c++/8/bits/fs_path.h:310: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
    /usr/include/c++/8/bits/fs_path.h:178: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
    /usr/include/c++/8/bits/fs_path.h:178: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
    be20_api/feature_recorder.o:/usr/include/c++/8/bits/fs_path.h:172: more undefined references to `std::filesystem::__cxx11::path::_M_split_cmpts()' follow
    be20_api/feature_recorder.o: In function `feature_recorder::carve(sbuf_t const&, sbuf_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long)':
    /usr/include/c++/8/bits/fs_path.h:381: undefined reference to `std::filesystem::__cxx11::path::has_root_directory() const'
    be20_api/feature_recorder.o: In function `feature_recorder::carve(sbuf_t const&, sbuf_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long)':
    /home/opc/software/bulk_extractor/src/be20_api/feature_recorder.cpp:359: undefined reference to `std::filesystem::create_directory(std::filesystem::__cxx11::path const&)'
    be20_api/feature_recorder.o: In function `feature_recorder::carve(sbuf_t const&, sbuf_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, long)':

    ...

    image_process.o: In function `process_raw::add_file(std::filesystem::__cxx11::path)':
    /home/opc/software/bulk_extractor/src/image_process.cpp:471: undefined reference to `std::filesystem::file_size(std::filesystem::__cxx11::path const&)'
    image_process.o: In function `process_raw::open()':
    /usr/include/c++/8/bits/fs_path.h:185: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
    /usr/include/c++/8/bits/fs_path.h:185: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
    image_process.o: In function `process_raw::open()':
    /usr/include/c++/8/bits/fs_ops.h:121: undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
    image_process.o: In function `process_raw::open()':
    /usr/include/c++/8/bits/fs_path.h:185: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
    image_process.o: In function `process_dir::process_dir(std::filesystem::__cxx11::path)':
    /home/opc/software/bulk_extractor/src/image_process.cpp:716: undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
    /home/opc/software/bulk_extractor/src/image_process.cpp:716: undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
    /home/opc/software/bulk_extractor/src/image_process.cpp:716: undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
    pcap_writer.o: In function `pcap_writer::pcap_writer(scanner_params const&)':
    /usr/include/c++/8/bits/fs_path.h:185: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
    /usr/include/c++/8/bits/fs_path.h:381: undefined reference to `std::filesystem::__cxx11::path::has_root_directory() const'
    /usr/include/c++/8/bits/fs_path.h:258: undefined reference to `std::filesystem::__cxx11::path::has_filename() const'
    /usr/include/c++/8/bits/fs_path.h:261: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
    collect2: error: ld returned 1 exit status
    make[2]: *** [Makefile:1230: bulk_extractor] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[2]: Leaving directory '/home/opc/software/bulk_extractor/src'
    make[1]: *** [Makefile:417: all-recursive] Error 1
    make[1]: Leaving directory '/home/opc/software/bulk_extractor'
    make: *** [Makefile:358: all] Error 2
simsong commented 1 year ago

This works on Fedora and Ubuntu. Unfortunately, I am not able to assist you in porting to another operating system.


From: Zeno R.R. Davatz @.> Sent: Thursday, March 16, 2023 10:40 AM To: simsong/bulk_extractor @.> Cc: Subscribed @.***> Subject: [simsong/bulk_extractor] /usr/include/c++/8/bits/fs_path.h:185: undefined reference tostd::filesystem::__cxx11::path::_M_split_cmpts()'` (Issue #392)

  1. ./configure runs fine
  2. make -j3 results in

to -lexpat be20_api/feature_recorder.o: In function feature_recorder::fname_in_outdir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int) const': /usr/include/c++/8/bits/fs_path.h:185: undefined reference tostd::filesystem::cxx11::path::_M_split_cmpts()' /usr/include/c++/8/bits/fs_path.h:546: undefined reference to `std::filesystem::cxx11::path::compare(std::filesystem::cxx11::path const&) const' /usr/include/c++/8/bits/fs_path.h:185: undefined reference to std::filesystem::__cxx11::path::_M_split_cmpts()' /usr/include/c++/8/bits/fs_path.h:381: undefined reference tostd::filesystem::__cxx11::path::has_root_directory() const' /usr/include/c++/8/bits/fs_path.h:178: undefined reference to `std::filesystem::cxx11::path::_M_split_cmpts()' be20_api/feature_recorder.o: In function feature_recorder::fname_in_outdir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int) const': /usr/include/c++/8/bits/fs_ops.h:121: undefined reference tostd::filesystem::status(std::filesystem::cxx11::path const&)' be20_api/feature_recorder.o: In function feature_recorder::fname_in_outdir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int) const': /usr/include/c++/8/bits/fs_path.h:310: undefined reference tostd::filesystem::cxx11::path::_M_split_cmpts()' /usr/include/c++/8/bits/fs_path.h:258: undefined reference to std::filesystem::__cxx11::path::has_filename() const' /usr/include/c++/8/bits/fs_path.h:261: undefined reference tostd::filesystem::cxx11::path::_M_split_cmpts()' /usr/include/c++/8/bits/fs_path.h:178: undefined reference to `std::filesystem::cxx11::path::_M_split_cmpts()' /usr/include/c++/8/bits/fs_path.h:310: undefined reference to std::filesystem::__cxx11::path::_M_split_cmpts()' /usr/include/c++/8/bits/fs_path.h:178: undefined reference tostd::filesystem::cxx11::path::_M_split_cmpts()' /usr/include/c++/8/bits/fs_path.h:178: undefined reference to `std::filesystem::cxx11::path::_M_split_cmpts()' be20_api/feature_recorder.o:/usr/include/c++/8/bits/fs_path.h:172: more undefined references to std::filesystem::__cxx11::path::_M_split_cmpts()' follow be20_api/feature_recorder.o: In functionfeature_recorder::carve(sbuf_t const&, sbuf_t const&, std::cxx11::basic_string<char, std::char_traits, std::allocator >, long)': /usr/include/c++/8/bits/fs_path.h:381: undefined reference to std::filesystem::__cxx11::path::has_root_directory() const' be20_api/feature_recorder.o: In functionfeature_recorder::carve(sbuf_t const&, sbuf_t const&, std::cxx11::basic_string<char, std::char_traits, std::allocator >, long)': /home/opc/software/bulk_extractor/src/be20_api/feature_recorder.cpp:359: undefined reference to std::filesystem::create_directory(std::filesystem::__cxx11::path const&)' be20_api/feature_recorder.o: In functionfeature_recorder::carve(sbuf_t const&, sbuf_t const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, long)':

...

image_process.o: In function process_raw::add_file(std::filesystem::__cxx11::path)': /home/opc/software/bulk_extractor/src/image_process.cpp:471: undefined reference tostd::filesystem::file_size(std::filesystem::cxx11::path const&)' image_process.o: In function process_raw::open()': /usr/include/c++/8/bits/fs_path.h:185: undefined reference tostd::filesystem::cxx11::path::_M_split_cmpts()' /usr/include/c++/8/bits/fs_path.h:185: undefined reference to `std::filesystem::cxx11::path::_M_split_cmpts()' image_process.o: In function process_raw::open()': /usr/include/c++/8/bits/fs_ops.h:121: undefined reference tostd::filesystem::status(std::filesystem::__cxx11::path const&)' image_process.o: In function process_raw::open()': /usr/include/c++/8/bits/fs_path.h:185: undefined reference tostd::filesystem::cxx11::path::_M_split_cmpts()' image_process.o: In function process_dir::process_dir(std::filesystem::__cxx11::path)': /home/opc/software/bulk_extractor/src/image_process.cpp:716: undefined reference tostd::filesystem::cxx11::recursive_directory_iterator::~recursive_directory_iterator()' /home/opc/software/bulk_extractor/src/image_process.cpp:716: undefined reference to `std::filesystem::cxx11::recursive_directory_iterator::~recursive_directory_iterator()' /home/opc/software/bulk_extractor/src/image_process.cpp:716: undefined reference to std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()' pcap_writer.o: In functionpcap_writer::pcap_writer(scanner_params const&)': /usr/include/c++/8/bits/fs_path.h:185: undefined reference to std::filesystem::__cxx11::path::_M_split_cmpts()' /usr/include/c++/8/bits/fs_path.h:381: undefined reference tostd::filesystem::__cxx11::path::has_root_directory() const' /usr/include/c++/8/bits/fs_path.h:258: undefined reference to std::filesystem::__cxx11::path::has_filename() const' /usr/include/c++/8/bits/fs_path.h:261: undefined reference tostd::filesystem::__cxx11::path::_M_split_cmpts()' collect2: error: ld returned 1 exit status make[2]: [Makefile:1230: bulk_extractor] Error 1 make[2]: Waiting for unfinished jobs.... make[2]: Leaving directory '/home/opc/software/bulk_extractor/src' make[1]: [Makefile:417: all-recursive] Error 1 make[1]: Leaving directory '/home/opc/software/bulk_extractor' make: [Makefile:358: all] Error 2

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

zdavatz commented 1 year ago

Ok, I will try with gcc-9 and above.

simsong commented 1 year ago

Ok, I will try with gcc-9 and above.

did it work?

zdavatz commented 1 year ago

gcc-9 worked and it compiled fine, but I got some libewf.so error, when starting bulk_extractor. bulk_extractor: error while loading shared libraries: libewf.so.3: cannot open shared object file: No such file or directory

simsong commented 1 year ago

That's likely a shared library path issue. Either the library is not properly installed, or else you didn't run ldconfig, or ldpath is broken, or somkething.

zdavatz commented 1 year ago

yes possible.

esebese commented 8 months ago

Having the same issue. @zdavatz were you able to solve out the issue?

zdavatz commented 8 months ago

I installed a new version via "apt-get install"

simsong commented 8 months ago

On what OS were you having this issue?

On Wed, Oct 25, 2023 at 2:10 AM Ensar Şamil @.***> wrote:

Having the same issue. @zdavatz https://github.com/zdavatz were you able to solve out the issue?

— Reply to this email directly, view it on GitHub https://github.com/simsong/bulk_extractor/issues/392#issuecomment-1778578728, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMFHLADQPVJGAGHX6FLSD3YBCUNLAVCNFSM6AAAAAAV5J2JRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZYGU3TQNZSHA . You are receiving this because you commented.Message ID: @.***>

esebese commented 8 months ago

Debian 10

simsong commented 8 months ago

Debian 10 does not appear to have good C++17 support out-of-the-box. Would you like to update the documentation to indicate that Debian 10 is not supported for native builds?

esebese commented 8 months ago

Updated and sent PR

jonstewart commented 8 months ago

What I don't understand is why the C++17 check in the configure script at https://github.com/simsong/bulk_extractor/blob/main/configure.ac#L44 didn't generate an error.

simsong commented 8 months ago

What I don't understand is why the C++17 check in the configure script at https://github.com/simsong/bulk_extractor/blob/main/configure.ac#L44 didn't generate an error.

I suspect it has C++17, but it's incomplete.