-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Unable to run tests in libc-test using musl (Alpine Linux 3.18.2) #3305
Comments
Would this PR work for you ? |
Unfortunately it does not seem to work for me:
|
I wanted to see if the utmpx type was fixed, it seems the case. is it the same failure with clang ? |
Looks like I'd need to rewrite the build.rs file to not use cc if I am understanding it correctly, which is a whole different kind of pain. |
For the record I have hit what seems as this issue in Fedora. git clone https://github.com/rust-lang/libc
Same/similar issue is happening across all architectures supported by Fedora(x86_64 log^^,s390x, ppc64le and aarch64). |
I believe the cause is y'all use different versions for toolchains, e.g. musl, GCC, clang, etc. Since the current test cannot change type/value according to user system version, I'd recommend running the test via Docker, like CI. |
Add secure_getenv function for Linux variants This adds the [`secure_getenv`](https://www.gnu.org/software/libc/manual/html_node/Environment-Access.html#index-secure_005fgetenv) function for Linux variants as it is supported in both GNU libc (2.17+) and musl ([1.1.24+](https://git.musl-libc.org/cgit/musl/commit/?h=v1.1.24&id=ea9525c8bcf6170df59364c4bcd616de1acf8703)). It is recommended to be used over the regular `getenv`, and there is a [standing issue](rust-lang/rust#92558) for the Rust library to use it instead. I can't properly test it on my machine as there is some funky stuff going on with musl. I'll open up a [separate issue](#3305) with the output as it doesn't concern this fairly simple change.
@JohnTitor Could you please list what versions of the respective, relevant tools that are supported by this rust crate? |
And for the record, if I run it in Fedora container I get the same results. |
I am unable to run the tests in
libc-test
using musl on Alpine Linux.To reproduce:
cd libc-test && cargo test
This fails with:
I've looked into the build scripts but have been unable to locate where this
sizeof
call gets made.Extra info that may or may not help:
Kernel: 6.1.38-7-lts
rustc: 1.71.0
Architecture: Intel i7-3520M (4) @ 3.600GHz
OS: Alpine Linux 3.18.2
cc: 13.1.1
clang: 16.0.6
Full log:
log.txt
The text was updated successfully, but these errors were encountered: