Closed Annazhan closed 2 years ago
What version of macFUSE do you have? Unfortunately, I don't have a Mac to test with, but I think other people have successful used it with version 4. See this line: https://github.com/cberner/fuser/blob/5fb2992506aacd830a33fba157c0792f5cc25130/build.rs#L11
Right! I use 4.2.5 macFuse. And I solve that problem with changing searching fuse package sequence in pkg_config in build.rs. When using macOS, it will work when the pkg first search for osxfuse and then search for macfuse 4.0. I am not sure the reason of this, but currently it can work. The change is shown below:
#[cfg(target_os = "macos")]
{
if pkg_config::Config::new()
.atleast_version("2.6.0")
.probe("osxfuse") // for macFUSE 4.x
.map_err(|e| eprintln!("{}", e))
.is_ok()
{
println!("cargo:rustc-cfg=feature=\"libfuse2\"");
} else {
pkg_config::Config::new()
.atleast_version("2.6.0")
.probe("fuse") // for osxfuse 3.x
.map_err(|e| eprintln!("{}", e))
.unwrap();
println!("cargo:rustc-cfg=feature=\"libfuse2\"");
}
}
Thank you for your reply!!
I try to run the hello.rs in example, but got this issue
ld: library not found for -losxfuse
. But I have already download the macFUSE . Then I follow the error instruction and download osxfuse, and I got another issue shown below, so I am wondering is it because my architecture of my computer or my settings? Thank you so much!