When attempting to compile a PyO3 library I get the following:
error: cannot produce proc-macro for `ctor v0.1.10` as the target `x86_64-unknown-linux-musl` does not support these crate types
rustc --version): rustc 1.39.0-nightly (0b36e9dea 2019-09-09)version = "0.x.y" with git = "https://github.com/PyO3/pyo3")? Yes. No.sudo docker pull alpine:latest
sudo docker run -it /bin/sh
apk add --update libgcc python3-dev
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
git clone https://github.com/thedrow/fastuuid.git
cd fastuuid
cargo build
So what I can say is
x86_64-unknown-linux-musl is tier-2 support so, yeah, please don't expect everything works fine on thisIf we can consider to drop ctor and/or replace it this issue becomes actionable.
If not, we should simply document the fact that we don't support Alpine.
If we can consider to drop ctor and/or replace it this issue becomes actionable.
From the error message, I'd say that x86_64-unknown-linux-musl doesn't support any proc-macros crate, and given that PyO3 heavily uses proc-macros, I don't know how it could work with that target.
@althonos
You're right, I found that we cannot do that by googling.
https://github.com/rust-lang/rust/issues/40174
Looks like there's an issue around dynamic loading.
As a heads up, I was able to make use of ctor on musl via cross - this might work for PyO3 as well. The important thing is that you build on a platform that supports dynamic linking!
Most helpful comment
As a heads up, I was able to make use of
ctoronmuslviacross- this might work for PyO3 as well. The important thing is that you build on a platform that supports dynamic linking!