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()'`
zdavatz opened this issue · 14 comments
./configure
runs finemake -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
Ok, I will try with gcc-9 and above.
Ok, I will try with gcc-9 and above.
did it work?
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
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.
yes possible.
I installed a new version via "apt-get install"
Debian 10
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?
Updated and sent PR
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.
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.