crabz failed to build on centos 7
I had a build error with centos 7 because the default cmake package is an older version. The steps below help to get crabz built and installed successfully on centos 7.
- Install cmake3
dnf install cmake3
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake 10 --slave /usr/local/bin/ctest ctest /usr/bin/ctest --slave /usr/local/bin/cpack cpack /usr/bin/cpack --slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake --family cmake
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 --slave /usr/local/bin/ctest ctest /usr/bin/ctest3 --slave /usr/local/bin/cpack cpack /usr/bin/cpack3 --slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 --family cmake
- build crabz
cargo install crabz --force
- REVERT BACK TO DEFAULT CENTOS 7 CMAKE 2
alternatives --config cmake
By the way, I can validate this crabz tool works on a very large number for files in a very large tgz 500+ GB.
Thanks for posting the solution! I actually just ran into this yesterday and ended up just pulling the binary from the release page.
And that's awesome to hear that it's working in the wild! I appreciate the feedback :+1:
You're also going to need to install a newer version of gcc unfortunately if you are using a newer nightly.
https://linuxize.com/post/how-to-install-gcc-compiler-on-centos-7/
by doing so, it mitigates seeing this error when attempting to build crabz:
running: "cc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "c_src/mimalloc/include" "-I" "c_src/mimalloc/src" "-Wall" "-Wextra" "-ftls-model=initial-exec" "-DMI_DEBUG=0" "-o" "/tmp/cargo-installxXPESi/release/build/libmimalloc-sys-4908da0b9ae51657/out/c_src/mimalloc/src/static.o" "-c" "c_src/mimalloc/src/static.c"
cargo:warning=In file included from c_src/mimalloc/include/mimalloc-types.h:13:0,
cargo:warning= from c_src/mimalloc/include/mimalloc-internal.h:11,
cargo:warning= from c_src/mimalloc/src/static.c:17:
cargo:warning=c_src/mimalloc/include/mimalloc-atomic.h:34:23: fatal error: stdatomic.h: No such file or directory
cargo:warning= #include <stdatomic.h>
cargo:warning= ^
cargo:warning=compilation terminated.
exit status: 1
I will be more detailed with explicit steps:
dnf install centos-release-scl
#point to cmake3
alternatives --config cmake
dnf install devtoolset-7
#invoke a bash shell with the newer gcc and headers in it
scl enable devtoolset-7 bash
cargo install crabz --force
And you're done.