Skip to content

Error building wheels for Linux #23

@LDiazN

Description

@LDiazN

When building the final wheels in linux using:

# in ooniauth-py/ 
make wheels

We get the following error:

💥 maturin failed
  Caused by: Error checking for manylinux/musllinux compliance
  Caused by: Your library links libpython (libpython3.10.so.1.0), which libraries must not do. Have you forgotten to activate the extension-module feature?
make: *** [Makefile:4: all] Error 1

This seems to be caused by the current build.rs script. By removing linux from here:

if target_os != "macos" && target_os != "linux" {

We get a successful build. The file seems to be forcing linking against Python3.10, which is not allowed for linux builds:

By default PyO3 links to libpython. This makes binaries, tests, and examples “just work”. However, Python extensions on Unix must not link to libpython

https://pyo3.rs/main/building-and-distribution.html#the-pyo3_build_extension_module-environment-variable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions