bcachefs-tools/INSTALL.md
Alexander Batischev 446ec6b092 docs: mention that libclang is required
This fixes the following build failure on Debian bookworm:

    error: failed to run custom build command for `clang-sys v1.6.1`

    Caused by:
      process didn't exit successfully: `/home/minoru/src/bcachefs-tools/rust-src/target/release/build/clang-sys-df95f6d1266be773/build-script-build` (exit status: 101)
      --- stdout
      cargo:warning=could not execute `llvm-config` one or more times, if the LLVM_CONFIG_PATH environment variable is set to a full path to valid `llvm-config` executable it will be used to try to find an instance of `libclang` on your system: "couldn't execute `llvm-config --prefix` (path=llvm-config) (error: No such file or directory (os error 2))"

      --- stderr
      thread 'main' panicked at /home/minoru/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clang-sys-1.6.1/build/dynamic.rs:206:45:
      called `Result::unwrap()` on an `Err` value: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-*.so'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"
      note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-11-24 20:09:46 -05:00

1.8 KiB

Getting started

Build dependencies:

  • libaio
  • libblkid
  • libclang
  • libkeyutils
  • liblz4
  • libsodium
  • liburcu
  • libuuid
  • libzstd
  • pkg-config
  • valgrind
  • zlib1g

In addition a recent Rust toolchain is required (rustc, cargo), either by using rustup or make sure to use a distribution where rustc (>=1.65) is available.

Debian (Bullseye or later) and Ubuntu (20.04 or later): you can install these with

apt install -y pkg-config libaio-dev libblkid-dev libkeyutils-dev \
    liblz4-dev libsodium-dev liburcu-dev libzstd-dev \
    uuid-dev zlib1g-dev valgrind libudev-dev git build-essential \
    python3 python3-docutils libclang-dev

Fedora: install the "Development tools" group along with:

dnf install -y libaio-devel libsodium-devel \
    libblkid-devel libzstd-devel zlib-devel userspace-rcu-devel \
    lz4-devel libuuid-devel valgrind-devel keyutils-libs-devel \
    findutils

Arch: install bcachefs-tools-git from the AUR. Or to build from source, install build dependencies with

pacman -S base-devel libaio keyutils libsodium liburcu zstd valgrind

Then, just make && make install

Experimental features

Experimental fuse support is currently disabled by default. Fuse support is at an early stage and may corrupt your filesystem, so it should only be used for testing. To enable, you'll also need to add:

  • libfuse3 >= 3.7

On Debian/Ubuntu (Bullseye/20.04 or later needed for libfuse >= 3.7):

apt install -y libfuse3-dev

On Fedora (32 or later needed for lbifuse >= 3.7):

dnf install -y fuse3-devel

Arch:

pacman -S fuse3

Then, make using the BCACHEFS_FUSE environment variable (make clean first if previously built without fuse support):

BCACHEFS_FUSE=1 make && make install