You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compiling numpy v0.23.0
error[E0432]: unresolved import `pyo3::sync::GILProtected`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/numpy-0.23.0/src/datetime.rs:63:12
|
63 | use pyo3::{sync::GILProtected, Bound, Py, Python};
| ^^^^^^^^^^^^^^^^^^ no `GILProtected` in `sync`
|
As yet unable to locally replicate error with Docker. Local machine is a Mac, for which all automated tests pass without error.
Failed runs with detailed errors linked above.
Your maturin version (maturin --version)
1.8.1
Your Python version (python -V)
3.13.1
Your pip version (pip -V)
24.3.1
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
Import both pyo3 = 0.23.3 and numpy = 0.23.0
Create a pyfunction that forces the numpy dependency to compile (does not actually have to use numpy in any capacity).
Add this pyfunction to a pymodule.
Push to github. Automated checks for certain ubuntu versions will fail to import pyo3::sync::GILProtected. See runs linked above for full errors. The minimal repo that replicates this bug is located at https://github.com/nrposner/pyo3_bug
📦 Built wheel for CPython 3.13 to dist/pyo3_bug-0.1.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Compiling pyo3-build-config v0.23.4
Compiling pyo3-macros-backend v0.23.4
Compiling pyo3-ffi v0.23.4
Compiling pyo3 v0.23.4
Compiling pyo3-macros v0.23.4
Compiling numpy v0.23.0
error[E0432]: unresolved import `pyo3::sync::GILProtected`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/numpy-0.23.0/src/datetime.rs:63:12
|
63 | use pyo3::{sync::GILProtected, Bound, Py, Python};
| ^^^^^^^^^^^^^^^^^^ no `GILProtected` in `sync`
|
note: found an item that was configured out
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pyo3-0.23.4/src/sync.rs:47:12
|
47 | pub struct GILProtected<T> {
| ^^^^^^^^^^^^
note: the item is gated here
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pyo3-0.23.4/src/sync.rs:46:1
|
46 | #[cfg(not(Py_GIL_DISABLED))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0432]: unresolved import `pyo3::sync::GILProtected`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/numpy-0.23.0/src/strings.rs:15:5
|
15 | sync::GILProtected,
| ^^^^^^^^^^^^^^^^^^ no `GILProtected` in `sync`
|
= note: unresolved item `crate::datetime::units::GILProtected` exists but is inaccessible
note: found an item that was configured out
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pyo3-0.23.4/src/sync.rs:47:12
|
47 | pub struct GILProtected<T> {
| ^^^^^^^^^^^^
note: the item is gated here
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pyo3-0.23.4/src/sync.rs:46:1
|
46 | #[cfg(not(Py_GIL_DISABLED))]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For more information about this error, try `rustc --explain E0432`.
error: could not compile `numpy` (lib) due to 2 previous errors
💥 maturin failed
Caused by: Failed to build a native library through cargo
Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_CONFIG_FILE="/home/runner/work/pyo3_bug/pyo3_bug/target/maturin/pyo3-config-aarch64-unknown-linux-gnu-3.13.txt" "cargo" "rustc" "--features" "pyo3/extension-module" "--target" "aarch64-unknown-linux-gnu" "--message-format" "json-render-diagnostics" "--manifest-path" "/home/runner/work/pyo3_bug/pyo3_bug/Cargo.toml" "--release" "--lib"`
Error: The process '/usr/bin/docker' failed with exit code 1
at ExecState._setResult (/home/runner/work/_actions/PyO3/maturin-action/v1/dist/index.js:1702:25)
at ExecState.CheckComplete (/home/runner/work/_actions/PyO3/maturin-action/v1/dist/index.js:1685:18)
at ChildProcess.<anonymous> (/home/runner/work/_actions/PyO3/maturin-action/v1/dist/index.js:1579:27)
at ChildProcess.emit (node:events:519:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5)
Error: The process '/usr/bin/docker' failed with exit code 1
Attempts to replicate the error locally by replicating the Ubuntu 22.04 aarch64/arm7 environment in Docker have not yet been successful.
The text was updated successfully, but these errors were encountered:
Bug Description
Similar to #2385, maturin fails automated checks for some Ubuntu platforms , linux (ubuntu-22.04, aarch64), musllinux (ubuntu-22.04, arm7), due to unresolved import of
pyo3::sync::GILProtected
.As yet unable to locally replicate error with Docker. Local machine is a Mac, for which all automated tests pass without error.
Failed runs with detailed errors linked above.
Your maturin version (
maturin --version
)1.8.1
Your Python version (
python -V
)3.13.1
Your pip version (
pip -V
)24.3.1
What bindings you're using
pyo3
Does
cargo build
work?If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash
/
)?Steps to Reproduce
pyo3 = 0.23.3
andnumpy = 0.23.0
The text was updated successfully, but these errors were encountered: