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
Can your docker images (manylinux2014-cross or manylinux_2_28-cross) be used to cross compile a rust project for an armv7 machine which is using pyo3 to call python? If possible, I would prefer a static embedding of python into the binary.
Here is what I have tried so far:
Create a docker image based on manylinux2014-cross with rust toolchain installed
FROM messense/manylinux2014-cross:armv7
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN /root/.cargo/bin/rustup target add armv7-unknown-linux-gnueabihf
Create a tiny rust project inside the corresponding docker container
Cargo.toml:
[package]
name = "foo"version = "0.1.0"edition = "2021"
[dependencies]
pyo3 = { version = "0.18.3", features = ["auto-initialize"] }
Build with PYO3_CROSS_PYTHON_VERSION=3.11 cargo build
The build fails due to a linker error: ld: cannot find -lpython3.11. It seems to me there is a python installation missing for the target system. Is there an easy way to fix that issue?
The text was updated successfully, but these errors were encountered:
Can your docker images (manylinux2014-cross or manylinux_2_28-cross) be used to cross compile a rust project for an armv7 machine which is using pyo3 to call python? If possible, I would prefer a static embedding of python into the binary.
Here is what I have tried so far:
Cargo.toml
:main.rs
:PYO3_CROSS_PYTHON_VERSION=3.11 cargo build
The build fails due to a linker error:
ld: cannot find -lpython3.11
. It seems to me there is a python installation missing for the target system. Is there an easy way to fix that issue?The text was updated successfully, but these errors were encountered: