-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding shared object to static binary, compiled with musl #45
Comments
Using Alpine Linux v3.20, kernel 6.6.32-0-virt on x86_64 |
This looks like a bug in Try this:
|
Did some more experimenting: Using Using |
Yup, that seems to work. Compiled a working static executable that has luaossl and OpenSSL in it. |
Should probably keep this open until the bug is fixed lol |
How would I go about adding these to a static binary, compiled with musl?
Just playing around with luastatic, and I wanted to compile a file together with
luaossl
.After compiling luaossl, I have the Lua bindings, a
openssl.o
file and anopenssl.so
file.So far I've tried creating an archive using
ar rcs openssl.a openssl.so
, which gives me a static archive.Then, doing
lua luastatic.lua test.lua ../luaossl/src/openssl.lua ../luaossl/src/5.3/openssl.a /usr/lib/lua5.3/liblua.a -I/usr/include/lua5.3 -s -static
This results in
module '_openssl' not found
.require "openssl"
works fine, because that is included in the luastatic bundle.But the actual
openssl.so
is not, so it throws that error.Cheers in advance!
The
test.lua
file:The text was updated successfully, but these errors were encountered: