vi / websocat

Command-line client for WebSockets, like netcat (or curl) for ws:// with advanced socat-like functions
MIT License
7.17k stars 278 forks source link

Executable no longer statically linked #211

Open jansablatnig opened 11 months ago

jansablatnig commented 11 months ago

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.

vi commented 11 months ago

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 commented 11 months ago

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 commented 11 months ago

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).

Lombra commented 5 months ago

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
vi commented 5 months ago

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

websocat-rpi2.zip

It is enough?

Lombra commented 5 months ago

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
vi commented 5 months ago

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.

Lombra commented 5 months ago

First link seems to work, thanks!