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

[Request] Older Glibc #97

Closed
imxade opened this issue Aug 2, 2024 · 2 comments · Fixed by #98
Closed

[Request] Older Glibc #97

imxade opened this issue Aug 2, 2024 · 2 comments · Fixed by #98
Assignees
Labels
enhancement New feature or request

Comments

@imxade
Copy link

imxade commented Aug 2, 2024

Is your feature request related to a problem? Please describe.

  • newly built executable doesn't work on ubuntu 20.04

Describe the solution you'd like

  • Building Linux executables with older Glibc will ensure better compatibility
@batonogov
Copy link
Owner

batonogov commented Aug 6, 2024

Hi. Thanks for the issue.

I see the solution to your problem as follows, need to create different tags for docker images in the format: ubuntu:20.04-python:3.12.4

This will allow you to get different versions of glibc for different builds.

@batonogov batonogov self-assigned this Aug 6, 2024
@batonogov batonogov added the enhancement New feature or request label Aug 6, 2024
@github-actions github-actions bot linked a pull request Aug 20, 2024 that will close this issue
@batonogov
Copy link
Owner

batonogov commented Aug 20, 2024

I prepared the necessary changes. Since Python images use Debian, I made versions of Bookworm and Bullseye.

If i run bookworm image:

docker run \
  --volume "$(pwd)/test/:/src/" \
  ghcr.io/batonogov/pyinstaller-linux:pr-98-slim-bookworm \
  "pyinstaller --onefile main.py" \
&& docker run --rm -it -v "$(pwd)/test/dist:/dist" ubuntu:20.04 /dist/main

I see error

[7] Failed to load Python shared library '/tmp/_MEIVuPauh/libpython3.12.so.1.0': dlopen: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by /tmp/_MEIVuPauh/libpython3.12.so.1.0)

But if i run bullseye image:

docker run \
  --volume "$(pwd)/test/:/src/" \
  ghcr.io/batonogov/pyinstaller-linux:pr-98-slim-bullseye \
  "pyinstaller --onefile main.py" \
&& docker run --rm -it -v "$(pwd)/test/dist:/dist" ubuntu:20.04 /dist/main

My test application working good:

Response Status Code: 200

Now you can use this image for testing, i make changes to the next release.

batonogov added a commit that referenced this issue Aug 21, 2024
* Add Bookworm and Bullseye image #97

---------

Co-authored-by: Fedor Batonogov <f.batonogov@yandex.ru>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants