You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Latest path changes on 3.10-slim image leading to errors when building applications with staticx #786
Hi everyone and thank you for maintaining this project. I have used your docker images heavily over the past years :)
Since this morning I am facing issues when running staticx against one of my Python applications. I have successfully built an image yesterday and have not changed anything in my application, but with the latest 3.10-slim image, I get an error with unsupported RPATH/RUNPATH tags, I believe because of the way the paths in the image have changed to absolute paths. #785
I know this sounds like a very specific issue outside your scope, but I would like to at least know if this is intended on your side or not.
Please find the link to the issue with staticx here: JonathonReinhart/staticx#188
$ docker run --rm --pull=always python sh -c 'apt-get update -qq && apt-get install -yqq patchelf && pip3 install staticx && staticx /usr/local/bin/python /usr/local/bin/python-static && python-static --version'latest: Pulling from library/pythonDigest: sha256:a3c0c6766535f85f18e7304d3a0111de5208d73935bcf1b024217005ad5ce195Status: Image is up to date for python:latestdebconf: delaying package configuration, since apt-utils is not installedSelecting previously unselected package patchelf.(Reading database ... 23422 files and directories currently installed.)Preparing to unpack .../patchelf_0.12-1_amd64.deb ...Unpacking patchelf (0.12-1) ...Setting up patchelf (0.12-1) ...Collecting staticx Downloading staticx-0.13.8-py3-none-manylinux1_x86_64.whl (177 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 177.6/177.6 kB 7.7 MB/s eta 0:00:00Collecting pyelftools Downloading pyelftools-0.29-py2.py3-none-any.whl (174 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 174.3/174.3 kB 35.1 MB/s eta 0:00:00Installing collected packages: pyelftools, staticxSuccessfully installed pyelftools-0.29 staticx-0.13.8WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venvPython 3.11.1
Activity
c-gabdalla commentedon Jan 18, 2023
@oktavlachs I found the same errors on official python images, where dtags/runpaths are used even with venvs.
I could circumvent this by using a SO python version, like python 3.8 on debian 11.
The Dockerfile below doesn't work:
But this one works:
oktavlachs commentedon Jan 18, 2023
@c-gabdalla
Fantastic, thanks a lot for this hint! :)
However, I would still appreciate a quick comment on whether this is intended.
tianon commentedon Jan 18, 2023
Looking at JonathonReinhart/staticx#188, we should be fine because we're only (intending, anyhow) to have
rpathvalues relative to$ORIGIN:python/3.11/bullseye/Dockerfile
Lines 56 to 60 in 2592ad8
When I use
readelfto verify that, everything looks fine to me?tianon commentedon Jan 18, 2023
I also can't seem to reproduce:
tianon commentedon Dec 19, 2023
I wasn't able to reproduce the issue, but if it was still reproducible it's hopefully long-since fixed via #790 👍