mhx / dwarfs

A fast high compression read-only file system for Linux, Windows and macOS
GNU General Public License v3.0
2.16k stars 58 forks source link

Cannot build v0.9.9 on Ubuntu 22.04 #221

Closed Evaia closed 6 months ago

Evaia commented 6 months ago

process goes all the way until the end and fails near the end with a /home/[redacted]/src/dwarfs-0.9.9/src/dwarfs/categorizer/fits_categorizer.cpp:41:10: fatal error: range/v3/algorithm/fold_left.hpp: No such file or directory

System is Ubuntu 22.04, both runs are building without tests.

tarball build:

<snip>
[ 94%] Building C object CMakeFiles/dwarfs.dir/src/dwarfs/wcwidth.c.o
[ 94%] Building CXX object CMakeFiles/dwarfs.dir/src/dwarfs/worker_group.cpp.o
[ 94%] Building CXX object CMakeFiles/dwarfs.dir/src/dwarfs/pager.cpp.o
[ 94%] Building CXX object CMakeFiles/dwarfs.dir/src/dwarfs/render_manpage.cpp.o
[ 94%] Building CXX object CMakeFiles/dwarfs.dir/src/dwarfs/mkdwarfs_manpage.cpp.o
[ 94%] Building CXX object CMakeFiles/dwarfs.dir/src/dwarfs/dwarfs_manpage.cpp.o
[ 95%] Building CXX object CMakeFiles/dwarfs.dir/src/dwarfs/dwarfsck_manpage.cpp.o
[ 95%] Building CXX object CMakeFiles/dwarfs.dir/src/dwarfs/dwarfsextract_manpage.cpp.o
[ 95%] Building CXX object CMakeFiles/dwarfs.dir/src/dwarfs/version.cpp.o
/home/[redacted]/src/dwarfs-0.9.9/src/dwarfs/categorizer/fits_categorizer.cpp:41:10: fatal error: range/v3/algorithm/fold_left.hpp: No such file or directory
   41 | #include <range/v3/algorithm/fold_left.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/dwarfs_categorizer.dir/build.make:76: CMakeFiles/dwarfs_categorizer.dir/src/dwarfs/categorizer/fits_categorizer.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/[redacted]/src/dwarfs-0.9.9/src/dwarfs/categorizer/pcmaudio_categorizer.cpp: In member function ‘bool dwarfs::{anonymous}::pcmaudio_categorizer_<LoggerPolicy>::check_aiff(dwarfs::inode_fragments&, const std::filesystem::__cxx11::path&, std::span<const unsigned char>, const category_mapper&) const [with LoggerPolicy = dwarfs::debug_logger_policy]’:
/home/[redacted/src/dwarfs-0.9.9/src/dwarfs/categorizer/pcmaudio_categorizer.cpp:692:29: warning: ‘num_sample_frames’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  692 |           num_sample_frames * (meta.number_of_channels * meta.bytes_per_sample);
      |           ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [CMakeFiles/Makefile2:490: CMakeFiles/dwarfs_categorizer.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 95%] Linking CXX static library libdwarfs.a
[ 95%] Built target dwarfs
make: *** [Makefile:156: all] Error 2

same issue with the git version

<snip>
[ 95%] Linking CXX static library libdwarfs.a
[ 95%] Built target dwarfs
[ 95%] Building CXX object CMakeFiles/dwarfs_tool.dir/src/dwarfs/tool.cpp.o
[ 95%] Building CXX object CMakeFiles/dwarfs_tool.dir/src/dwarfs/iolayer.cpp.o
[ 95%] Linking CXX static library libdwarfs_tool.a
[ 95%] Built target dwarfs_tool
[ 95%] Building CXX object CMakeFiles/dwarfsck_main.dir/src/dwarfsck_main.cpp.o
[ 97%] Building CXX object CMakeFiles/dwarfs_main.dir/src/dwarfs_main.cpp.o
[ 97%] Building CXX object CMakeFiles/dwarfsbench_main.dir/src/dwarfsbench_main.cpp.o
[ 97%] Building CXX object CMakeFiles/dwarfsextract_main.dir/src/dwarfsextract_main.cpp.o
[ 97%] Linking CXX static library libdwarfsck_main.a
[ 97%] Linking CXX static library libdwarfsbench_main.a
[ 97%] Linking CXX static library libdwarfs_main.a
[ 97%] Linking CXX static library libdwarfsextract_main.a
[ 97%] Built target dwarfsbench_main
[ 97%] Built target dwarfsck_main
[ 97%] Built target dwarfs_main
[ 97%] Built target dwarfsextract_main
[ 97%] Building CXX object CMakeFiles/dwarfsbench.dir/src/dwarfsbench.cpp.o
[ 97%] Building CXX object CMakeFiles/dwarfsck.dir/src/dwarfsck.cpp.o
[ 97%] Building CXX object CMakeFiles/dwarfs-bin.dir/src/dwarfs.cpp.o
[ 98%] Building CXX object CMakeFiles/dwarfsextract.dir/src/dwarfsextract.cpp.o
[ 98%] Linking CXX executable dwarfsbench
[ 98%] Linking CXX executable dwarfsck
[ 98%] Linking CXX executable dwarfs
[ 98%] Linking CXX executable dwarfsextract
[ 98%] Built target dwarfsextract
[ 98%] Built target dwarfsck
[ 98%] Built target dwarfsbench
[ 98%] Built target dwarfs-bin
[ 98%] Generating mount.dwarfs
[ 98%] Built target symlinks
/home/[redacted]/src/dwarfs/src/dwarfs/categorizer/fits_categorizer.cpp:41:10: fatal error: range/v3/algorithm/fold_left.hpp: No such file or directory
   41 | #include <range/v3/algorithm/fold_left.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/dwarfs_categorizer.dir/build.make:76: CMakeFiles/dwarfs_categorizer.dir/src/dwarfs/categorizer/fits_categorizer.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:490: CMakeFiles/dwarfs_categorizer.dir/all] Error 2
make: *** [Makefile:156: all] Error 2
mhx commented 6 months ago

Did you install librange-v3-dev?

There's a (mostly) up-to-date list of dependencies in the README. There's also the Dockerfile used by the CI action that lists the dependencies as well (and a few more things).

Evaia commented 6 months ago

I did install everything listed there in addition to all of the deps for Folly.

mhx commented 6 months ago

Sorry, you're right. I just checked and 22.04 still has an old version of range-v3 that doesn't contain the fold_left.hpp header.

There's unfortunately no easy workaround other than to install a more recent version of range-v3 manually. Alternatively, you can download a binary release.

I'll see if I can work around this issue for the next release.

Evaia commented 6 months ago

Copy that. Thank you for all of your great work!

mhx commented 6 months ago

802e836 should fix this. I've also set up a 22.04 CI build to make sure this doesn't break.