Closed pylasnier closed 2 months ago
A note that this Cargo change introduces swaps of hyphens and underscores for the lib file in many places throughout the generate CMake files, and simply changing the linker argument back is not enough to fix the build.
Huh, it's likely a simple-ish fix of just changing the crate name to use underscores for consistency. It's not like it gets uploaded or distributed outside the project.
I'll see about poking at this over the weekend since the way Windows finds the lib is a bit custom.
(I don't suppose there's a way to force the Cargo 1.78 behavior anywhere, is there?)
(I don't suppose there's a way to force the Cargo 1.78 behavior anywhere, is there?)
This comment from the offending pull request implies that backwards compatibility is retained, but that isn't the case for Ishiiruka or even other projects, it seems.
it's likely a simple-ish fix of just changing the crate name to use underscores for consistency.
This seems to be what other projects with similar failures are doing, though corrosion (which seems to be where the mismatch arises from) also fixes this in v0.5.0 without requiring a name change.
I can confirm that replacing all (non-URL) instances of slippi-rust-extensions
with slippi_rust_extensions
in the main repo and the Rust submodule (there's not many instances, only 2 total) builds successfully with Cargo 1.79.0 on Linux.
I can confirm that replacing all (non-URL) instances of
slippi-rust-extensions
withslippi_rust_extensions
in the main repo and the Rust submodule (there's not many instances, only 2 total) builds successfully with Cargo 1.79.0 on Linux.
I've written a small PR which adds these changes
Cargo 1.79 has changed behaviour where dashes are replaced with underscores in lib names, as listed in their changelog. This appears to have broken the Ishiiruka build by causing CMake to generate an incorrectly hyphenated arguments, with it failing at linking for not finding the
slippi_rust_extensions
lib. I have not tried to build for any version beyond Rust 1.79, but the linker argument generated (listed below) is still hyphenated in nightly.Expected Behavior
Build (normal behaviour with Cargo 1.78).
-lslippi_rust_extensions
with underscores is passed to the linker.Current Behavior
With Cargo 1.79, build fails with:
where
-lslippi-rust-extensions
with hyphens is passed to the linker.Steps to Reproduce
rustc
and Cargo with Rust version 1.79Environment
NixOS, built in
nix-shell
environment.