cargo-bins / cargo-quickinstall

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

cargo-workspaces depends on shared OpenSSL library #241

Open Buckram123 opened 7 months ago

Buckram123 commented 7 months ago

Not sure if this is quickinstall issue, but it looks similar to #235, so I'll create an issue here. cargo-workspaces library linked to shared OpenSSL libs:

    # ldd from quickinstall binary:

    linux-vdso.so.1 (0x00007ffdfa984000)
    libssl.so.1.1 => not found
    libcrypto.so.1.1 => not found
    libdl.so.2 => /usr/lib/libdl.so.2 (0x00007fe255eb3000)
    libz.so.1 => /usr/lib/libz.so.1 (0x00007fe255e99000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fe255e74000)
    libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007fe255e6f000)
    libm.so.6 => /usr/lib/libm.so.6 (0x00007fe255913000)
    libc.so.6 => /usr/lib/libc.so.6 (0x00007fe25541e000)
    /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fe255f70000)

    # ldd from cargo compiled binary:

    linux-vdso.so.1 (0x00007ffc5a39e000)
    libssl.so.3 => /usr/lib/libssl.so.3 (0x00007fe22d820000)
    libcrypto.so.3 => /usr/lib/libcrypto.so.3 (0x00007fe22cc00000)
    libz.so.1 => /usr/lib/libz.so.1 (0x00007fe22d806000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007fe22d7e1000)
    libm.so.6 => /usr/lib/libm.so.6 (0x00007fe22d113000)
    libc.so.6 => /usr/lib/libc.so.6 (0x00007fe22ca1e000)
    /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fe22d8e3000)

Found it in CI during integrating cargo-binstall with error:

/home/circleci/.cargo/bin/cargo-ws: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
NobodyXu commented 7 months ago

It's an upstream issue of cargo-workspaces, it doesn't have any feature flag to enable openssl/vendored to make sure openssl is statically linked, so you would need to open an issue in cargo-workspaces to fix it.

NobodyXu commented 7 months ago

I think using the musl build might fix the issue since there's no system-wide openssl for musl, so it must be built and statically linked.