kernelsauce / turbo

Turbo is a framework built for LuaJIT 2 to simplify the task of building fast and scalable network applications. It uses a event-driven, non-blocking, no thread design to deliver excellent performance and minimal footprint to high-load applications while also providing excellent support for embedded uses.
http://turbo.readthedocs.io/
Apache License 2.0
525 stars 84 forks source link

Add support for libss 1.1 #343

Open clandmeter opened 5 years ago

clandmeter commented 5 years ago

In Alpine Linux we are using libssl1.1 which seems incompatible with lua-turbo.

crypto_linux.lua:77: Symbol not found: SSL_load_error_strings
ncopa commented 4 years ago

I added a patch to make it build with openssl 1.1, but it is broken (but not more than it currently is). https://github.com/alpinelinux/aports/commit/3b642ff071d86d2aeeb5532445d2ff518cc3c05b#diff-dba1e4ef7a1fb1392b7c338e1e3915e8

I think a better approach would be to replace crypto_linux.lua with an implementation that uses luaossl instead.

seclorum commented 3 years ago

Just ran into this issue today while trying to use Turbo on ARMBIAN Ubuntu 20.04.2 LTS. I fixed it by recompiling libssl, like this (Debian-specific instructions):

$ export CFLAGS=-DOPENSSL_API_COMPAT="0x0908" $ apt source libssl1.1 # resolves libssl -> openssl $ apt build-dep openssl-1.1.1f $ cd openssl-1.1.1f $ CFLAGS=-DOPENSSL_API_COMPAT="0x0908" dpkg-buildpackage -rfakeroot -b -uc -us

.. and then re-installing the resulting .deb package over my system-provided version, instead.

Not sure this is a viable solution, but adding the details here for future readers of the issue, and maybe the TURBO devs can address this problem in the near-future, as the use of deprecated functions from SSL is a potential issue brewing on the horizon for new TURBO users ..

(BTW, huge thanks to you guys for TURBO, it is excellent..)