Skip to content

Building for the arm64ec-pc-windows-msvc target triple is failing in released version 0.4.47 #599

Open
@traies

Description

@traies

Hi,

Building the curl crate for ARM64EC in Windows is currently failing. The issue seems to be with a bug in version 0.52.0 of the windows-sys library.

   Compiling windows_x86_64_msvc v0.52.6
   Compiling libc v0.2.170
   Compiling libz-sys v1.1.21
   Compiling windows-targets v0.52.6
   Compiling windows-sys v0.52.0
   Compiling windows-sys v0.59.0
error[E0412]: cannot find type `WSADATA` in this scope
    --> C:\Users\toraies\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows-sys-0.52.0\src\Windows\Win32\Networking\WinSock\mod.rs:198:104
     |
198  | ::windows_targets::link!("ws2_32.dll" "system" fn WSAStartup(wversionrequested : u16, lpwsadata : *mut WSADATA) -> i32);
     |                                                                                                        ^^^^^^^ help: a struct with a similar name exists: `WSPDATA`
...
6380 | pub struct WSPDATA {
     | ------------------ similarly named struct `WSPDATA` defined here

error[E0412]: cannot find type `SERVENT` in this scope
   --> C:\Users\toraies\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows-sys-0.52.0\src\Windows\Win32\Networking\WinSock\mod.rs:272:144
    |
272 | ::windows_targets::link!("ws2_32.dll" "system" fn getservbyname(name : ::windows_sys::core::PCSTR, proto : ::windows_sys::core::PCSTR) -> *mut SERVENT);
    |                                                                                                                                                ^^^^^^^ not found in this scope

error[E0412]: cannot find type `SERVENT` in this scope
   --> C:\Users\toraies\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows-sys-0.52.0\src\Windows\Win32\Networking\WinSock\mod.rs:273:121
    |
273 | ::windows_targets::link!("ws2_32.dll" "system" fn getservbyport(port : i32, proto : ::windows_sys::core::PCSTR) -> *mut SERVENT);
    |                                                                                                                         ^^^^^^^ not found in this scope

error[E0412]: cannot find type `DELAYLOAD_INFO` in this scope
    --> C:\Users\toraies\.cargo\registry\src\index.crates.io-6f17d22bba15001f\windows-sys-0.52.0\src\Windows\Win32\System\WindowsProgramming\mod.rs:2182:140
     |
2182 | ...extern "system" fn(notificationreason: u32, delayloadinfo: *const DELAYLOAD_INFO) -> *mut ::core::ffi::c_void>;
     |                                                                      ^^^^^^^^^^^^^^ not found in this scope
     |
help: you might be missing a type parameter
     |
2182 | pub type PDELAYLOAD_FAILURE_DLL_CALLBACK<DELAYLOAD_INFO> = ::core::option::Option<unsafe extern "system" fn(notificationreason: u32, delayloadinfo: *const DELAYLOAD_INFO) -> *mut ::core::ffi::c_void>;
     |                                         ++++++++++++++++

   Compiling curl-sys v0.4.80+curl-8.12.1 (D:\git\curl-rust\curl-sys)
For more information about this error, try `rustc --explain E0412`.
error: could not compile `windows-sys` (lib) due to 4 previous errors
warning: build failed, waiting for other jobs to finish...

Simply bumping the dependency to version 0.59.0 seems to be sufficient. I'll submit a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions