Bug 297414 - devel/lua-lgi: fails with glib 2.88.3
Summary: devel/lua-lgi: fails with glib 2.88.3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Rodrigo Osorio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-08-10 08:40 UTC by Kan Sasaki
Modified: 2026-08-19 11:46 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (andrew)


Attachments
Minimal patch to fix for lua-lgi 0.9.2 (2.84 KB, patch)
2026-08-13 17:59 UTC, Rodrigo Osorio
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kan Sasaki 2026-08-10 08:40:23 UTC
After upgrading glib from 2.86.4,2 to 2.88.3,2, lua-lgi fails while starting awesome.

Installed versions:

lua-lgi: 0.9.2_3
glib: 2.88.3,2

The relevant error is:

error while running function!
stack traceback:
        [C]: in field 'fromarray'
        /usr/local/share/lua/5.3/lgi/ffi.lua:87: in function 'lgi.ffi.load_enum'
        /usr/local/share/lua/5.3/lgi/override/cairo.lua:55: in main chunk
        [C]: in function 'require'
        /usr/local/share/lua/5.3/lgi/namespace.lua:183: in function 'lgi.require'
        (...tail calls...)
        /usr/local/share/awesome/lib/gears/color.lua:54: in main chunk
        [C]: in function 'require'
        /usr/local/share/awesome/lib/gears/init.lua:10: in main chunk
        [C]: in function 'require'

error: /usr/local/share/lua/5.3/lgi/ffi.lua:87:
bad argument #1 to 'fromarray' (lgi.record expected, got table)


Downgrading both glib and glib-bootstrap from 2.88.3,2 to 2.86.4,2 makes awesome work again.
This appears to be the same lua-lgi incompatibility with GLib >= 2.87 reported by Debian:

https://bugs.debian.org/1127302

The Debian report also lists awesome as an affected package. The issue was fixed there in lua-lgi 0.9.2-7.
The upstream fix referenced by the Debian report is:

https://github.com/lgi-devs/lgi/pull/352
Comment 1 Rodrigo Osorio freebsd_committer freebsd_triage 2026-08-13 17:59:01 UTC
Created attachment 273727 [details]
Minimal patch to fix for lua-lgi 0.9.2

Tested on FreeBSD 15 with lua53 flavour.
Fix awesome startup issue
Comment 2 Viacheslav Chimishuk 2026-08-17 19:59:24 UTC
(In reply to Rodrigo Osorio from comment #1)
The patch works for me too. Thanks.
Comment 3 commit-hook freebsd_committer freebsd_triage 2026-08-19 10:27:05 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5a2b826c7d67d25fca30ed286754191316a8182b

commit 5a2b826c7d67d25fca30ed286754191316a8182b
Author:     Rodrigo Osorio <rodrigo@FreeBSD.org>
AuthorDate: 2026-08-19 09:51:44 +0000
Commit:     Rodrigo Osorio <rodrigo@FreeBSD.org>
CommitDate: 2026-08-19 10:24:41 +0000

    devel/lua-lgi: unbreak lua-lgi after glib 2.88.3 upgrade

    Minimal port of lua-lgi fix for new Glib

    PR:             297414
    Reported by:    Kan Sasaki <sasaki12@gmail.com>
    Obtained from:  https://github.com/lgi-devs/lgi/pull/361
    Approved by:    portmgr (build and runtime fix blanket)

 devel/lua-lgi/Makefile                           |  2 +-
 devel/lua-lgi/files/patch-lua-lgi-glib_fix (new) | 68 ++++++++++++++++++++++++
 2 files changed, 69 insertions(+), 1 deletion(-)
Comment 4 Rodrigo Osorio freebsd_committer freebsd_triage 2026-08-19 11:46:45 UTC
Committed, thanks