nginx / unit

NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
https://unit.nginx.org
Apache License 2.0
5.36k stars 323 forks source link

Unitctl: openssl linking issues #1439

Open avahahn opened 4 hours ago

avahahn commented 4 hours ago

Unitctl fails to open when the expected libssl version is not installed on the host system. It seems on aarch64 systems libssl 1 is expected and on x86 systems libssl 3 is expected.

An example from Ubuntu on aarch64

$ unitctl
unitctl: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory

Ideally unitctl should work with a wide berth of openssl/libssl versions on a variety of platforms.

ac000 commented 3 hours ago

Seems to be an artefact of cross compiling on Ubuntu...

[target.aarch64-unknown-linux-gnu]
pre-build = [
    "dpkg --add-architecture $CROSS_DEB_ARCH",
    "apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH"
]
#5 [2/2] RUN eval "dpkg --add-architecture $CROSS_DEB_ARCH
apt-get update && apt-get install --assume-yes libssl-dev:$CROSS_DEB_ARCH"
...
#5 6.335 The following additional packages will be installed:
#5 6.335   gcc-6-base:arm64 libc6:arm64 libc6-dev:arm64 libgcc1:arm64 libssl1.0.0:arm64
...
#5 6.337 The following NEW packages will be installed:
#5 6.338   gcc-6-base:arm64 libc6:arm64 libc6-dev:arm64 libgcc1:arm64 libssl-dev:arm64
#5 6.338   libssl1.0.0:arm64 linux-libc-dev:arm64 zlib1g:arm64 zlib1g-dev:arm64
...
#5 7.507 Get:5 http://ports.ubuntu.com/ubuntu-ports xenial-updates/main arm64 libssl1.0.0 arm64 1.0.2g-1ubuntu4.20 [693 kB]
...
#5 8.136 Preparing to unpack .../libssl1.0.0_1.0.2g-1ubuntu4.20_arm64.deb ...
#5 8.138 Unpacking libssl1.0.0:arm64 (1.0.2g-1ubuntu4.20) ...
...
#5 8.498 Selecting previously unselected package libssl-dev:arm64.
#5 8.499 Preparing to unpack .../libssl-dev_1.0.2g-1ubuntu4.20_arm64.deb ...
...
#5 9.719 Setting up libssl1.0.0:arm64 (1.0.2g-1ubuntu4.20) ...
...
#5 9.800 Setting up libssl-dev:arm64 (1.0.2g-1ubuntu4.20) ...
...