moonjit / moonjit

Just-In-Time Compiler for the Lua Programming language. Fork of LuaJIT to continue development. This project does not have an active maintainer, see https://twitter.com/siddhesh_p/status/1308594269502885889?s=20 for more detail.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

moonjit 2.2.0 cannot build with -DLUAJIT_DISABLE_FFI

fperrad opened this issue · comments

Building moonjit 2.2.0 (cflags: -DLUAJIT_DISABLE_FFI)
==== Building moonjit 2.2.0 ====
make -C src
make[1]: Entering directory '/tmp/tmpn2rm1h4f/moonjit-2.2.0/src'
HOSTCC    host/minilua.o
HOSTLINK  host/minilua
DYNASM    host/buildvm_arch.h
HOSTCC    host/buildvm.o
HOSTCC    host/buildvm_asm.o
HOSTCC    host/buildvm_peobj.o
HOSTCC    host/buildvm_lib.o
HOSTCC    host/buildvm_fold.o
HOSTLINK  host/buildvm
BUILDVM   lj_vm.S
ASM       lj_vm.o
CC        lj_gc.o
BUILDVM   lj_ffdef.h
CC        lj_err.o
CC        lj_char.o
BUILDVM   lj_bcdef.h
CC        lj_bc.o
CC        lj_obj.o
CC        lj_buf.o
CC        lj_str.o
CC        lj_tab.o
CC        lj_func.o
CC        lj_udata.o
CC        lj_meta.o
CC        lj_debug.o
CC        lj_state.o
CC        lj_dispatch.o
CC        lj_vmevent.o
CC        lj_vmmath.o
CC        lj_strscan.o
CC        lj_strfmt.o
CC        lj_strfmt_num.o
CC        lj_api.o
CC        lj_profile.o
CC        lj_lex.o
CC        lj_parse.o
CC        lj_bcread.o
CC        lj_bcwrite.o
CC        lj_load.o
CC        lj_ir.o
CC        lj_opt_mem.o
BUILDVM   lj_folddef.h
CC        lj_opt_fold.o
CC        lj_opt_narrow.o
CC        lj_opt_dce.o
CC        lj_opt_loop.o
CC        lj_opt_split.o
CC        lj_opt_sink.o
CC        lj_mcode.o
CC        lj_snap.o
CC        lj_record.o
CC        lj_crecord.o
BUILDVM   lj_recdef.h
CC        lj_ffrecord.o
lj_ffrecord.c: In function 'recff_thread_exdata':
lj_ffrecord.c:1118:31: error: 'CTID_P_VOID' undeclared (first use in this function)
 1118 |     TRef trid = lj_ir_kint(J, CTID_P_VOID);
      |                               ^~~~~~~~~~~
lj_ffrecord.c:1118:31: note: each undeclared identifier is reported only once for each function it appears in
make[1]: *** [Makefile:710: lj_ffrecord.o] Error 1
make[1]: Leaving directory '/tmp/tmpn2rm1h4f/moonjit-2.2.0/src'
make: *** [Makefile:117: default] Error 2
Error: got exitcode 2 from command make XCFLAGS=-DLUAJIT_DISABLE_FFI

Ugh, I fixed that in openresty/luajit2 and forgot to fix it in moonjit :/ Thanks for catching that, fixed now.

A couple of tests still fail for -DLUAJIT_DISABLE_FFI that I haven't figured out fixes for yet. AFAICT they're not related to thread.exdata, so I've left that for another day.