Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crabz failed to build on centos 7 #10

Open
omac777 opened this issue Oct 1, 2021 · 3 comments
Open

crabz failed to build on centos 7 #10

omac777 opened this issue Oct 1, 2021 · 3 comments
Labels
this_is_a_solution A solution to a problem.

Comments

@omac777
Copy link

omac777 commented Oct 1, 2021

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.

  1. 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
  1. build crabz
cargo install crabz --force
  1. REVERT BACK TO DEFAULT CENTOS 7 CMAKE 2
alternatives --config cmake
@omac777
Copy link
Author

omac777 commented Oct 1, 2021

By the way, I can validate this crabz tool works on a very large number for files in a very large tgz 500+ GB.

@sstadick
Copy link
Owner

sstadick commented Oct 1, 2021

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 👍

@sstadick sstadick added the this_is_a_solution A solution to a problem. label Oct 1, 2021
@omac777
Copy link
Author

omac777 commented Oct 15, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
this_is_a_solution A solution to a problem.
Projects
None yet
Development

No branches or pull requests

2 participants