getrandom: Cannot compile with rust 1.70 and x86_64-unknown-linux-musl target
Hello,
I get the following error :
#0 33.24 error[E0061]: this function takes 3 arguments but 2 arguments were supplied
#0 33.24 --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/getrandom-0.1.16/src/util_libc.rs:113:14
#0 33.24 |
#0 33.24 113 | let fd = open(path.as_ptr() as *const _, libc::O_RDONLY | libc::O_CLOEXEC);
#0 33.24 | ^^^^------------------------------------------------------------- an argument of type `u32` is missing
#0 33.24 |
#0 33.24 note: function defined here
#0 33.24 --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.145/src/unix/linux_like/linux/musl/lfs64.rs:112:26
#0 33.24 |
#0 33.24 112 | pub unsafe extern "C" fn open64(
#0 33.24 | ^^^^^^
#0 33.24 help: provide the argument
#0 33.24 |
#0 33.24 113 | let fd = open(path.as_ptr() as *const _, libc::O_RDONLY | libc::O_CLOEXEC, /* u32 */);
#0 33.24 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#0 33.24
It works fine with 1.69 .
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 3
- Comments: 15 (6 by maintainers)
Commits related to this issue
- downgrade of libc to 0.2.144 due to https://github.com/rust-random/getrandom/issues/363 — committed to TUM-Dev/NavigaTUM by CommanderStorm a year ago
- [feedback-pipeline-5] Basic implementation of the `/api/feedback/propose_edit` API Endpoint (#508) * implemented the basics of an extendible feedback architecture * bumped the package.json * do... — committed to TUM-Dev/NavigaTUM by CommanderStorm a year ago
- Bump libc patch version Summary: Per the discussion in https://github.com/rust-random/getrandom/issues/363, libc-0.2.145 (the version that was causing issues with musl) was yanked. Let's bump to the ... — committed to facebook/buck2 by JakobDegen a year ago
I see exactly the same issue. https://github.com/facebook/buck2/actions/runs/5174587176/jobs/9321086346 for our public link to the failing job. I confirm that pinning
libcfixes the issue.