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

Panic when running maturin build --interpreter python --target x86_64-pc-windows-msvc #1888

Closed
1 of 2 tasks
CastilloDel opened this issue Dec 18, 2023 · 2 comments · Fixed by #1891
Closed
1 of 2 tasks
Labels
bug Something isn't working

Comments

@CastilloDel
Copy link

Bug Description

maturin has panicked. This is a bug in maturin. Please report this
at https://github.com/PyO3/maturin/issues/new/choose.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 environment
variable set and include the backtrace in your report.

Platform: linux x86_64
Version: 1.4.0
Args: maturin build --interpreter python --target x86_64-pc-windows-msvc

thread 'main' panicked at src/main.rs:339:13:
assertion failed: !wheels.is_empty()
stack backtrace:
   0: rust_begin_unwind
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/std/src/panicking.rs:597:5
   1: core::panicking::panic_fmt
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:72:14
   2: core::panicking::panic
             at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962/library/core/src/panicking.rs:127:5
   3: maturin::run
   4: maturin::main

Your maturin version (maturin --version)

1.4.0

Your Python version (python -V)

3.11.6

Your pip version (pip -V)

23.3.2

What bindings you're using

pyo3

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

I was trying to cross compile to windows and I installed cargo-xwin and added the x86_64-pc-windows-msvc target to my rust installation. Running maturin build --interpreter python --target x86_64-pc-windows-msvc got me the panic

Output with RUST_LOG:

2023-12-18T15:30:48.017609Z DEBUG maturin::project_layout: Found pyproject.toml in working directory at "/home/daniel/edaq/qps-client-python/pyproject.toml"
2023-12-18T15:30:48.018391Z DEBUG maturin::project_layout: Using cargo manifest path from working directory: "/home/daniel/edaq/qps-client-python/Cargo.toml"
2023-12-18T15:30:48.019103Z DEBUG maturin::project_layout: Resolving cargo metadata from "/home/daniel/edaq/qps-client-python/Cargo.toml"
2023-12-18T15:30:48.113343Z DEBUG maturin::project_layout: Project layout resolved project_root=/home/daniel/edaq/qps-client-python python_dir=/home/daniel/edaq/qps-client-python rust_module=/home/daniel/edaq/qps-client-python/edaq python_module=/home/daniel/edaq/qps-client-python/edaq extension_name=edaq module_name=edaq
🍹 Building a mixed python/rust project
🔗 Found pyo3 bindings
🐍 Found

===================================================================
maturin has panicked. This is a bug in maturin. Please report this
at https://github.com/PyO3/maturin/issues/new/choose.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 environment
variable set and include the backtrace in your report.

Platform: linux x86_64
Version: 1.4.0
Args: maturin build --interpreter python --target x86_64-pc-windows-msvc

thread 'main' panicked at src/main.rs:339:13:
assertion failed: !wheels.is_empty()
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@CastilloDel CastilloDel added the bug Something isn't working label Dec 18, 2023
@messense

This comment was marked as outdated.

@messense
Copy link
Member

Your command is wrong, when cross compiling you need to specific both the major and minor python version, plain python does not tell maturin the correct version, please try something like maturin build --interpreter python3.11 --target x86_64-pc-windows-msvc.

Nevertheless, the panic should be fixed by #1891.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants