I just tried building 6.4.1 on Red Hat Enterprise Linux 9 x86_64, and although it works with the default lua library, it fails when trying to use luajit instead:
$ make EVENT_LIB=libev USE_LUAJIT=1
[...]
make[2]: Leaving directory '/builddir/build/BUILD/aerospike-client-c-6.4.1/modules/common'
cc -Isrc/include -I../../modules/common/target/Linux-x86_64/include -I../../modules/luajit/src -std=gnu99 -g -fPIC -O3 -fno-common -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_GNU_SOURCE -DAS_MOD_LUA_CLIENT -DUSE_LUAJIT -march=nocona -DAS_MOD_LUA_CLIENT -finline-functions -rdynamic -o target/Linux-x86_64/obj/mod_lua.o -c src/main/mod_lua.c
In file included from ../../modules/luajit/src/lauxlib.h:15,
from src/main/mod_lua.c:25:
../../modules/luajit/src/lua.h:16:10: fatal error: luaconf.h: No such file or directory
16 | #include "luaconf.h"
| ^~~~~~~~~~~
compilation terminated.
make[1]: Leaving directory '/builddir/build/BUILD/aerospike-client-c-6.4.1/modules/mod-lua'
make[1]: *** [Makefile:201: target/Linux-x86_64/obj/mod_lua.o] Error 1
make: *** [project/modules.mk:97: modules/mod-lua/target/Linux-x86_64/lib/libmod_lua.a] Error 2
I just tried building 6.4.1 on Red Hat Enterprise Linux 9 x86_64, and although it works with the default lua library, it fails when trying to use luajit instead: