websocat icon indicating copy to clipboard operation
websocat copied to clipboard

Executable no longer statically linked

Open jansablatnig opened this issue 2 years ago • 8 comments

The file websocat.arm-unknown-linux-musleabi used to be statically linked in V11, but in V12, it is now dynamically linked, which does not work on several of the legacy systems I have tried it on.

As an example, the dynamic linker mentioned in the V12 file is /usr/lib/ld.so.1, but on one of my systems, the actual (incompatible) dynamic linker is /lib/ld-linux-armhf.so.3 on another system it's /lib/ld-linux.so.3.

So I'd just appreciate if (on the next release, perhaps), you could reintroduce a version for arm that is statically linked.

jansablatnig avatar Dec 01 '23 14:12 jansablatnig

Indeed, libatomic.so.1 crept in for some reason.

Unfortunately, there are no real tests for Websocat, so each release may introduce regressions.

Now investigating how to restore staticness.

vi avatar Dec 01 '23 19:12 vi

Dynamicness originates from built-in OpenSSL.

Here is a version of Websocat without TLS support, if this is enough for you.

websocat_nossl.arm-unknown-linux-musleabi.zip

vi avatar Dec 01 '23 20:12 vi

Here is another attempt to build for arm-unknown-linux-musleabi, now with OpenSSL, but it does not work for me if I try to connect to wss:// (segmentation faullt), unlike version 11.

websocat.arm-unknown-linux-musleabi.zip

If this is a qemu-arm's issue and it actually works for you, the target can probably be restored (instead of being downgraded to nossl or removed).

vi avatar Dec 01 '23 20:12 vi

I am interested in this, but can confirm segmentation fault on my Raspberry Pi 2.

$ websocat -n1 --jsonrpc --jsonrpc-omit-jsonrpc wss://echo.websocket.org
Segmentation fault

Lombra avatar May 29 '24 22:05 Lombra

Here is a Websocat executable for Raspberry Pi 2 (using system openssl):

websocat-rpi2.zip

It is enough?

vi avatar May 30 '24 10:05 vi

I don't personally need secure websockets, but I was interested in some of the changes introduced in 1.13.

What do I need installed for this, exactly?

./websocat-rpi2: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory
ii  libssl1.0.2:armhf                    1.0.2q-2                         armhf        Secure Sockets Layer toolkit - shared libraries
ii  libssl1.1:armhf                      1.1.1w-0+deb11u1+rpt1            armhf        Secure Sockets Layer toolkit - shared libraries
ii  openssl                              1.1.1w-0+deb11u1+rpt1            armhf        Secure Sockets Layer toolkit - cryptographic utility

Lombra avatar May 30 '24 16:05 Lombra

Probably libssl1.0.2.

Here is a version with a static openssl that is hopefully more portable:

websocat-armhf.zip

And here is one without TLS support:

websocat-armhf-nossl.zip

They are not static, but built on Raspbian Jessie, so should work fine with RPi2.

vi avatar May 30 '24 22:05 vi

First link seems to work, thanks!

Lombra avatar Jun 02 '24 12:06 Lombra