Re: Musl and Luajit

  • From: Justin Cormack <justin@xxxxxxxxxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 9 Mar 2015 23:08:55 +0000

On 9 March 2015 at 22:01, Ryan Phillips <ryan@xxxxxxxxxxxxx> wrote:
> I'm attempting to compile luajit statically under Linux amd64 with musl-gcc.
> The static compile produces a luajit executable, and the luajit REPL starts
> up; however when I try and require('sdkfjsdkfjskdfj') (load any module), the
> application crashes. The backtrace is quite useless:
>
> (gdb) bt
> #0  0x000000000046007a in ?? ()
> #1  0x0000000000458490 in ?? ()
> #2  0x00007fffffffe500 in ?? ()
> #3  0x0000000000000000 in ?? ()
> (gdb) q
>
> Does anyone have any thoughts on next steps?

Well I wouldn't expect it to work, as it will fail on dlopen anyway,
as Musl has no dlopen support for static binaries. LuaJIT works fine
under Musl if dynamically linked. You will have to override module
loading for static linking - you can link everything into the binary
and return its address.

Justin

Other related posts: