sgerrand / alpine-pkg-glibc

A glibc compatibility layer package for Alpine Linux
2.07k stars 280 forks source link

Wrong path in RTLDLIST in ldd #103

Closed jayfoad closed 5 years ago

jayfoad commented 5 years ago

Using the frolvlad/alpine-glibc docker image I find that ldd doesn't work: it says /bin/ls is "not a dynamic executable". The problem seems to be that one of the paths in RTLDLIST in the ldd script is wrong. The sed command below fixes it.

$ docker run --rm -it frolvlad/alpine-glibc
/ # apk -q add bash
/ # /usr/glibc-compat/bin/ldd /bin/ls
    not a dynamic executable
/ # grep lib64 /usr/glibc-compat/bin/ldd
RTLDLIST="/usr/glibc-compat/lib/ld-linux.so.2 /usr/glibc-compat/lib64/ld-linux-x86-64.so.2 /usr/glibc-compat/libx32/ld-linux-x32.so.2"
/ # sed -i s/lib64/lib/ /usr/glibc-compat/bin/ldd
/ # /usr/glibc-compat/bin/ldd /bin/ls
    linux-vdso.so.1 (0x00007ffe146db000)
    libc.musl-x86_64.so.1 => /lib/libc.musl-x86_64.so.1 (0x00007f43a8e00000)
sgerrand commented 5 years ago

Thank you for reporting this issue!