alpine-pkg-glibc icon indicating copy to clipboard operation
alpine-pkg-glibc copied to clipboard

ld-linux-x86-64.so.2 is not a symbolic link

Open ngirard opened this issue 3 years ago • 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 !

ngirard avatar Apr 03 '21 07:04 ngirard

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

Nuru avatar May 30 '21 23:05 Nuru

Got it, thanks @Nuru !

ngirard avatar May 31 '21 06:05 ngirard

@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

frol avatar Jul 11 '21 12:07 frol

I had this issue with 2.31.-r0, but it disappeared with latest stable 2.34-r0

So it's "fixed"?

DJAlPee avatar Nov 23 '21 09:11 DJAlPee