LuaJIT icon indicating copy to clipboard operation
LuaJIT copied to clipboard

gcarena: compile errors on linux

Open CapsAdmin opened this issue 9 years ago • 0 comments

in lj_gc.c:963 the function sweep_arena is forward declared as void sweep_arena(global_State *g, MSize i); but is later declared as static void sweep_arena(global_State *g, MSize i, MSize celltop)

I changed the forward declaration to the latter and passing 0 as the argument for MSize celltop in lj_gc.c:975

Now I get a bunch of errors in enablelargepages at lj_alloc.c:412 where windows specific functions are being used.

Just commenting that out the contents of the function and returning 0 I get a linker error:

/usr/bin/ld: lj_vm_dyn.o: relocation R_X86_64_PC32 against symbol `lj_gc_emptygrayssb' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value

There are also many warnings https://gist.github.com/CapsAdmin/c5cab3e28f9cad5af1d15811e3c097f2

CapsAdmin avatar Oct 11 '16 22:10 CapsAdmin