ld-linux-x86-64.so.2 is not a symbolic link
ngirard opened this issue · 4 comments
Hey there,
I'm trying to take advantage of your work to trim down the size of the Docker image for TaskLite.
Here's the relevant part of my Dockerfile:
FROM frolvlad/alpine-glibc:alpine-3.13
RUN apk --no-cache add gmp=6.2.1-r0
COPY --from=builder /usr/src/tasklite/tasklite-core/example-config.yaml /root/.config/tasklite/config.yaml
COPY --from=builder /root/.local/bin/tasklite /usr/local/bin/tasklite
ENTRYPOINT ["tasklite"]
When building the image I get the following message:
(1/1) Installing gmp (6.2.1-r0)
Executing glibc-bin-2.33-r0.trigger
/usr/glibc-compat/sbin/ldconfig: /usr/glibc-compat/lib/ld-linux-x86-64.so.2 is not a symbolic link
Do you think it could be problematic, of can it be safely ignored ?
Cheers, and thanks for your work !
I think it can be safely ignored, but it does take up space (about 200 KiB). You can fix this by first running
rm /usr/glibc-compat/lib/ld-linux-x86-64.so.2 && /usr/glibc-compat/sbin/ldconfig
although because of Docker image layering, it will not actually reduce the size of the Docker image. The real fix will be to fix the glibc
package so that it has a symlink instead of a duplicate of the library. This appears to be an unintended (and somewhat paradoxical) consequence of #109
@sgerrand Actually, there are quite a few duplicates in the lib
folder, which could have been just symlinked. It may cut a few megabytes, I believe.
$ ls -la /usr/glibc-compat/lib
total 9184
drwxr-xr-x 3 root root 4096 Jul 11 12:40 .
drwxr-xr-x 7 root root 4096 Jul 11 12:40 ..
-rwxr-xr-x 1 root root 202696 Feb 23 16:32 ld-2.33.so
-rwxr-xr-x 1 root root 202696 Feb 23 16:32 ld-linux-x86-64.so.2
-rwxr-xr-x 1 root root 14576 Feb 23 16:32 libBrokenLocale-2.33.so
-rwxr-xr-x 1 root root 14576 Feb 23 16:32 libBrokenLocale.so
-rwxr-xr-x 1 root root 14576 Feb 23 16:32 libBrokenLocale.so.1
-rwxr-xr-x 1 root root 22904 Feb 23 16:32 libSegFault.so
-rwxr-xr-x 1 root root 23288 Feb 23 16:32 libanl-2.33.so
-rwxr-xr-x 1 root root 23288 Feb 23 16:32 libanl.so
-rwxr-xr-x 1 root root 23288 Feb 23 16:32 libanl.so.1
-rwxr-xr-x 1 root root 1855648 Feb 23 16:32 libc-2.33.so
-rw-r--r-- 1 root root 294 Feb 23 16:32 libc.so
-rwxr-xr-x 1 root root 1855648 Feb 23 16:32 libc.so.6
-rwxr-xr-x 1 root root 39456 Feb 23 16:32 libcrypt-2.33.so
-rwxr-xr-x 1 root root 39456 Feb 23 16:32 libcrypt.so
-rwxr-xr-x 1 root root 39456 Feb 23 16:32 libcrypt.so.1
-rwxr-xr-x 1 root root 18832 Feb 23 16:32 libdl-2.33.so
-rwxr-xr-x 1 root root 18832 Feb 23 16:32 libdl.so
-rwxr-xr-x 1 root root 18832 Feb 23 16:32 libdl.so.2
-rwxr-xr-x 1 root root 1329656 Feb 23 16:32 libm-2.33.so
-rw-r--r-- 1 root root 140 Feb 23 16:32 libm.so
-rwxr-xr-x 1 root root 1329656 Feb 23 16:32 libm.so.6
-rwxr-xr-x 1 root root 18888 Feb 23 16:32 libmemusage.so
-rwxr-xr-x 1 root root 174632 Feb 23 16:32 libmvec-2.33.so
-rwxr-xr-x 1 root root 174632 Feb 23 16:32 libmvec.so
-rwxr-xr-x 1 root root 174632 Feb 23 16:32 libmvec.so.1
-rwxr-xr-x 1 root root 97336 Feb 23 16:32 libnsl-2.33.so
-rwxr-xr-x 1 root root 97336 Feb 23 16:32 libnsl.so.1
-rwxr-xr-x 1 root root 43976 Feb 23 16:32 libnss_compat-2.33.so
-rwxr-xr-x 1 root root 43976 Feb 23 16:32 libnss_compat.so
-rwxr-xr-x 1 root root 43976 Feb 23 16:32 libnss_compat.so.2
-rwxr-xr-x 1 root root 35328 Feb 23 16:32 libnss_db-2.33.so
-rwxr-xr-x 1 root root 35328 Feb 23 16:32 libnss_db.so
-rwxr-xr-x 1 root root 35328 Feb 23 16:32 libnss_db.so.2
-rwxr-xr-x 1 root root 31192 Feb 23 16:32 libnss_dns-2.33.so
-rwxr-xr-x 1 root root 31192 Feb 23 16:32 libnss_dns.so
-rwxr-xr-x 1 root root 31192 Feb 23 16:32 libnss_dns.so.2
-rwxr-xr-x 1 root root 51816 Feb 23 16:32 libnss_files-2.33.so
-rwxr-xr-x 1 root root 51816 Feb 23 16:32 libnss_files.so
-rwxr-xr-x 1 root root 51816 Feb 23 16:32 libnss_files.so.2
-rwxr-xr-x 1 root root 27144 Feb 23 16:32 libnss_hesiod-2.33.so
-rwxr-xr-x 1 root root 27144 Feb 23 16:32 libnss_hesiod.so
-rwxr-xr-x 1 root root 27144 Feb 23 16:32 libnss_hesiod.so.2
-rwxr-xr-x 1 root root 14600 Feb 23 16:32 libpcprofile.so
-rwxr-xr-x 1 root root 114192 Feb 23 16:32 libpthread-2.33.so
-rwxr-xr-x 1 root root 114192 Feb 23 16:32 libpthread.so
-rwxr-xr-x 1 root root 114192 Feb 23 16:32 libpthread.so.0
-rwxr-xr-x 1 root root 89048 Feb 23 16:32 libresolv-2.33.so
-rwxr-xr-x 1 root root 89048 Feb 23 16:32 libresolv.so
-rwxr-xr-x 1 root root 89048 Feb 23 16:32 libresolv.so.2
-rwxr-xr-x 1 root root 40088 Feb 23 16:32 librt-2.33.so
-rwxr-xr-x 1 root root 40088 Feb 23 16:32 librt.so
-rwxr-xr-x 1 root root 40088 Feb 23 16:32 librt.so.1
-rwxr-xr-x 1 root root 39944 Feb 23 16:32 libthread_db-1.0.so
-rwxr-xr-x 1 root root 39944 Feb 23 16:32 libthread_db.so
-rwxr-xr-x 1 root root 39944 Feb 23 16:32 libthread_db.so.1
-rwxr-xr-x 1 root root 14864 Feb 23 16:32 libutil-2.33.so
-rwxr-xr-x 1 root root 14864 Feb 23 16:32 libutil.so
-rwxr-xr-x 1 root root 14864 Feb 23 16:32 libutil.so.1
I had this issue with 2.31.-r0, but it disappeared with latest stable 2.34-r0
So it's "fixed"?