lgi-devs / lgi-devs/lgi

Fails with LuaJIT2 on AArch64

Open
#270 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
491
Forks
81
PR merge metrics
No merged PRs in 30d

Description

Noticed while trying to build AwesomeWM: lgi does not seem to work with LuaJIT on AARCH64.

In particular, with LuaJIT 2.1.0-beta3 (the only version packaged in Gentoo), I get the following error running the gtkhello.lua example.

jakob@Lambda ~/lgi/samples $ luajit-2.1.0-beta3 gtkhello.lua
luajit-2.1.0-beta3: bad light userdata pointer
stack traceback:
	[C]: at 0xffff94d66ed4
	[C]: in function 'require'
	/usr/share/lua/5.1/lgi/core.lua:14: in main chunk
	[C]: in function 'require'
	/usr/share/lua/5.1/lgi/init.lua:19: in main chunk
	[C]: at 0xffff9502ff80
	[C]: in function 'require'
	gtkhello.lua:9: in main chunk
	[C]: at 0xaaaab5602620

This may be relevant: https://github.com/neovim/neovim/issues/7879

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure from the gtkhello.lua example with LuaJIT 2.1.0-beta3 on AArch64. Use the traceback to inspect lgi/core.lua and lgi/init.lua, and compare the reported behavior with the linked Neovim issue. Done means the example loads lgi successfully on the affected platform.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.