The problem got more simplified when I run it in the verbose mode. luarocks install Luadns --verbose produced these outputs.




Any fix ? When I added -use-system-libraries I got this error
--use-system-libraries
I hope you mean luarocks install luadns --use-system-libraries
Then it is showing warning: version number '-use-system-libraries' could not be parsed

do you have dev files for lua? apt install liblua-dev
liblua-dev is already the latest version 5.3 . Please notice the third image. The error starts there!
You probably need to patch the source code, try downloading it and look into the code.
Luadns doesn't seem to have been updated in 4 years so it is perhaps not very surprising that it doesn't build.
@Grimler91 As far as concerned,this is the problem with Lua. I need to deal with networking and servers. Then which would be the best language which also have better support of all libraries in termux ? Thanks @Grimler91
@bensh4 I don't work with networking or servers so I don't really know.
Python is generally good..
@bensh4 the problem is not really with Lua. The source code uses luaL_reg but newer Lua versions have luaL_Reg.
You'll have to manually patch the source code to install it.
Unfortunately, the buildspec for LuaDNS doesn't use CFLAGS neither, so you cannot fix this without manually editing source code.
Does termux supports all python libraries?
@vishalbiswas Any other way to run Luadns either in termux or any way? Thanks!
add this definition in $PREFIX/include/lauxlib.h
#define luaL_reg luaL_Reg
on line 35
If you have a 64-bit phone (aarch64 or x86_64) run ln -s /system/lib64/libc.so $PREFIX/lib/libresolv.so
else if you have a 32-bit phone (arm, x86) run ln -s /system/lib/libc.so $PREFIX/lib/libresolv.so
Then you will be able to install it.
@vishalbiswas , Mine is arm but i didn't add in -sf line. After your fix in line35, i ran luarocks install luadns And successfully installed.
luadns 1.0.0-1 is now installed in /data/data/com.termux/files/usr (license: MIT/X11)
Thanks @vishalbiswas
Most helpful comment
add this definition in
$PREFIX/include/lauxlib.hon line 35
If you have a 64-bit phone (aarch64 or x86_64) run
ln -s /system/lib64/libc.so $PREFIX/lib/libresolv.soelse if you have a 32-bit phone (arm, x86) run
ln -s /system/lib/libc.so $PREFIX/lib/libresolv.soThen you will be able to install it.