redoxfs fails to compile on systems with libfuse >=3.0
Steps to reproduce:
- Install Gentoo
- install fuse as directed by bootstrap.sh -d
- git clone https://gitlab.redox-os.org/redox-os/redoxfs.git
- cargo build
Caused by:
process didn't exit successfully: `/home/liam/repos/redoxfs/target/debug/build/fuse-af7cecec4946dbaf/build-script-build` (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=FUSE_NO_PKG_CONFIG
cargo:rerun-if-env-changed=PKG_CONFIG
cargo:rerun-if-env-changed=FUSE_STATIC
cargo:rerun-if-env-changed=FUSE_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_PATH
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
--- stderr
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Failure { command: "\"pkg-config\" \"--libs\" \"--cflags\" \"fuse\" \"fuse >= 2.6.0\"", output: Output { status: ExitStatus(ExitStatus(256)), stdout: "", stderr: "Package fuse was not found in the pkg-config search path.\nPerhaps you should add the directory containing `fuse.pc'\nto the PKG_CONFIG_PATH environment variable\nPackage 'fuse', required by 'virtual:world', not found\nPackage 'fuse', required by 'virtual:world', not found\n" } }', /home/liam/.cargo/registry/src/github.com-1ecc6299db9ec823/fuse-0.3.1/build.rs:10:76
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
Looking at this error you might seek to blame upstream, but upstream will not fix the issue.
from https://github.com/zargony/fuse-rs/issues/155
fuse-rs is in a bit of a languishing state, you might want to open a similar issue with https://github.com/cberner/fuser which is a fork of this project and is more actively developed.
How to move forwards: I was able to get zargony's library to compile by changing the build.rs script to search for fuse3, but it might be better to switch to using fuser. I tried switching redoxfs to fuser and got 18 build errors, which doesn't seem that bad. Most of them were related to Timespecs and differences in the number of arguments. The other thing would be to fork fuse to gitlab, change build.rs, then just use that instead of upstream fuse. Since fuse is in a "languishing state", it might not be the worst option.
Aside, whatever the preferred solution is, I'd be happy to work on it.