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

Latest version doesn't build on Debian 11 #45

Closed
xfbs opened this issue Sep 21, 2022 · 3 comments · Fixed by #46
Closed

Latest version doesn't build on Debian 11 #45

xfbs opened this issue Sep 21, 2022 · 3 comments · Fixed by #46

Comments

@xfbs
Copy link

xfbs commented Sep 21, 2022

Reproduction steps:

  1. Install debian:11 (you can try this in docker)
  2. Install rust (rustup) version 1.63.0
  3. Create an empty crate with fuse3 (either v5.0 or the latest from git) and the tokio-runtime features
  4. Build

Error:

error[E0425]: cannot find function `getuid` in module `unistd`
   --> /home/patrick/.cargo/git/checkouts/fuse3-ea5edbf459049c77/0466328/src/mount_options.rs:217:52
    |
217 |                 self.uid.unwrap_or_else(|| unistd::getuid().as_raw())
    |                                                    ^^^^^^
    |
   ::: /home/patrick/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.25.0/src/unistd.rs:662:1
    |
662 | pub fn getcwd() -> Result<PathBuf> {
    | ---------------------------------- similarly named function `getcwd` defined here
    |
help: a function with a similar name exists
    |
217 |                 self.uid.unwrap_or_else(|| unistd::getcwd().as_raw())
    |                                                    ~~~~~~
help: consider importing this function
    |
1   | use libc::getuid;
    |
help: if you import `getuid`, refer to it directly
    |
217 -                 self.uid.unwrap_or_else(|| unistd::getuid().as_raw())
217 +                 self.uid.unwrap_or_else(|| getuid().as_raw())
    |

error[E0425]: cannot find function `getgid` in module `unistd`
   --> /home/patrick/.cargo/git/checkouts/fuse3-ea5edbf459049c77/0466328/src/mount_options.rs:221:52
    |
221 |                 self.gid.unwrap_or_else(|| unistd::getgid().as_raw())
    |                                                    ^^^^^^
    |
   ::: /home/patrick/.cargo/registry/src/github.com-1ecc6299db9ec823/nix-0.25.0/src/unistd.rs:662:1
    |
662 | pub fn getcwd() -> Result<PathBuf> {
    | ---------------------------------- similarly named function `getcwd` defined here
    |
help: a function with a similar name exists
    |
221 |                 self.gid.unwrap_or_else(|| unistd::getcwd().as_raw())
    |                                                    ~~~~~~
help: consider importing this function
    |
1   | use libc::getgid;
    |
help: if you import `getgid`, refer to it directly
    |
221 -                 self.gid.unwrap_or_else(|| unistd::getgid().as_raw())
221 +                 self.gid.unwrap_or_else(|| getgid().as_raw())
    |

For more information about this error, try `rustc --explain E0425`.
error: could not compile `fuse3` due to 2 previous errors
@Sherlock-Holo
Copy link
Owner

the problem should be getuid need user feature in nix, however fuse3 doesn't enable this feature
i will fix it in a few days, or maybe you can create a PR to enable user feature?

@Sherlock-Holo
Copy link
Owner

@xfbs the 0.5.1 is released, please try it and let me know if problem still exists :)

@xfbs
Copy link
Author

xfbs commented Sep 23, 2022

Works for me! thank you very much.

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

Successfully merging a pull request may close this issue.

2 participants