Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conan package builds #1764

Open
maximiliank opened this issue Feb 19, 2024 · 3 comments
Open

Conan package builds #1764

maximiliank opened this issue Feb 19, 2024 · 3 comments

Comments

@maximiliank
Copy link

maximiliank commented Feb 19, 2024

You have to build in manylinux. Manylinux requires only small subset of system libraries and an old GLIBC. The manylinux image uses RHEL's developer kit to provide a newer version of GCC that only links with the older GLIBC. The manylinux docker image is at quay.io/pypa/manylinux2014_x86_64:latest. manylinux2014 is GLIBC 2.17 based, which is much older than ubuntu 18.04 (2.27). If you used manylinux_2_28 (which is GLIBC 2.28) in cibuildwheel, then your 18.04 one might work. But don't do that, just build everything inside manylinux.

Originally posted by @henryiii in #1556 (comment)

Is it really required to build in manylinux or will it also work to build in the underlying docker container? E.g. manylinux_2_28 is based on almalinux 8 (see https://github.com/pypa/manylinux?tab=readme-ov-file#manylinux_2_28-almalinux-8-based), so would the almalinux 8 image be sufficient?

@joerick
Copy link
Contributor

joerick commented Feb 20, 2024

cibuildwheel is pretty tightly coupled to manylinux. Manylinux comes with preinstalled Pythons at specific paths, and tools like auditwheel that cibuildwheel uses. That said, there's nothing stopping you from making your own image and specifying it in the options. Though you might be better off starting from an existing manylinux image, otherwise you'll spend a lot of time recreating what manylinux has already done.

@maximiliank
Copy link
Author

maximiliank commented Feb 20, 2024

Sorry, I have to be more precise in my question. I am building python wheels using a C++ extension and for sure I want to build those inside manylinux. But my question was about building the conan dependencies. Is it sufficient to build those in e.g. the almalinux image and then consume them in the manylinux container during cibuildwheel?

@henryiii
Copy link
Contributor

I believe so, as long as it passes auditwheel. It should be fine if it's built with an equal or previous version of the GLIBC kernel. The only issue that can come up is if you link to something in the base distro that is not on "many" linux distros, but I think auditwheel will detect that. You can read more about manylinux in PEP 599 and PEP 600.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants