hishamhm on fix-1418
avoid crash if variables.LUA* a… (compare)
hishamhm on master
fix error message when Lua libr… binary build: help autodetectio… (compare)
hishamhm on master
Add --no-project flag to overri… Fix build of Windows binary Fi… (compare)
@dauuricus why you don't install the luarocks and lua packages for termux? Termux is a little tricky as it is not a standard OS environment, just a workaround to use Unix/Linux packages and provide a terminal under Android. So... the the compilations have to follow specific configuration that may be not the scope of the Luarocks developers.
You can install Lua and Luarocks with:pkg install luarocks lua53
Note that the termux doesn't create the correct link for interpreter, so you will need to do it by hand:
ln -sf /data/data/com.termux/files/usr/bin/lua5.3 /data/data/com.termux/files/usr/bin/lua`
ln -sf /data/data/com.termux/files/usr/bin/luac5.3 /data/data/com.termux/files/usr/bin/luac`
I dit it in my termux and it's ok.... Then I tried to install cqueues as in your message:
luarocks install cqueues
The error message was:
~ $ luarocks install cqueues
Installing https://luarocks.org/cqueues-20200726.53-0.src.rock
Error: This rockspec for cqueues does not support unix platforms.
It occurs because the package (rock) cqueues says it can be installed in Unix. Maybe you'll need to use other rock instead of http
(as it depends on cqueues) to do what you want if you wanna go with Termux or other Unix platform.
luarocks imstall xml STDCPP_LIBDIR=/system/lib
gcc -O2 -std=gnu99 -fPIC -g -Wall -Wextra -Wno-missing-field-initializers -Wno-initializer-overrides -Wno-unused -Wno-dollar-in-identifier-extension -O2 -fPIC -DLUA_COMPAT_APIINTCASTS -D_REENTRANT -D_THREAD_SAFE -D_GNU_SOURCE -I"/data/data/com.termux/files/usr/include" -I"/data/data/com.termux/files/usr/include" -DCOMPAT53_PREFIX=cqueues -DCQUEUES_VENDOR='"quae@daurnimator.com"' -DCQUEUES_VERSION=20200726L -c -o /data/data/com.termux/files/usr/tmp/luarocks_cqueues-20200726.53-0-6994475/cqueues-rel-20200726/src/5.3/cqueues.o /data/data/com.termux/files/usr/tmp/luarocks_cqueues-20200726.53-0-6994475/cqueues-rel-20200726/src/cqueues.c
/data/data/com.termux/files/usr/tmp/luarocks_cqueues-20200726.53-0-6994475/cqueues-rel-20200726/src/cqueues.c:47:10: fatal error: 'lua.h' file not found
#include <lua.h>
^~~~~~~
1 error generated.
eduardas@eduardas-Battlestation:/usr/lib/x86_64-linux-gnu$ ldd liblua5.1-cjson.so.0
linux-vdso.so.1 (0x00007fff7f3cd000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3435d4c000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3436167000)
eduardas@eduardas-Battlestation:~/.luarocks/lib/lua/5.3/posix$ ldd stdio.so
linux-vdso.so.1 (0x00007ffec7cbf000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f09df2a0000)
/lib64/ld-linux-x86-64.so.2 (0x00007f09df4b8000)
eduardas@eduardas-Battlestation:~/.luarocks/lib/lua/5.3/posix$ nm -gD stdio.so
U ctermid
w __cxa_finalize
U __errno_location
U fclose
U fdopen
U fileno
w __gmon_start__
w _ITM_deregisterTMCloneTable
w _ITM_registerTMCloneTable
U lua_createtable
U lua_getfield
U lua_gettop
U lua_isinteger
U luaL_argerror
U luaL_checklstring
U luaL_checkudata
U luaL_checkversion_
U luaL_fileresult
U luaL_setfuncs
U lua_newuserdata
0000000000001860 T luaopen_posix_stdio
U lua_pushfstring
U lua_pushinteger
U lua_pushnil
U lua_pushstring
U lua_setfield
U lua_setmetatable
U lua_settop
U lua_tointegerx
U lua_tolstring
U lua_type
U lua_typename
U rename
U __stack_chk_fail
U strerror
lua_modules_path = "."
. At the end I move the copy_directories
back at the root of the tree to mimic a vim plugin (I am working on using luarocks to install neovim plugins). The copy fails because the installed copy_directories
contains a bin
folder but https://luarocks.org/manifests/openresty/lua-cjson-2.1.0.6-1.rockspec doesn't list a bin folder ? the bin folder is listed in a rock_manifest
file though. (using luarocks 3.7). Any idea as to why ?copy_directories
folders are installed in the same folder then ? Is there a configuration entry to change that path ?➜ ls /nix/store/87fb1fncnbnm105rbc8ndapy5qwpjxmi-lua5.2-lua-cjson-2.1.0.6-1/lua-cjson/2.1.0.6-1/
files
bin/ lua-cjson-2.1.0.6-1.rockspec rock_manifest tests/
luarocks make --help
exposes a --no-manifest
option but it doesn't used afterwards. src/luarocks/cmd.lua
has if args.no_manifest then cfg.no_manifest = true end
but I can't find a way to turn the flag off, it always says Error: unknown option '--no-manifest'
in luarocks --no-manifest make ...
(3.7)
v3.7.0
). I set the rockspec_format to version 3.0
(though this should not matter, as this appears to be the same since 1.0
). My problem is now that I'm not able to set version
to a version that uses the semantic version scheme. According to the sources of Luarock, a version scheme matching [%w.]+-[%d]+
is expected. I don't know the naming of this version scheme and I fail to find it so I could read up how this scheme works. So I started to browse the registry at luarocks.org
to see how version strings look in practice. But I only see semantic versioning everywhere. Also if I check the rocks their sources rockspec, they just have plain semantic version strings. I thought they might just ignore the errors of luarocks lint <rockspec_file>
. But also if I run other commands like luarocks test
I get always this error that my version is not correctly formatted.rockspec_format
. But then the default is 1.0
and it doesn't change anything. So is it about the the luarock version itself and this was a breaking change in a more recent version?
version
key really means your project's version, dash, your rockspec's revision. So if you're using SemVer and your project is version 2.5.1, use version = "2.5.1-1"
. The revision suffix is for when you need to make changes to the rockspec itself but not to your project.
test_dependencies
. So, if you write a rockspec without a rockspec_format key you can't use some newer features, but your rockspec will work on older LuaRocks installations.
./lua_modules/bin/<binary>
, else it checks the user its module tree etc. Like for example npm exec
. I'm trying to figure out how to tell my IDE which busted
executable to use to run my tests. I would like to avoid custom functionality around it to check if this path exist or this or this, if luarocks knows all the trees and their order.luarocks install --check-lua-versions lua-utf8
. The installation fails due to a missing lua5.4 installation: "Error: No results matching query were found for Lua 5.4.”. But the thing is: I have Lua5.4 installed. lua -v
Lua 5.4.3 Copyright (C) 1994-2021 Lua.org, PUC-Rio