-
Notifications
You must be signed in to change notification settings - Fork 629
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
futures-macro (pulled in by futures-util) appears not to compile on musl #2242
Comments
I believe this issue was fixed in Rust 1.44+ (see rust-lang/rust#40174). Can you check musl-dev is installed? |
This appears to be a different issue as I do have |
Hmm, I'm not sure what caused this problem, but this should eventually be fixed by dtolnay/proc-macro-hack#64. It should be able to compile by disabling futures-util's default features until that pr is merged or another workaround is found. futures-util = { version = "0.3", default-features = false, features = ["std"] } |
Oh thanks for putting up a PR! Do you want me to test anything for now? |
I'm having the same or at least a similar issue. Adding futures-util = { version = "0.3", default-features = false, features = ["std"] } to
I don't know what the deal is with that specific version of |
@loewenheim I believe you have another dependency that enables
|
Here's the output:
|
Seems |
Since I merged #2243, this should be fixed on the |
Unfortunately, that hasn't seemed to fix it for me. I now get
but the build still fails with exactly the same error as before. |
@loewenheim Replacing dependencies with git doesn't replace dependencies of dependencies with git. It needs to add a [patch.crates-io]
futures = { git = "https://github.com/rust-lang/futures-rs" }
futures-core = { git = "https://github.com/rust-lang/futures-rs" }
futures-channel = { git = "https://github.com/rust-lang/futures-rs" }
futures-executor = { git = "https://github.com/rust-lang/futures-rs" }
futures-io = { git = "https://github.com/rust-lang/futures-rs" }
futures-macro = { git = "https://github.com/rust-lang/futures-rs" }
futures-sink = { git = "https://github.com/rust-lang/futures-rs" }
futures-task = { git = "https://github.com/rust-lang/futures-rs" }
futures-util = { git = "https://github.com/rust-lang/futures-rs" } (In any case, I should create a new release...) |
Still no luck, I'm afraid. Though I'm not entirely sure that the problems are caused by this issue.
|
@loewenheim
|
I installed rust via
Adding the |
Possibly related: rust-lang/rust#78210
|
I finally figured out what the issue on my end was—it was a |
Is the problem tracked on the NixOS side? (I searched for it a few days ago but I couldn't find any related issues...) |
I'm sorry, I was being unclear. It was a problem with my specific NixOS configuration. |
Ah, ok, thanks for clarifying. |
@loewenheim: It seems some people encountered the same problem as you encountered (e.g., #2253). If you could tell us information about what configuration was the cause is very helpful. |
@jbaublitz: We have published 0.3.8. Can you see if it fixed the problem you encountered? |
This may help: I've encountered the same issue (on NixOS) in an older rust nightly version (I believe it was the nightly from 22th October), after I've updated to the most recent (8th November) (using rustup) the issue was gone. @loewenheim and all NixOS users have you tried the most recent nightly rust toolchain? I'm not sure though if the rust toolchain update was the only necessary fix. For me it stopped working (with the same issue as @loewenheim had), and after some time (I didn't actively pursue this issue) it started working again... |
This error is likely https://superuser.com/questions/537683/how-to-fix-lib-x86-64-linux-gnu-libc-so-6-version-glibc-2-14-not-found.
|
In my case, it worked like this: my system depends on the
I also make local dev environments for Rust projects. I use nix + direnv for this. I put this in the file
and this in
This automatically rebuilds the dev environment whenever The
After doing either 1. or 2., you also have to update the flake using |
Thanks @loewenheim for the detailed information! |
|
@jbaublitz: I think this is the solution to the error you encountered. (tl; dr, It seems that it can be fixed by installing |
@taiki-e I'll try to test this out when I get the change in my CI pipeline. |
Hi @taiki-e, sorry this took so long! I was previously testing on a very handspun Ubuntu docker image. I've switched over to alpine with libc6-compat and it works perfectly. Thanks for your help! Closing. |
For future NixOS users googling this error message, this can also happen when using rustup and updating your system / glibc version. Clearing |
I have a CI pipeline that tests my project on glibc and musl and it appears that when I pull in futures-util as a dependency, this compiles just fine on glibc but does not compile on musl.
Here is the build log: https://travis-ci.org/github/jbaublitz/neli/jobs/738716295
This appears to be due to
futures-macro
exporting all of its procedural macros with#[proc_macro_hack]
which is not allowed on musl.I know that rust and musl have had problems in the past related to proc macros and I'm wondering if this is the right place to report this or if this should go into the rust repo.
The text was updated successfully, but these errors were encountered: