-
Notifications
You must be signed in to change notification settings - Fork 131
passthrough.rs fails with cannot find type statx in crate libc
#432
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
base: main
Are you sure you want to change the base?
Conversation
7f247dc to
ccbbc32
Compare
| polly = { path = "../polly" } | ||
| rutabaga_gfx = { path = "../rutabaga_gfx", features = ["virgl_renderer", "virgl_renderer_next"], optional = true } | ||
| imago = { version = "0.1.4", features = ["sync-wrappers", "vm-memory"] } | ||
| rustix = { version = "1.1.2", features = ["fs"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think adding a new dependency just for this is a bit overkill. Let's simply wait for the rust toolchain to ship a newer version of musl, shouldn't take long.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, adding the dependency for such a simple thing seems like an overkill to me too.
An alternative could be to use libc::syscall directly.
musl 1.2.5 was released on February 29, 2024, so it's taking a while 😄. Nevertheless seems like we will get it soon-ish:
rust-lang/rust#142682
Btw. I was actually considering whether we may want to start using rustix over nix - it seemed to be nicer in some areas than nix, but it's hard to say...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
statx-sys does that, but has been deprecated in favor of libc::statx and rustix. It doesn't support stx_mnt_id but can be patched easily. But we could use it, thereby avoiding pulling in rustix and also writing the wrapper from scratch.
I created a draft here:
- libkrun patch: 66a4c5f
- statx-sys patch: oxalica/statx-sys@c0cd9f6
I'd move the statx-sys fork to libkrun or just include the files in the project if we wanna go forward with this.
musl 1.2.5 added support for the statx system call rust ships unknown-linux-musl with musl 1.2.3 milage on other libs may varay Enable portability by repling libc::statx with rustix::statx Fixes: containers#431 Signed-off-by: Pepper Gray <hello@peppergray.xyz>
|
@peppergrayxyz Please consider using |
|
FWIW, the upgrade to musl 1.2.5 will land in the upcoming Rust 1.93 release. |
musl 1.2.5 added support for the statx system call rust ships unknown-linux-musl with musl 1.2.3, milage on other libs may varay
Enable portability by repling libc::statx with rustix::statx
fixes #431