luvit / lit

Toolkit for developing, sharing, and running luvit/lua programs and libraries.
http://lit.luvit.io/
Apache License 2.0
245 stars 58 forks source link

Building luvit on Alpine docker fails #256

Closed Mirodin closed 5 years ago

Mirodin commented 5 years ago

I hope this is the right repository to report this to. My container build fails because of some error with TLS during installation of luvit.

Problem description

I followed this instruction (great writeup btw) and everything works until I "rebuild lit" to reduce the binary size in Sharing Luvi Across Apps. Trying to figure out what was going on I did a step-by-step in another container by hand and got this error:

~ # lit make lit://luvit/luvit /luvit /bin/luvi 
lit version: 3.7.2
luvi version: v2.9.3-5-g532a943
command: make lit://luvit/luvit /luvit /bin/luvi
load config: /root/.litconfig
connecting: wss://lit.luvit.io/
fail: [string "bundle:deps/secure-socket/context.lua"]:53: bad argument #1 to 'ctx_new' (only support TLS, DTLS to negotiate highest available SSL/TLS or DTLS version above openssl v1.1.0
optional followed by _client or _server
default is TLS
)
stack traceback:
        [C]: in function 'ctx_new'
        [string "bundle:deps/secure-socket/context.lua"]:53: in function 'getContext'
        [string "bundle:deps/secure-socket/init.lua"]:23: in function 'secureSocket'
        [string "bundle:deps/coro-net.lua"]:106: in function 'netConnect'
        [string "bundle:libs/rdb.lua"]:44: in function 'connectRemote'
        [string "bundle:libs/rdb.lua"]:87: in function 'connect'
        [string "bundle:libs/rdb.lua"]:121: in function 'match'
        [string "bundle:libs/core.lua"]:464: in function 'makeUrl'
        [string "bundle:commands/make.lua"]:13: in function <[string "bundle:commands/make.lua"]:1>
        [string "bundle:main.lua"]:69: in function <[string "bundle:main.lua"]:56>
        [C]: in function 'xpcall'
        [string "bundle:main.lua"]:56: in function <[string "bundle:main.lua"]:48>

How to reproduce

Just spin up an Alpine docker container and follow this instruction step by step: https://luvit.io/blog/alpine-luvi.html

EDIT: Seems like no connection to lit works, tried it with some other packages and got the same error.

squeek502 commented 5 years ago

Looks like a bug related to OpenSSL being updated to 1.1.1 in recent luvi versions and the Lit libs not being updated to account for that. Related issues in Luvit: https://github.com/luvit/luvit/issues/1058, https://github.com/luvit/luvit/issues/1060

You can try with an older version of Luvi for now (v2.7.6 is the most stable).

Mirodin commented 5 years ago

You can try with an older version of Luvi for now (v2.7.6 is the most stable).

Thanks, I will try it that way for now. I also will keep an eye on this report.