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
Not sure where this issue belongs as it there are a couple of issues that all compound to this issue.
I came across this issue when debugging an issue with the latest phpmyadmin docker image.
This image installs some dev packages and compiles a couple of php extensions and then uses ldd on the resulting extensions .so files together with dpkg-query -S to find the packages that need to be kept after the build.
Note: this pattern does seem to be used by more php based containers.
The reason the ldd output point to /lib/x86_64-linux-gnu instead of /usr/lib/x86_64-linux-gnu because both of the paths are in /etc/ld.so.conf.d/x86_64-linux-gnu.conf and it appears the first one take precedence
Removing the /lib/x86_64-linux-gnu line from the ld.so.conf fixes the ldd output; but does not fix the problem.
This is because some packages (for example libbz2-1.0) are still installing to /lib/ instead of /usr/lib so dpkg-query -S does not find these .. and worse even if we would lookup the realpath before calling dpkg-query -S it still does not find them as /usr/lib is the realpath
So in my opinion there are 3 issues:
dpkg-query does not handle soft links (ideally both the install path + given path should be normalized before comparing)
packages still install to /lib instead of /usr/lib
ld.so.conf should only list /usr/lib and not /lib (can only be done after issue 2 is fixed for all packages)
Imho fixing 1 would be the easiest as that would workaround issues 2 & 3.
The text was updated successfully, but these errors were encountered:
Sorry for the delay here, I've been meaning to get back to this for days. 🙇
There's not really anything we can do here in the Docker image itself -- we're faithfully following what the Debian project at large has decided, and the two bugs you've linked are unfortunately the appropriate place to track this bug/misfeature.
Not sure where this issue belongs as it there are a couple of issues that all compound to this issue.
I came across this issue when debugging an issue with the latest phpmyadmin docker image.
This image installs some dev packages and compiles a couple of php extensions and then uses
ldd
on the resulting extensions .so files together withdpkg-query -S
to find the packages that need to be kept after the build.Note: this pattern does seem to be used by more php based containers.
The issue is that the ldd output points to
/lib/x86_64-linux-gnu
but most packages don't install files to /lib, but to /usr/lib .. and dpkg-query does not detect that these are effectively the same files (see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=858331 and https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848622)The reason the ldd output point to
/lib/x86_64-linux-gnu
instead of/usr/lib/x86_64-linux-gnu
because both of the paths are in/etc/ld.so.conf.d/x86_64-linux-gnu.conf
and it appears the first one take precedenceRemoving the
/lib/x86_64-linux-gnu
line from the ld.so.conf fixes the ldd output; but does not fix the problem.This is because some packages (for example
libbz2-1.0
) are still installing to/lib/
instead of/usr/lib
sodpkg-query -S
does not find these .. and worse even if we would lookup the realpath before callingdpkg-query -S
it still does not find them as/usr/lib
is the realpathSo in my opinion there are 3 issues:
Imho fixing 1 would be the easiest as that would workaround issues 2 & 3.
The text was updated successfully, but these errors were encountered: