Repository navigation
Conversation
|
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@rustbot author I think the thing to do here is un-gate It would be good to set the |
|
Reminder, once the PR becomes ready for a review, use |
|
libc PR: rust-lang/libc#5447 |
|
We're seeing multiple build failures in Alpine Linux due to a recent libc release breaking rustix: https://gitlab.alpinelinux.org/alpine/aports/-/work_items/18444 I think some coordination is required between rustix, libc and rust, but it's opaque to me which order the dominoes need to fall for everything to work again. |
|
Is Alpine using unreleased libc? I'm not sure where an error would be coming from otherwise. I'm loosely holding off the libc release on that rustix issue but can't do so indefinitely, bytecodealliance/rustix#1496 has been around for a year... Anyway that doesn't seem related to rust using statx, which is the PR here. |
I think that issue might be fixed in |
This comment has been minimized.
This comment has been minimized.
|
There is now a new libc release out, which has |
|
I'll try to get around to opening a PR for updating libc to 0.2.190 to move this forward on the weekend |
|
std now has a libc that has statx for all musl arches |
|
Just popping in here to say I appreciate you all for pushing I'll update my PR to reflect that |
Since statx is currently invoked through the syscall directly anyways, it makes no sense to gate it to glibc targets, since none of this is glibc specific at the moment. As long as the kernel is recent enough, it supports statx.
On musl targets, we can assume that musl has support for statx and falls back to fstatat internally, so there's no need to do detection and caching of statx in std.
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
View all comments
This supersedes #154981. cc @strophy and sorry for taking a while to get around to this.
The first patch is the original PR with the commit message slightly adjusted, which makes use of the statx runtime detection on all Linux targets.
Since we want to unconditionally use statx on musl targets (because we know statx is available on our supported musl versions), we can call it through
libc::statx. Making use of that requires telling the libc crate that we are on a musl version recent enough for it, which I decided to do inbootstrap. If there's a better place to set the environment variable, let me know, but this is the most straightforward way I could come up with.With that in place, we can then wire up a short circuit to
libc::statxfor musl targets and skip the detection logic that all other Linux targets use.On my
aarch64-unknown-linux-muslmachine,./x.py test library/stdstill passes with these changes.r? @tgross35 since I presume you have opinions on how I'm holding libc here