Skip to content

Fix build with Rust 1.88 #169

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

Merged
merged 2 commits into from
Jul 15, 2025
Merged

Fix build with Rust 1.88 #169

merged 2 commits into from
Jul 15, 2025

Conversation

K900
Copy link
Contributor

@K900 K900 commented Jul 6, 2025

No description provided.

@dtomvan
Copy link

dtomvan commented Jul 6, 2025

Yeah, I have no idea why rust did this, because the two versions are completely incompatible with each other: you cannot compile it anymore under 1.86 after this change. Also for 1.88 you could remove #![feature(naked_functions)] because it has finally been stabilized

@ilyagr
Copy link

ilyagr commented Jul 15, 2025

Perhaps https://docs.rs/rustversion/latest/rustversion/ might help if you need different attr on different Rust versions.

Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/910796cabe436259a29a72e8d3f5e180fc6dfacc' (2025-05-31)
  → 'github:NixOS/nixpkgs/62e0f05ede1da0d54515d4ea8ce9c733f12d9f08' (2025-07-14)
@Mic92 Mic92 enabled auto-merge July 15, 2025 05:32
@Mic92
Copy link
Member

Mic92 commented Jul 15, 2025

nix-ld> error: variables can be used directly in the `format!` string
nix-ld>   --> build.rs:36:5
nix-ld>    |
nix-ld> 36 |     println!("cargo:rustc-env=NIX_LD_TEST_TARGET={}", target);
nix-ld>    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nix-ld>    |
nix-ld>    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
nix-ld>    = note: `-D clippy::uninlined-format-args` implied by `-D warnings`
nix-ld>    = help: to override `-D warnings` add `#[allow(clippy::uninlined_format_args)]`
nix-ld> help: change this to
nix-ld>    |
nix-ld> 36 -     println!("cargo:rustc-env=NIX_LD_TEST_TARGET={}", target);
nix-ld> 36 +     println!("cargo:rustc-env=NIX_LD_TEST_TARGET={target}");
nix-ld>    |
nix-ld> 
nix-ld> error: variables can be used directly in the `format!` string
nix-ld>   --> build.rs:40:49
nix-ld>    |
nix-ld> 40 |     if let Ok(target_default_nix_ld) = env::var(format!("DEFAULT_NIX_LD_{}", target_suffix)) {
nix-ld>    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nix-ld>    |
nix-ld>    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
nix-ld> help: change this to
nix-ld>    |
nix-ld> 40 -     if let Ok(target_default_nix_ld) = env::var(format!("DEFAULT_NIX_LD_{}", target_suffix)) {
nix-ld> 40 +     if let Ok(target_default_nix_ld) = env::var(format!("DEFAULT_NIX_LD_{target_suffix}")) {
nix-ld>    |
nix-ld> 
nix-ld> error: variables can be used directly in the `format!` string
nix-ld>   --> build.rs:41:9
nix-ld>    |
nix-ld> 41 |         println!("cargo:rustc-env=DEFAULT_NIX_LD={}", target_default_nix_ld);
nix-ld>    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nix-ld>    |
nix-ld>    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
nix-ld> help: change this to
nix-ld>    |
nix-ld> 41 -         println!("cargo:rustc-env=DEFAULT_NIX_LD={}", target_default_nix_ld);
nix-ld> 41 +         println!("cargo:rustc-env=DEFAULT_NIX_LD={target_default_nix_ld}");
nix-ld>    |
nix-ld> 
nix-ld> error: variables can be used directly in the `format!` string
nix-ld>   --> build.rs:46:9
nix-ld>    |
nix-ld> 46 |         println!("cargo:rustc-env=NIX_SYSTEM={}", underscored);
nix-ld>    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
nix-ld>    |
nix-ld>    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
nix-ld> help: change this to
nix-ld>    |
nix-ld> 46 -         println!("cargo:rustc-env=NIX_SYSTEM={}", underscored);
nix-ld> 46 +         println!("cargo:rustc-env=NIX_SYSTEM={underscored}");
nix-ld>    |
nix-ld> 
nix-ld> error: could not compile `nix-ld` (build script) due to 4 previous errors
error: build of '/nix/store/ihxfg7b7sgriywaw6h9kmpq7vhxpvfva-nix-ld.drv' on 'ssh-ng://nix@yasmin' failed: builder for '/nix/store/ihxfg7b7sgriywaw6h9kmpq7vhxpvfva-nix-ld.drv' failed with exit code 101;
       last 25 log lines:
       >    |
       > 41 |         println!("cargo:rustc-env=DEFAULT_NIX_LD={}", target_default_nix_ld);
       >    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       >    |
       >    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
       > help: change this to
       >    |
       > 41 -         println!("cargo:rustc-env=DEFAULT_NIX_LD={}", target_default_nix_ld);
       > 41 +         println!("cargo:rustc-env=DEFAULT_NIX_LD={target_default_nix_ld}");
       >    |
       >
       > error: variables can be used directly in the `format!` string
       >   --> build.rs:46:9
       >    |
       > 46 |         println!("cargo:rustc-env=NIX_SYSTEM={}", underscored);
       >    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       >    |
       >    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
       > help: change this to
       >    |
       > 46 -         println!("cargo:rustc-env=NIX_SYSTEM={}", underscored);
       > 46 +         println!("cargo:rustc-env=NIX_SYSTEM={underscored}");
       >    |
       >
       > error: could not compile `nix-ld` (build script) due to 4 previous errors
       For full logs, run:
         nix log /nix/store/ihxfg7b7sgriywaw6h9kmpq7vhxpvfva-nix-ld.drv
error: Cannot build '/nix/store/ihxfg7b7sgriywaw6h9kmpq7vhxpvfva-nix-ld.drv'.
       Reason: builder failed with exit code 1.
       Output paths:
         /nix/store/9v33ngx26h16fjp71y8r1faswkjplygj-nix-ld
program finished with exit code 1
elapsedTime=68.051891

auto-merge was automatically disabled July 15, 2025 05:37

Head branch was pushed to by a user without write access

@Mic92 Mic92 enabled auto-merge July 15, 2025 05:39
@Mic92 Mic92 added this pull request to the merge queue Jul 15, 2025
Merged via the queue into nix-community:main with commit 9618dac Jul 15, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

4 participants