cargo-bins / cargo-quickinstall

pre-compiled binary packages for `cargo install`
Apache License 2.0
213 stars 9 forks source link

Sccache depends on shared OpenSSL library #235

Closed mati865 closed 8 months ago

mati865 commented 8 months ago

When using cargo-binstall to instal sccache I have noticed the binaries do not work. Upon investigation I noticed the binary comes from this repository and it's linked to shared OpenSSL libs:

~/Downloads
❯ curl -LO https://github.com/cargo-bins/cargo-quickinstall/releases/download/sccache-0.7.1/sccache-0.7.1-x86_64-unknown-linux-gnu.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 10.9M  100 10.9M    0     0  5584k      0  0:00:02  0:00:02 --:--:-- 8626k

~/Downloads took 2s
❯ tar -xf sccache-0.7.1-x86_64-unknown-linux-gnu.tar.gz

~/Downloads
❯ ./sccache --version
./sccache: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

~/Downloads
❯ ldd ./sccache
        linux-vdso.so.1 (0x00007ffdb9538000)
        libssl.so.1.1 => not found
        libcrypto.so.1.1 => not found
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f34439fb000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f34439db000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f34439d6000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f34438ef000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3443600000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f3444a91000)

Haven't tested other binaries from this repo.

NobodyXu commented 8 months ago

Thanks, I will investigate this.

In the meantime, can you try x86_64-unknown-linux-musl? It should be fully statically linked with no dynamic lib.

mati865 commented 8 months ago

There is no x86_64-unknown-linux-musl sccache binary in this repo, the one from sccache repository does work.

NobodyXu commented 8 months ago

Thanks, it seems like something is wrong with the x86_64-unknown-linux-musl target compilation

mati865 commented 8 months ago

Thank you for the quick fix!