We are building Rust software in nix-shell. Our Rust is from nixpkgs-unstable. Recently nixpkgs-unstable seems to have switched to glibc 2.34, which causes sadness if the underlying system is using glibc 2.33 (like NixOS 21.11 or Ubuntu). This results in errors like these:
error: /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE
--> /home/julian/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-error-1.0.4/src/lib.rs:284:9
|
284 | pub use proc_macro_error_attr::proc_macro_error;
| ^^^^^^^^^^^^^^^^^^^^^
or
error: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/peter/Development/particle/ws/target/debug/deps/libproc_macro_error_attr-fab057cc0610f574.so)
--> /home/snuernberger/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-error-1.0.4/src/lib.rs:284:9
|
284 | pub use proc_macro_error_attr::proc_macro_error;
| ^^^^^^^^^^^^^^^^^^^^^
If we use nix-shell --pure
and clean up all ~/.cargo
and target
folders, things work, but this is a pretty drastic solution. Most of us want to leak some things from the environment into their nix-shell for productivity.