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

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

Open
traies opened this issue Feb 25, 2025 · 1 comment

Comments

@traies
Copy link
Contributor

traies commented Feb 25, 2025

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.

@traies
Copy link
Contributor Author

traies commented Feb 25, 2025

In the previous PR I missed the fact that socket2 also needs its dependency on windows-sys updated. The build is still broken on the arm64ec-pc-windows-msvc target.

I've created rust-lang/socket2#558 to track that change.

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

1 participant