-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Issues with 'version `GLIBC_2.32' not found' when running clippy on CI #54
Comments
Cannot reproduce on a empty project with a Please check these:
If possible, please also provide the (minimized) project's |
Tried these:
I also can't reproduce locally on NixOS, only on github actions (which are Nix on Ubuntu, not NixOS, that's why maybe the thread above is relevant). I'll see if I can provide a minimized reproduction case, in general it seems that |
version
GLIBC_2.32' not found` when running clippy on CI
I mainly concern about the The error is like that when compiling proc-macro crate You can also try to add |
I think it must be an issue specific to clippy: I've added
clippy still fails the same way. The comment here mentions something about bootstrap being patched on NixOS, but not Nix on other Linux platforms: https://internals.rust-lang.org/t/bootstrap-fails-with-linker-error-while-running-on-non-nixos-nix-environment-wsl2-ubuntu/15066/7 |
I am also getting this. It seems that the
|
Compared to the
|
More specifically, the (working) Nixpkgs one has
whereas the one from this overlay has
where |
I'm getting this error too on $ ldd --version
ldd (Ubuntu GLIBC 2.31-0ubuntu9.2) 2.31 I tried Mozilla's overlay as well as using the cargo package from |
That's unrelated. I cannot reproduce it on my Arch VM, but do reproduce it on GitHub CI. The log said CI log, (using nightly default, but still it try to invoke |
I also run into this problem. I can confirm that this only happened on Ubuntu with nix on CI, and works good on NixOS. |
Okay, I got it. When
I don't think For anyone running into this issue, please run |
@oxalica I don't have a very thorough understanding of Nix, but would it be possible to somehow use |
Yes and no. You can set it to Personally, I hate the design of |
Makes sense. Here's how I fixed the problem on my system: mv ~/.cargo/bin/* ~/.local/bin I'll have to do this every time I upgrade, I imagine, but it solves the problem for now. @oxalica if there's any way the Cargo team can fix this (say, an environment variable like |
For future reference, when running into this issue it appeared to me as the following error :
I searched for this error message in the issues but couldn’t see something that fit. Based on what I read in NixOS/nixpkgs#92946, I added the following to my {
LD_LIBRARY_PATH =
# Clippy appears to requires zlib on linux
lib.optionals pkgs.stdenv.isLinux
(lib.makeLibraryPath [ pkgs.zlib ]);
} This then uncovered the
This led me to this issue! Based on the above discussion, I removed my # This is a workaround for https://github.com/oxalica/rust-overlay/issues/54,
# avoiding link errors when running cargo commands with `nix develop`.
- name: Remove existing binaries from ~/.cargo/bin
run: rm --recursive --force --verbose ~/.cargo/bin Hope this helps anyone in the future!
Yet again wishing for rust-lang/rfcs#1615 I guess? 😅 |
This works around link errors that result from cargo looking for for binaries in `~/.cargo/bin` that were installed by default on the Github job runner. See oxalica/rust-overlay#54 for details.
When running
nix develop -c cargo clippy --all-targets -- -D warnings
it fails during proc macro checking:However compiling, running tests,
nix develop -c cargo fmt
ornix develop -c cargo build --release --target wasm32-unknown-unknown
all works fine.Possibly related: https://internals.rust-lang.org/t/bootstrap-fails-with-linker-error-while-running-on-non-nixos-nix-environment-wsl2-ubuntu/15066/2
The text was updated successfully, but these errors were encountered: