I was stuck in this problem for many days.
Wax(https://github.com/probablycorey/wax support armv7 and armv7s architecture only, but my project uses arm64 architecture.
The error message is "Error opening wax scripts: loading wax stdlib: bad header in precompiled chunk".
So I guess the problem is in wax_stdlib.h. However this file is a precompiled result of lua scripts in stdlib ducoment, and I don't know how to precompile lua scripts in 64-bit.
How can I fix it?
because your project uses the arm64 architecture,and the wax_stdlib.h was precompiled in 32bit...
So,you just need to precompile the wax stdlib in 64bit.
first,you need to download lua source code ,and cd to src directory,and make it in 64bit,and install
then you should modifly the luac.lua file
-- 64 b = string.sub(b, 1, x - 6 - 4).."\0"..string.sub(b, y + 2, y + 5) -- WTF does this do?
-- 32 -- b = string.sub(b, 1, x - 6).."\0"..string.sub(b, y + 2, y + 5) -- WTF does this do?
-- 64 assert(f:write(string.rep("\0", 3 * 8)))
-- 32 --assert(f:write(string.rep("\0", 12)))
and run the compile-stdlib.sh...
if you do like this ,it can works,but I really suggest you do not use wax in 64bit,because it don't support 64bit..you will find more problems