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

Maturin fails on windows-server 2022 #818

Closed
ritchie46 opened this issue Feb 24, 2022 · 3 comments
Closed

Maturin fails on windows-server 2022 #818

ritchie46 opened this issue Feb 24, 2022 · 3 comments

Comments

@ritchie46
Copy link

Github actions is rolling out windows-server 2022.

A pipeline that succeeds on windows-server 2019 fails on this newer version with:

Caused by:
  process didn't exit successfully: `D:\a\polars\polars\py-polars\target\debug\build\libz-sys-996298c675135f9e\build-script-build` (exit code: 101)
  --- stdout
  cargo:rerun-if-env-changed=LIBZ_SYS_STATIC
  cargo:rerun-if-changed=build.rs
  CMAKE_TOOLCHAIN_FILE_x86_64-pc-windows-msvc = None
  CMAKE_TOOLCHAIN_FILE_x86_64_pc_windows_msvc = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-pc-windows-msvc = None
  CMAKE_GENERATOR_x86_64_pc_windows_msvc = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-pc-windows-msvc = None
  CMAKE_PREFIX_PATH_x86_64_pc_windows_msvc = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-pc-windows-msvc = None
  CMAKE_x86_64_pc_windows_msvc = None
  HOST_CMAKE = None
  CMAKE = None

  --- stderr
  thread 'main' panicked at '

  couldn't determine visual studio generator
  if VisualStudio is installed, however, consider running the appropriate vcvars script before building this crate
  ', C:\Users\runneradmin\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.48\src\lib.rs:878:25
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: build failed
💥 maturin failed
  Caused by: Failed to build a native library through cargo
  Caused by: Cargo build finished with "exit code: 101": `cargo rustc --message-format json --manifest-path Cargo.toml --lib -- -L native=C:\hostedtoolcache\windows\Python\3.10.2\x64\libs`
mingw32-make: *** [Makefile:43: build-and-test-no-venv] Error 1

I don't know if this is a bug on maturins side or on the new setup of windows-server 2022. In any case it's good to check here.

@messense
Copy link
Member

Thanks for the report, does cargo build work on windows-server 2022?

@messense
Copy link
Member

messense commented Feb 24, 2022

According to rust-lang/cmake-rs#141, you need to update the cc crate.

https://github.com/pola-rs/polars/blob/bd424be979275a296a0d7b07e35ea17c216b84bf/py-polars/Cargo.lock#L246

This needs to be updated to 1.0.73.

@ritchie46
Copy link
Author

Right! Thanks. That seems to be the case indeed. 🙌

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

2 participants