Bug 2222911 - Fedora 38 - Neovim LuaJIT support not activated for s390x
Summary: Fedora 38 - Neovim LuaJIT support not activated for s390x
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: luajit
Version: 38
Hardware: s390x
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Andreas Schneider
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ZedoraTracker
TreeView+ depends on / blocked
 
Reported: 2023-07-14 12:51 UTC by IBM Bug Proxy
Modified: 2023-08-15 12:30 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 203148 0 None None None 2023-07-14 12:51:55 UTC

Description IBM Bug Proxy 2023-07-14 12:51:32 UTC

Comment 1 IBM Bug Proxy 2023-07-14 12:51:44 UTC
== Comment: #0 - Jan Polensky <Jan.Polensky> - 2023-07-14 06:51:14 ==
---Problem Description---
Neovim is currently build without LuaJIT on s390x.
New plugin managers (lazy.nvim, packer.nvim) for Neovim as well as newer plugins (noice, flash, edgy, ...) require LuaJIT to work.

An alternative is to use LuaJIT2 on s390x which is compatible (Tested and works).
 
Contact Information = Jan Polensky/jan.polensky, Julian Ruess/julianruess 
 
---uname output---
Linux s8360006.lnxne.boe 6.5.0-20230713.rc1.git3.8e0070f7eda4.300.fc38.s390x #1 SMP Thu Jul 13 20:17:08 CEST 2023 s390x GNU/Linux
 
Machine Type = LPAR, z/VM, KVM 
 
---Debugger---
A debugger is not configured
 
---Steps to Reproduce---
 Use Plugin Managers or Plugins that require LuaJIT.
 
Userspace tool common name: neovim 
 
The userspace tool has the following bit modes: 64 bit 

Userspace rpm: neovim.s390x 

Userspace tool obtained from project website:  na 
 
*Additional Instructions for Jan Polensky/jan.polensky, Julian Ruess/julianruess:
-Attach ltrace and strace of userspace application.

Comment 2 Dan Horák 2023-07-14 14:03:38 UTC
I believe we should focus on LuaJIT, rather then a consumer (neovim, it relies on the system luajit package). The current LuaJIT builds are aarch64 + x86 only. Do you say there is a LuaJIT fork that's actively maintained and friendly to non-x86 arches? Because it has been always the root problem ...

Comment 3 IBM Bug Proxy 2023-07-14 15:21:13 UTC
------- Comment From Jan.Polensky 2023-07-14 11:15 EDT-------
We know that our root problem is LuaJIT atm.
But as far as we know the maintainer wants to get paid to support other architectures than the default ones.

LuaJIT2 (https://github.com/openresty/luajit2) has a similar maintenance but with s390x support.
It is also used by OpenResty.

E.g. for neovim, we only need to change the LuaJIT dependency in https://github.com/neovim/neovim/blob/master/cmake.deps/deps.txt to LuaJIT2 and it works on s390x.

Comment 4 Dan Horák 2023-07-14 15:59:39 UTC
As I have said, neovim is built against the distro-provided luajit library. Building against on demand downloaded libraries isn't allowed. Thus we need to fix the system luajit first. Which would be beneficial for other packages as well.

Comment 5 IBM Bug Proxy 2023-07-14 16:20:55 UTC
------- Comment From julianruess 2023-07-14 12:14 EDT-------
Is it possible to replace the system luajit with luajit2?

Comment 6 Dan Horák 2023-07-14 16:45:39 UTC
(In reply to IBM Bug Proxy from comment #5)
> ------- Comment From julianruess 2023-07-14 12:14 EDT-------
> Is it possible to replace the system luajit with luajit2?

I hope so, but will leave it on Andreas who is the maintainer.

Comment 7 Andreas Schneider 2023-07-15 15:17:33 UTC
neovim uses luajit [1] an not openresty-luajit. I do not plan to maintain openresty-luajit nor replace luajit.

The luajit package had s390x support in the past, but it bit rotted as nobody cared. The patch stopped applying. I'm not a s390x developer nor really deep into luajit. I plan to stay on luajit upstream which is actively maintained for the most used platforms.

The s390x patch of the luajit RPM package had IBM addresses in it, I wrote mails to those people and told them I will drop it. They never replied!

The last effort was for s390x support was [2]. It is again just a single huge patch without any history. If you care about s390x support maybe IBM should start to talk to the luajit maintainer how to get s390x support in luajit. I guess s390x in luajit would need an active maintainer!


How to fix it?

Option a) Get s390x support upstream into luajit
Option b) We could add a s390x patch to the luajit package, if someone from IBM maintains a
          branch and regularly rebases it on luajit v2.1 branch!
          As soon as it stops applying I will drop s390x support for luajit (including neovim).


[1] https://github.com/LuaJIT/LuaJIT
[2] https://github.com/LuaJIT/LuaJIT/pull/891

Comment 8 IBM Bug Proxy 2023-08-14 22:50:35 UTC
------- Comment From iii.com 2023-08-14 18:41 EDT-------
I did a rebase and successfully ran a few testsuites against the resulting code.
Could you please have a look?

The code is here:

https://github.com/LuaJIT/LuaJIT/pull/631

or

https://github.com/LuaJIT/LuaJIT/commit/ad1d41ea8bd3454c066172c99e94cc6848e470ce

Comment 9 IBM Bug Proxy 2023-08-15 09:30:24 UTC
------- Comment From Jan.Polensky 2023-08-15 05:27 EDT-------
(In reply to comment #11)

Works build Beovim with LuaJIT from your branch.
No errors on s390x found.

I've add a comment on github too.

Comment 10 IBM Bug Proxy 2023-08-15 12:30:38 UTC
------- Comment From julianruess 2023-08-15 08:25 EDT-------
Same for me. Works with neovim on s390x and also added a comment on GitHub.


Note You need to log in before you can comment on or make changes to this bug.