I’m using Asterisk 18.1 on ubuntu 20.04 and I have installed lua5.3
I’m assuming that ASTTEST is still supposed to work. I’m referring to:
https://wiki.asterisk.org/wiki/display/AST/Installing+the+Asterisk+Test+Suite
Although I added /usr/include to $PATH, I ended up copying over the *.h files because the make couldn’t find them
make -C lib/lua/luafilesystem-1.4.2
make[1]: Entering directory '/home/pete/asterisk_tests/testsuite/testsuite/asttest/lib/lua/luafilesystem-1.4.2'
gcc -O2 -Wall -fPIC -W -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wshadow -Wwrite-strings -pedantic `pkg-config --cflags lua5.1 2> /dev/null || pkg-config --cflags lua-5.1 2> /dev/null || pkg-config --cflags lua 2> /dev/null` -c -o src/lfs.o src/lfs.c
src/lfs.c: In function ‘file_lock’:
src/lfs.c:257:21: warning: implicit declaration of function ‘luaL_optlong’; did you mean ‘luaL_optlstring’? [-Wimplicit-function-declaration]
257 | const long start = luaL_optlong (L, 3, 0);
| ^~~~~~~~~~~~
| luaL_optlstring
src/lfs.c:257:21: warning: nested extern declaration of ‘luaL_optlong’ [-Wnested-externs]
src/lfs.c: At top level:
src/lfs.c:680:30: error: array type has incomplete element type ‘struct luaL_reg’
680 | static const struct luaL_reg fslib[] = {
| ^~~~~
src/lfs.c: In function ‘luaopen_lfs’:
src/lfs.c:697:2: warning: implicit declaration of function ‘luaL_register’; did you mean ‘lua_register’? [-Wimplicit-function-declaration]
697 | luaL_register (L, "lfs", fslib);
| ^~~~~~~~~~~~~
| lua_register
src/lfs.c:697:2: warning: nested extern declaration of ‘luaL_register’ [-Wnested-externs]
At top level:
src/lfs.c:680:30: warning: ‘fslib’ defined but not used [-Wunused-variable]
680 | static const struct luaL_reg fslib[] = {
| ^~~~~
make[1]: *** [<builtin>: src/lfs.o] Error 1