Skip to content

Instantly share code, notes, and snippets.

@amigojapan
Last active January 3, 2024 06:30
Show Gist options
  • Save amigojapan/543b0d44f698cc03a61d7ec57ef968be to your computer and use it in GitHub Desktop.
Save amigojapan/543b0d44f698cc03a61d7ec57ef968be to your computer and use it in GitHub Desktop.
[SOLVED]
$ cygcheck -l liblua-devel
/usr/include/lua5.3/lauxlib.h
/usr/include/lua5.3/lua.h
/usr/include/lua5.3/lua.hpp
/usr/include/lua5.3/luaconf.h
/usr/include/lua5.3/lualib.h
/usr/lib/liblua5.3.dll.a
/usr/lib/pkgconfig/lua5.3.pc
/etc/postinstall/liblua-devel.sh
/etc/preremove/liblua-devel.sh
/usr/lib/liblua-5.3.dll.a
/usr/lib/pkgconfig/lua-5.3.pc
$ luarocks
.
.
.
Configuration:
Lua:
Version : 5.3
Interpreter: /usr/bin/lua5.3 (ok)
LUA_DIR : /usr (ok)
LUA_BINDIR : /usr/bin (ok)
LUA_INCDIR : /usr/include/lua5.3 (ok)
LUA_LIBDIR : /usr/lib/ (not found)
****************************************
Use the command
luarocks config variables.LUA_LIBDIR <dir>
to fix the location
****************************************
$ luarocks path
export LUA_PATH='/usr/local/share/lua/5.3/?.lua;/usr/share/lua/5.3/?.lua;/usr/share/lua/5.3/?/init.lua;/usr/lib/lua/5.3/?.lua;/usr/lib/lua/5.3/?/init.lua;./?.lua;./?/init.lua;/home/usmpa/.luarocks/share/lua/5.3/?.lua;/home/usmpa/.luarocks/share/lua/5.3/?/init.lua;/usr/local/share/lua/5.3/?/init.lua'
export LUA_CPATH='/usr/lib/lua/5.3/?.dll;/usr/lib/lua/5.3/loadall.dll;./?.dll;/home/usmpa/.luarocks/lib/lua/5.3/?.so;/usr/local/lib/lua/5.3/?.so'
export PATH='/home/usmpa/.luarocks/bin:/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Windows/System32/OpenSSH:/cygdrive/c/Users/usmpa/AppData/Local/Microsoft/WindowsApps'
after doing an updatedb and then locate liblua5.3 I foudn that the right directory was set with the following command:
luarocks config variables.LUA_LIBDIR /cygdrive/c/Users/usmpa/AppData/Local/Packages/TheDebianProject.DebianGNULinux_76v4gfsz19hv4/LocalState/rootfs/usr/lib/x86_64-linux-gnu/
ofcourse this is for my distro and my user, so you must use locate for yours
@BrianInglis
Copy link

Would have been better posting this on Cygwin list as some devs/maintainers will not access GH and some other commercial sites.
What is LUA_LIBDIR meant to point to?
Are you sure that LUA_{C,}PATH can contain glob patterns?
Below is what was installed on my system by liblua-devel and lua-gv pulled in by some other package:

$ ls -gloR /usr/lib/*lua*
lrwxrwxrwx 1     30 Nov 12 15:08 /usr/lib/liblua.dll.a -> /etc/alternatives/liblua.dll.a
-rw-r--r-- 1 188616 Jun  5  2021 /usr/lib/liblua5.3.dll.a
lrwxrwxrwx 1     17 Jun  5  2021 /usr/lib/liblua-5.3.dll.a -> ./liblua5.3.dll.a

/usr/lib/lua:
total 0
drwxr-xr-x 1 0 Aug 24  2015 5.1
drwxrwxr-x 1 0 May 22  2023 5.3

/usr/lib/lua/5.1:
total 0

/usr/lib/lua/5.3:
total 96
-rwxr-xr-x 1 94227 May 17  2023 gv.dll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment