Description of problem: neovim builds presently with lua 5.3 on Fedora, but upstream advises that it should use 5.1. This means that lua-mpack needs to be built for 5.1 too. Version-Release number of selected component (if applicable): 1.0.7-4 Steps to Reproduce: 1. try to build neovim with lua 5.1 or luajit Actual results: fails missing mpack Expected results: builds and runs like the wind Additional info: Also affects lua-lpeg and neovim itself. I'll be submitting patches for all.
Created attachment 1541215 [details] lua-mpack-compat.patch
Created attachment 1541219 [details] lua-mpack-compat.patch Changed some defines to globals for consistency
What exactly does not work for you, that you want lua 5.1? Please be more precise.
Hi Andreas. Nothing broken YET, but neovim expects to build with lua 5.1. See https://github.com/neovim/neovim/wiki/FAQ#why-lua-51-instead-of-lua-53 Fedora's build of neovim is using 5.3 so I checked with justinmk (neovim maintainer) and he said: > if it works then great, but it's likely to cause problems as we gain more Lua code > all distros should have Lua 5.1 available, it is a different language that Lua 5.3, it is not "the old version" > Also why -DPREFER_LUA=ON ? > That disables LuaJit I have nightly builds of neovim on Copr, so I've been gradually putting together the pieces necessary for neovim to use luajit (or compat-lua on other arches). mpack is one of the dependencies, along with lpeg, see https://bugzilla.redhat.com/show_bug.cgi?id=1685783
Also this fixes the spelling error "pkg-config --clfags" to "pkg-config --cflags" :-)
I did all the required changes that neovim works with lua 5.3, because it was a mess with lua 5.1. It seems to be unmaintained and the same seems to be the case for luajit. At least 2 years ago there was nobody who did a luajit release. So what are the advantages using luajit or lua 5.1?
Also you should share a link to that copr repo.
Just to clarify, I don't have strong feelings personally about lua 5.1 or 5.3. I'm just trying to sync with upstream dependencies. Also it would be nice to use luajit for the performance aspect. I've seen the same thing about luajit though. If it's unmaintained then that could cause problems too, but I guess it would cause problems for both upstream and Fedora at the same time. The copr is https://copr.fedorainfracloud.org/coprs/agriffis/neovim-nightly/ I'll also attach the neovim spec patch so you have all the pieces to consider. There is one more thing... it builds fine with luajit because it has the bitops lib built-in. (I know you're familiar with this because you did the bit32 patch for lua 5.3.) But for building on compat-lua without luajit (think epel and alternate arches) we'd need a compat-lua-bit rpm for https://bitop.luajit.org/index.html I'd go ahead and make that if it helps for acceptance, but I don't want to do the extra work if it will be DOA. Let me know your thoughts.
Created attachment 1541449 [details] neovim-0.3.4-luajit.patch This updates to 0.3.4 and adds luajit support, with theoretical compat-lua support too (depending on the fictional compat-lua-bit rpm)
Just FYI, I have packages for neovim-nightly build for both OpenSUSE and Fedora/RHEL on https://build.opensuse.org/package/show/home:mcepl:neovim/neovim (problems with Fedora builds are temporary on our side, sorry).
Andreas, I'm trying to get more info about whether this change is necessary or worthwhile from the neovim folks at https://gitter.im/neovim/neovim You can feel free to join if you care to discuss, but I will summarize what I learn here. So far it's not clear to me how much luajit buys neovim, nor how much the compatibility breakage between 5.1 and 5.3 matters in practice.
For the bit of discussion about the relationship between Neovim and various versions of Lua (we deal with similar problems in OpenSUSE, although the main Neovim just links against LuaJIT), see my PR https://github.com/neovim/neovim/pull/9280 and discussion therein.
Aron, the thing is that lua 5.1 is unmaintained since 2012. I don't really understand why they insist on riding a dead horse. Also are there performance number that luajit is so much faster? When I started to package neovim the luajit project was pretty much dead, it looks like someone started to pick up maintainership in 2017 but since then nothing happened again. So I wonder what this will buy us as neovim currently seems to work just fine with lua 5.3. neovim on openSUSE doesn't seem to be faster than on Fedora at all.
(In reply to Andreas Schneider from comment #13) > Aron, the thing is that lua 5.1 is unmaintained since 2012. lua 5.1 != luajit https://github.com/LuaJIT/LuaJIT seems certainly more alive than 2012.
Andreas, here are my thoughts... First, I'm not that worried about perf. It's definitely not an issue yet, and I'm skeptical that it will ever become an issue. But since you asked, here's some perf info on synthetic benchmarks: https://luajit.org/performance_x86.html The part that matters, I think, is compatibility. Now I've gone over the breaking changes at https://www.lua.org/manual/5.2/manual.html#8 and https://www.lua.org/manual/5.3/manual.html#8 The changes in the language itself don't seem that concerning. The changes in the core libraries could be more problematic. The comment that caught my eye was this one: https://github.com/neovim/neovim/pull/9280#issuecomment-442209710 Basically plugin developers using Lua need to know what version of the language/libs they're developing for. Neovim upstream says it will be 5.1, so if distros do something different, then plugins written expecting 5.1 could break in ways that are confusing to end users. Inevitably upstream ends up recommending to use an out-of-tree build rather than the "broken" distro build. I was originally concerned about other architectures, but on review, I see that luajit is available in Fedora for other architectures, so this doesn't seem to be a major concern. https://koji.fedoraproject.org/koji/buildinfo?buildID=1191789 Probably the biggest concern I would have is whether Fedora will drop luajit at some point. I guess it would need to have bugs (especially security) or stop building properly. I suppose the recourse at that point would be to switch to building neovim with lua 5.3 or later. Presumably upstream neovim would be going through the same migration for the same reasons. So my feeling is this: luajit is already in Fedora, and it's trivial to build compat versions of the two dependent libs (mpack and lpeg). The patch in this bz and the one in bz #1685783 are all that's needed for those libs. If you'd be willing to accept those, then the corresponding change to neovim to use luajit is trivial. This seems like a better course to me than diverging from upstream for now.
Created attachment 1541869 [details] neovim-0.3.4-luajit.patch Simplify neovim-0.3.4-luajit.patch to use luajit or lua 5.3, not compat-lua Default is to build with luajit, but it also builds (as previously) against lua 5.3 if given --without luajit
Created attachment 1541870 [details] neovim-0.3.4-luajit.patch Undo an unnecessary change to an el7 section
I would suggest neovim moves better now than later. There have been luajit 2.1 beta but nothing happened since too years. So I would say, upstream is dead again. This means sooner or later it will be dropped for sure. It would be better for neovim to move to 5.3 which is a maintained version of the language. However if you still want luajit and help making sure that neovim doesn't break with lua 5.3, then I'm fine. However as lua 5.1 is called compat-lua, I think the package name should be compat-lua-mpack as it is lua-mpack for 5.3. Could you create merge requests: https://src.fedoraproject.org/rpms/lua-mpack
Sounds good, Andreas. I think I'm mostly set up for src.fedoraproject.org https://src.fedoraproject.org/user/agriffis https://admin.fedoraproject.org/accounts/user/view/agriffis and I uploaded my public ssh key yesterday but I can't clone via ssh. Looking at https://fedoraproject.org/wiki/Infrastructure/CommonProblems it seems maybe I need to be sponsored for access. Is that something you can do?
If I can get access sorted today, I'll make the merge requests on the weekend
Andreas, I got things figured out. I hadn't used fedpkg before. Here are the pull requests: https://src.fedoraproject.org/rpms/lua-mpack/pull-request/1 https://src.fedoraproject.org/rpms/lua-lpeg/pull-request/2 https://src.fedoraproject.org/rpms/neovim/pull-request/2 There are a couple problems: 1. The lua-mpack build fails on f27 i686 and armv7hl during check. The strange thing is that my changes didn't affect how those are being built or tested. Do I need to resolve those somehow? See https://koji.fedoraproject.org/koji/taskinfo?taskID=33327082 2. The neovim build fails, of course, because it doesn't have its requirements met yet.
Andreas, please let me know if there's anything more you need from me
I've merged your PR, however it doesn't build! luajit is not available on all platforms. This is another point against luajit! Please do a scratch-build on koji before submitting pull requests.
I'm disabling luajit as it fails to build on aarch64. https://koji.fedoraproject.org/koji/taskinfo?taskID=33630263
compat-lua-mpack is available in Fedora 30 and newer.
Apologies about the lack of koji scratch build. I'm not that familiar with the infrastructure yet. Are you disabling luajit for all arches or just for aarch64? I had hoped that a missing architecture could easily be handled by %ifarch at the top... that's why it's conditionalized throughout.
neovim-0.3.4-1.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-78f5ecf646
neovim-0.3.4-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-78f5ecf646
neovim-0.3.4-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.