-
-
Notifications
You must be signed in to change notification settings - Fork 40
Linking error with make build #40
Comments
Hum... that's strange. It works from my machine. Which Python version are you using and Operating System are you using? How did you install Python? |
I can reproduce this even with only cargo build error
The problem is that the extension module feature clashes with building binaries. More specifically, pyo3's tells the linker tells to link libpython when the extension-module feature is not activated. This is required to build binaries. We can emulate those flags by passing them by hand, which builds without any linker errors.
The problem is that those flags make the elf files link some extra shared libraries. With extension-module we the following
while we get that without:
The latter one is not only undesirable, but also not manylinux compliant, i.e. you can't publish that library without lying to pypi about the manylinux compliance. The best solution would be activating the extension-module features depending on the target (lib vs. bin), but unfortunately cargo doesn't support that yet. I'm also not proficient enough to tell if there's some way to fix this in pyo3's build file. |
I filed an issue for that: rust-lang/cargo#5881 |
Good idea. Thanks for that. 👍 |
Is there a way to not include a python version for the |
Whelp, the obvious thing would be to have an environment variable for the Python version:
I'm not sure if I like that, though. |
make build
and by extensioncargo build
,cargo test
andcargo bench
fail with the following error:Perhaps the build command should be modified to match
setuptools-rust
one?E.g.
The text was updated successfully, but these errors were encountered: