Bug Description
I have two crates, cell and mitochondria, where cell depends on mitochondria. Each has pyo3 bindings on its own. If mitochondria has cdylib as crate-type, trying to maturin build on mac os will fail with pyo3 linker errors, with only the default crate-type rlib or on ubuntu and windows it works. I've made a minimal example with github actions at https://github.com/konstin/maturin-mac-os-dep-repro.
The error looks like it's missing the link-arg=-undefined/link-arg=dynamic_lookup, even though they are present and work for the top level crate.
[package]
name = "mitochondria"
version = "0.1.0"
edition = "2021"
[lib]
# REMOVE cdyblib FROM THE LINE BELOW TO MAKE THIS PASS
crate-type = ["cdylib", "rlib"]
[dependencies]
pyo3 = { version = "0.17.1", features = ["extension-module"] }
[package]
name = "cell"
version = "0.1.0"
edition = "2021"
[lib]
crate-type = ["cdylib", "rlib"]
[dependencies]
pyo3 = { version = "0.17.1", features = ["extension-module"] }
mitochondria = { path = "mitochondria" }
Your Python version (python -V)
3.8
Your pip version (pip -V)
22.2.2
What bindings you're using
pyo3
Does cargo build work?
n/a, this is a linker error
If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?
Steps to Reproduce
See minimal example at https://github.com/konstin/maturin-mac-os-dep-repro
Ubuntu, passing: https://github.com/konstin/maturin-mac-os-dep-repro/runs/8144523404?check_suite_focus=true
Mac os, failing: https://github.com/konstin/maturin-mac-os-dep-repro/runs/8144523536?check_suite_focus=true
Bug Description
I have two crates, cell and mitochondria, where cell depends on mitochondria. Each has pyo3 bindings on its own. If mitochondria has
cdylibascrate-type, trying tomaturin buildon mac os will fail with pyo3 linker errors, with only the default crate-typerlibor on ubuntu and windows it works. I've made a minimal example with github actions at https://github.com/konstin/maturin-mac-os-dep-repro.The error looks like it's missing the
link-arg=-undefined/link-arg=dynamic_lookup, even though they are present and work for the top level crate.Your Python version (
python -V)3.8
Your pip version (
pip -V)22.2.2
What bindings you're using
pyo3
Does
cargo buildwork?n/a, this is a linker error
If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash
/)?Steps to Reproduce
See minimal example at https://github.com/konstin/maturin-mac-os-dep-repro
Ubuntu, passing: https://github.com/konstin/maturin-mac-os-dep-repro/runs/8144523404?check_suite_focus=true
Mac os, failing: https://github.com/konstin/maturin-mac-os-dep-repro/runs/8144523536?check_suite_focus=true