choosenim icon indicating copy to clipboard operation
choosenim copied to clipboard

Binary with hard-coded /lib64/ld-linux-x86-64.so.2 path

Open mimame opened this issue 1 year ago • 3 comments

This happens with NixOS

When I run curl https://nim-lang.org/choosenim/init.sh -sSf | sh

choosenim-init: Downloading choosenim-0.8.4_linux_amd64
main: line 77: /tmp/cn/choosenim-0.8.4_linux_amd64: No such file or directory

After some investigations, I realized the next: ldd choosenim-0.8.4_linux_amd64

linux-vdso.so.1 (0x00007fff77de9000)
        libm.so.6 => /nix/store/9xfad3b5z4y00mzmk2wnn4900q0qmxns-glibc-2.35-224/lib/libm.so.6 (0x00007f81cee39000)
        librt.so.1 => /nix/store/9xfad3b5z4y00mzmk2wnn4900q0qmxns-glibc-2.35-224/lib/librt.so.1 (0x00007f81cee34000)
        libdl.so.2 => /nix/store/9xfad3b5z4y00mzmk2wnn4900q0qmxns-glibc-2.35-224/lib/libdl.so.2 (0x00007f81cee2f000)
        libc.so.6 => /nix/store/9xfad3b5z4y00mzmk2wnn4900q0qmxns-glibc-2.35-224/lib/libc.so.6 (0x00007f81cec00000)
        /lib64/ld-linux-x86-64.so.2 => /nix/store/9xfad3b5z4y00mzmk2wnn4900q0qmxns-glibc-2.35-224/lib64/ld-linux-x86-64.so.2 (0x00007f81cef1b000)

When I compile choosenim by myself, I get the good path: ldd choosenim

linux-vdso.so.1 (0x00007ffd309c4000)
        libm.so.6 => /nix/store/c35hf8g5b9vksadym9dbjrd6p2y11m8h-glibc-2.35-224/lib/libm.so.6 (0x00007fb8ebd48000)
        librt.so.1 => /nix/store/c35hf8g5b9vksadym9dbjrd6p2y11m8h-glibc-2.35-224/lib/librt.so.1 (0x00007fb8ebd43000)
        libdl.so.2 => /nix/store/c35hf8g5b9vksadym9dbjrd6p2y11m8h-glibc-2.35-224/lib/libdl.so.2 (0x00007fb8ebd3e000)
        libc.so.6 => /nix/store/c35hf8g5b9vksadym9dbjrd6p2y11m8h-glibc-2.35-224/lib/libc.so.6 (0x00007fb8eba00000)
        /nix/store/c35hf8g5b9vksadym9dbjrd6p2y11m8h-glibc-2.35-224/lib/ld-linux-x86-64.so.2 => /nix/store/9xfad3b5z4y00mzmk2wnn4900q0qmxns-glibc-2.35-224/lib64/ld-linux-x86-64.so.2 (0x00007fb8ebe2a000)

I don't know if this can be solved, but to I hope to be useful in any case

Thanks so much in advance

mimame avatar Feb 04 '23 22:02 mimame