Running the above command succeeds, but shown a warning:
⚠️ Warning: Couldn't find the symbol `PyInit_testmodule` in the native library. Python will fail to import this module. If you're using pyo3, check that `#[pymodule]` uses `testmodule` as module name
I've checked the extension module with objdump, and it indeed does not export any symbols.
Building the same extension without --zig results in a working module exporting PyInit_testmodule.
Your Python version (python -V)
Python 3.10.4
Your pip version (pip -V)
pip 21.0
What bindings you're using
pyo3
Does cargo build work?
[X] Yes, it works
If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?
[X] Yes
Steps to Reproduce
Build with maturin build --target x86_64-pc-windows-gnu --zig
Build with maturin build --target x86_64-pc-windows-gnu
The first command results in a broken module, the second command works.
Bug Description
Running the above command succeeds, but shown a warning:
I've checked the extension module with
objdump
, and it indeed does not export any symbols.Building the same extension without
--zig
results in a working module exportingPyInit_testmodule
.Your Python version (
python -V
)Python 3.10.4
Your pip version (
pip -V
)pip 21.0
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
maturin build --target x86_64-pc-windows-gnu --zig
maturin build --target x86_64-pc-windows-gnu