You are not logged in.

#1 2020-12-17 19:30:31

Pellaeon
Member
Registered: 2020-06-15
Posts: 28

Lua Issue

I'm trying to install a Lua plugin in Hexchat, and when it's attempted the following error is shown:

Lua error: /home/username/.config/hexchat/addons/playback.lua:2: module 'lgi' not found:
 no field package.preload['lgi']
 no file '/usr/share/lua/5.4/lgi.lua'
 no file '/usr/share/lua/5.4/lgi/init.lua'
 no file '/usr/lib/lua/5.4/lgi.lua'
 no file '/usr/lib/lua/5.4/lgi/init.lua'
 no file './lgi.lua'
 no file './lgi/init.lua'
 no file '/usr/lib/lua/5.4/lgi.so'
 no file '/usr/lib/lua/5.4/loadall.so'
 no file './lgi.so'

I have the following Lua packages installed:

lua 5.4.2-1
lua-lgi 0.9.2-2
lua52 5.2.4-5
lua53 5.3.6-1
luajit 2.0.5-3

Looking at the directories cited in the error message itself, in both the /usr/lib/lua and /usr/share/lua directories I only have 5.1 and 5.3 sub-directories, no 5.4 to be found.

Offline

#2 2020-12-17 19:53:03

dkay67
Member
Registered: 2020-12-02
Posts: 3

Re: Lua Issue

The LGI GitHub readme says that lua 5.4 is experimental.

Screenshot of readme

Does it work with lua 5.3?

Last edited by dkay67 (2020-12-17 19:54:08)

Offline

#3 2020-12-17 20:05:52

Pellaeon
Member
Registered: 2020-06-15
Posts: 28

Re: Lua Issue

dkay67 wrote:

Does it work with lua 5.3?

I'm unsure, I couldn't find anything about versions in the script, nor could I find anything about selecting the Lua version in Hexchat itself.

Here is the place in the script where the lib is called if it's any help:

local lgi = require('lgi')
local GLib = lgi.require('GLib')

Offline

#4 2020-12-17 20:15:32

dkay67
Member
Registered: 2020-12-02
Posts: 3

Re: Lua Issue

What if you remove lua5.4 and just install 5.4?

Offline

#5 2020-12-17 20:28:33

Pellaeon
Member
Registered: 2020-06-15
Posts: 28

Re: Lua Issue

dkay67 wrote:

What if you remove lua5.4 and just install 5.4?

What are you taking about? This is the only Lua 5.4 package, and the one installed.

Offline

#6 2021-02-25 01:27:56

AllMAssive
Member
Registered: 2021-02-25
Posts: 1

Re: Lua Issue

the precompiled hexchat relys on lua 5.4.
i checked out the current hexchat-git and followed this guide to compile.

meson configure build

showed my default build options.
since i wanted to stay with packages from the arch default repo, i did

meson configure build -Dwith-lua=lua53

i have lua53 and lua53-lgi installed.
make sure that you start /usr/local/bin/hexchat afterwards.

Last edited by AllMAssive (2021-02-25 01:51:08)

Offline

Board footer

Powered by FluxBB