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

Build Linux libzim on Bionic #595

Closed
rgaudin opened this issue Apr 18, 2023 · 2 comments · Fixed by #597
Closed

Build Linux libzim on Bionic #595

rgaudin opened this issue Apr 18, 2023 · 2 comments · Fixed by #597
Assignees

Comments

@rgaudin
Copy link
Member

rgaudin commented Apr 18, 2023

I know you just switched from Bionic to focal; with good reasons I believe but it has some unfortunate consequence for python-libzim distribution.

Binary python packages that are not pure python are tied to a platform that helps package managers (pip) pick the appropriate file for an installation.

This notion of platform is somewhat flexible. In Linux, it defaults to linux but can be set more specifically to announce (and should respect) libc-compatibility. There are thus manylinux_1, manylinux_2010, manylinux_2014, and now it's clearer with manylinux_2_28 and the likes.

PEP600 states that a wheel tagged manylinux_x_y shall work on any distro based on glibc>=x.y

It's recommended to use them of course as the package manager can detect an incompatible platform while using linux, your user could install a non-compat one and crash at runtime.

For pylibzim, we've been incorrectly setting the platform as manylinux1 (glic 2.5) while we were building on Focal (glibc 2.31). That's bad 🫣

Now that we have a better building process, we'd like to fix that as well but it's not possible:

  • libzim is built on focal (glibc 2.31)
  • manylinux project doesn't provide an image for building on 2.31. Latest they propose if 2.28

This leaves us with the following choice:

  • A. Build for linux.
    • Mostly work as our users are on 2.31+
    • Prevents us from running the symbols check in the CI
    • Prevents us from automaticly testing the wheels in the CI (tests are ran in another workflow though)
  • B. Create a manylinux-like image with 2.31+
    • It's a lot of work
  • C. Wait for manylinux to distribute a 2.31+ image
    • No idea about when that could be.

Hence this ticket. With a bionic-built libzim, we could properly set manylinux_2_28.

@kelson42
Copy link
Contributor

OK, then lets make a special release for libzim using bionic... in addition to the normal one using focal.

@rgaudin
Copy link
Member Author

rgaudin commented Apr 19, 2023

Same issue for macOS as well. Given we now build libzim on macOS12, we can only offer pylibzim for macOS12+.

macOS audience for pylibzim is different than Linux (mostly developers) so we could require most recent systems.
Given the main constraint being the Github Workflow runner, I propose to stick to the earliest supported macos version on github. That would be macos-11. macos-10.15 is still present but deprecated and should have been removed 6m ago.

It seems this environment variable isn't sufficient in current builds as we produce libs that are 12.0.0+.

def get_env(self):
env = super().get_env()
env['MACOSX_DEPLOYMENT_TARGET'] = '10.15'
return env

I'll look into logs and open a ticket if I can figure it out

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

Successfully merging a pull request may close this issue.

3 participants