rust-sdl2: "bundled" in v0.34.3 is broken on Windows

Compilation of the crate fails with the following error:

failed to run custom build command for sdl2-sys v0.34.3

Explicity requesting v0.3.42 for sdl2-sys fixes the issue:

[dependencies.sdl2-sys] version = “=0.34.2”

Everything then compiles & runs as it should.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 23 (14 by maintainers)

Commits related to this issue

Most upvoted comments

If it’s of any use to anyone: I never fail if I use the bundled feature together with the static-link one, for whatever reason. Is there something weird with the library binaries or something?

The error I’m getting is that it seems like vcpkg is complaining about a casing difference between release and Release.

Vcpkg is unable to link because we cannot decide between Release and Debug libraries. Please define the property VcpkgConfiguration to be 'Release' or 'Debug' (currently 'release').

I assume from here -> https://github.com/Rust-SDL2/rust-sdl2/blob/master/sdl2-sys/build.rs#L273

?

I looked at it a little the other night and it fails here:

        for modified_file in patch_set.modified_files() {
            use std::io::{Write, BufRead};

            let file_path = sdl2_source_path.join(modified_file.path());
            let old_path = sdl2_source_path.join(format!("{}_old", modified_file.path()));
>>          fs::rename(&file_path, &old_path)
                .expect(&format!(
                    "Rename of {} to {} failed",
                    file_path.to_string_lossy(),
                    old_path.to_string_lossy()));

The filename, directory name, or volume label syntax is incorrect. (os error 123) on the fs::rename call

format!("{}_old" might should be old_{} but that doesn’t fix it. The odd thing is, I made a throw-away program that called fs::rename on the same paths and it worked fine. Really seems like it would be easy to fix but I didn’t figure out a working solution in the short amount of time I messed with it.