Skip to content
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

rustc 1.73 breaks crate2nix cross compilation #313

Closed
ghost opened this issue Nov 11, 2023 · 5 comments
Closed

rustc 1.73 breaks crate2nix cross compilation #313

ghost opened this issue Nov 11, 2023 · 5 comments

Comments

@ghost
Copy link

ghost commented Nov 11, 2023

Heads up, crate2nix cross compilation breaks in a really bizzarre way with rustc 1.73 (merged to nixpkgs staging but not yet on master).

Here's the sort of error I get (git revert on just the bump commit 4dd6faeac97ed065cacb470dfb06938657476470 produces a successful build):

unpacking sources
unpacking source archive /nix/store/jh7v7dxcggd9bwgc26bgsni5pcpx3lyf-base64-0.9.3.tar.gz
source root is base64-0.9.3
setting SOURCE_DATE_EPOCH to timestamp 1536935516 of file base64-0.9.3/Cargo.toml.orig
patching sources
updateAutotoolsGnuConfigScriptsPhase
updateAutotoolsGnuConfigScriptsPhase
configuring
Running cd .
building
Building src/lib.rs (base64)
Running rustc --crate-name base64 src/lib.rs --out-dir target/lib -L dependency=target/deps --cap-lints allow -C opt-level=3 -C codegen-units=1 --remap-path-prefix=/build=/ --extern byteorder=/nix/store/1snfqlgq7724vmwdd5pqr9bybm5hg9dx-rust_byteorder-1.5.0-aarch64-unknown-linux-gnu-lib/lib/libbyteorder-4edd459ab3.rlib --extern safemem=/nix/store/
error[E0460]: found possibly newer version of crate `std` which `safemem` depends on
 --> src/line_wrap.rs:1:1
  |
1 | extern crate safemem;
  | ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: perhaps that crate needs to be recompiled?
  = note: the following crate versions were found:
          crate `std`: /nix/store/ydcb6kcnwd21x20094np93lsmv0mx0j2-aarch64-unknown-linux-gnu-rustc-1.73.0/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-96a218355ebbc422.rlib
          crate `std`: /nix/store/ydcb6kcnwd21x20094np93lsmv0mx0j2-aarch64-unknown-linux-gnu-rustc-1.73.0/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-96a218355ebbc422.so
          crate `safemem`: /nix/store/qia0skxhqnvsd1j6mvrfvgdc1zd6x950-rust_safemem-0.3.3-aarch64-unknown-linux-gnu-lib/lib/libsafemem-ef842881df.rlib

error: aborting due to previous error

For more information about this error, try `rustc --explain E0460`.

I am investigating. Most likely lead is this part of the output:

-          crate `std`: /nix/store/ydcb6k.../lib/libstd-96a218355ebbc422.rlib
+          crate `std`: /nix/store/ydcb6k.../lib/libstd-96a218355ebbc422.so
@ghost ghost mentioned this issue Nov 11, 2023
17 tasks
@ghost
Copy link
Author

ghost commented Nov 11, 2023

This doesn't affect all crates.

In fact, I'm having a hard time identifying the common feature of the crates it does affect.

So instead I'm trying a git bisect of rust to see which change over there caused trouble.

@ghost
Copy link
Author

ghost commented Nov 12, 2023

@flokli
Copy link
Contributor

flokli commented Dec 11, 2023

I think this got fixed with #309, no? Can this issue be closed?

@flokli
Copy link
Contributor

flokli commented Jan 14, 2024

@kolloch can this be closed?

@kolloch
Copy link
Collaborator

kolloch commented Jan 15, 2024

@flokli I wish I new. @amjoseph-nixpkgs can it be closed?

@ghost ghost closed this as completed Jan 18, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants