Issue with latest Docker images and libffi
Closed this issue ยท 7 comments
This issue is initially reported to Poetry, but after digging up a bit, it turns out it's a PyPy issue. After wrongly reporting it in the PyPy repo, here we are ๐ฏ.
Trying to install Poetry in the latest images for PyPy 3.9 and 3.10 fails with the following error:
/root/.local/share/pypoetry/venv/bin/python: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory
To discard Poetry as the source of the problem, here's a reproducer not involving Poetry:
FROM pypy:3.9-slim
RUN python3 -c 'import venv; builder = venv.EnvBuilder(); builder.create("/tmp/foo")'
RUN /tmp/foo/bin/python3
Alternatively:
The system has libffi v7 installed, while for whatever reason, Python is trying to use v6. This seems to indicate that it has been built incorrectly. This situation doesn't happen on the previous version of said images, namely pypy:3.9-7.3.12-slim and pypy:3.10-7.3.12-slim.
I don't get that behavior on amd64 or arm64.
I don't get that behavior on amd64 or arm64.
so only x86_64 builds are affected? I'm gonna test them later tomorrow or Friday :)
I tried i386 as well and couldn't reproduce
x86_64 and amd64 are two names for the same thing ๐
I was also unable to reproduce:
$ docker build --pull .
Sending build context to Docker daemon 2.048kB
Step 1/3 : FROM pypy:3.9-slim
3.9-slim: Pulling from library/pypy
b5a0d5c14ba9: Already exists
7b4f9f0fcf54: Pull complete
ec89ee97b5e7: Pull complete
7fdc69c6caae: Pull complete
Digest: sha256:40b9f18f3f352119876a1404feb9e0fdfe75e51f204169ae629db26e78109366
Status: Downloaded newer image for pypy:3.9-slim
---> d0c56131ed99
Step 2/3 : RUN python3 -c 'import venv; builder = venv.EnvBuilder(); builder.create("/tmp/foo")'
---> Running in 8adc5c43c392
Removing intermediate container 8adc5c43c392
---> f2c64236a6d2
Step 3/3 : RUN /tmp/foo/bin/python3
---> Running in 999e1e72275b
Removing intermediate container 999e1e72275b
---> 14972e87fb17
Successfully built 14972e87fb17
$ docker run -it --rm 14972e87fb17 /tmp/foo/bin/python3
Python 3.9.18 (3ef7dff0dd829c0622d61504fd522ed918ea3483, Dec 24 2023, 20:20:13)
[PyPy 7.3.14 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>>
I see that there has been a recent push, gonna test all again.
Oh wow, I can confirm this is working now, for both PyPy 3.9 and 3.10. It was likely a temporary issue, which is great :D
I'm not sure what failed in the aforementioned build, but I can say it is no longer an issue ๐