Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 928297 - dev-lang/luajit: Crashes on musl ppc
Summary: dev-lang/luajit: Crashes on musl ppc
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: PPC Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-31 16:06 UTC by jonys
Modified: 2024-03-31 17:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jonys 2024-03-31 16:06:43 UTC
dev-lang/luajit-2.1.0_beta3_p20220127-r2 is incompatible with musl libc on ppc – it crashes on startup with either SIGILL or SIGSEGV, depending on the exact setup. The issue is known upstream and marked “reject obsolete”, since they plan to deprecate PowerPC support altogether: https://github.com/LuaJIT/LuaJIT/issues/481

This is a problem in itself, but it is amplified by the fact that luajit is the only possible dependency of media-video/mpv[lua]. Even though mpv itself declares `lua5-1` as a possible value of LUA_SINGLE_TARGET, it is masked via `profiles/base/package.use.mask` and luajit forced via `profiles/base/package.use.force`.

After manually unmasking and switching the flags, media-video/mpv-0.37.0 builds fine against dev-lang/lua-5.1.5-r200 and the OSD is showing, so the Lua binding works at least somewhat.

Would it be possible to switch the masks on the ppc musl profile, i.e. mask `lua_single_target_luajit` and force `lua_single_target_lua5-1`?
Comment 1 Ionen Wolkens gentoo-dev 2024-03-31 16:16:45 UTC
Tempted to just invert the logic for all ppc rather than just musl+ppc. Was already done for ppc64 due to lack of keywords, and then there's also that comment:
>PPC32 support will be removed soon, anyway.
Guess there's not much to expect from luajit and ppc.
Comment 2 Larry the Git Cow gentoo-dev 2024-03-31 17:04:11 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45782d065e69449b27261f646095342ad431554e

commit 45782d065e69449b27261f646095342ad431554e
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2024-03-31 16:31:02 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2024-03-31 17:04:00 +0000

    profiles/arch/powerpc: move mpv's luajit invert from ppc64 to ppc*
    
    wrt bug #928297, leaving open in case maintainers wants to either
    mask it on musl (at least) or even full dekeyword on ppc depending
    on upstream situation.
    
    This is just mpv's side of things.
    
    Bug: https://bugs.gentoo.org/928297
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 profiles/arch/powerpc/package.use.force       | 11 ++++++++++-
 profiles/arch/powerpc/package.use.mask        |  9 +++++++++
 profiles/arch/powerpc/ppc64/package.use.force | 10 +---------
 profiles/arch/powerpc/ppc64/package.use.mask  |  8 --------
 4 files changed, 20 insertions(+), 18 deletions(-)
Comment 3 jonys 2024-03-31 17:18:38 UTC
(In reply to Ionen Wolkens from comment #1)
> Guess there's not much to expect from luajit and ppc.

I'm not sure how much to expect from luajit in general. While searching their bugtracker and pull-request queue for hints on this bug, I got away with the impression that the upstream is not in great shape and while there are forks that try to have more active development, but no clear switch has happened yet.

Case in point – the linked issue is five years old and the first activity there is the cited deprecation remark, which is itself two years old now.

Anyway, thank you for the USE flag shuffle!
Comment 4 Ionen Wolkens gentoo-dev 2024-03-31 17:29:48 UTC
(In reply to jonys from comment #3)
> (In reply to Ionen Wolkens from comment #1)
> > Guess there's not much to expect from luajit and ppc.
> 
> I'm not sure how much to expect from luajit in general. While searching
> their bugtracker and pull-request queue for hints on this bug, I got away
> with the impression that the upstream is not in great shape and while there
> are forks that try to have more active development, but no clear switch has
> happened yet.
Yeah, eventually may need to explore alternatives for lua5-1 support. LuaJIT at least has the advantage of being maintained to some extent but well.