cargo-quickinstall icon indicating copy to clipboard operation
cargo-quickinstall copied to clipboard

cargo-workspaces depends on shared OpenSSL library

Open Buckram123 opened this issue 1 year ago • 2 comments

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

Buckram123 avatar Dec 20 '23 21:12 Buckram123

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 avatar Dec 21 '23 04:12 NobodyXu

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.

NobodyXu avatar Dec 21 '23 04:12 NobodyXu