Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 685010 - =dev-lang/luajit-2.1.0_beta3 : add USE flag for GC64 mode
Summary: =dev-lang/luajit-2.1.0_beta3 : add USE flag for GC64 mode
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 2 votes (vote)
Assignee: Rafael Martins
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: 682990
  Show dependency tree
 
Reported: 2019-05-03 22:39 UTC by Red
Modified: 2019-11-04 19:40 UTC (History)
2 users (show)

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


Attachments
Enable GC64 in LuaJIT-2.1.0-beta3 (LuaJIT-2.1.0-beta3-enable-gc64.patch,462 bytes, patch)
2019-09-22 20:32 UTC, Red
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Red 2019-05-03 22:39:35 UTC
LuaJIT v2.1.0_beta3 offers GC64 mode.

This is needed for certain things such as multiplayer Minetest servers (games-action/minetest and games-action/minetest_game) which require more than 2 GB RAM. Older versions of LuaJIT will crash the game, as will LuaJIT 2.1.0_beta3 without GC64 mode enabled.

This usually only happens when running multiplayer servers with lots of mods and where lots of players have built things on the server over an extended period of time. This happened to me on a mod-heavy server I run on a Slackware VPS ("THE CREATIVE GARDENS" in the public server list) after the first two years of its existence.

The maintainer of games-action/minetest (William Breathitt Gray) has offered to add this fix as a USE flag if =dev-lang/luajit-2.1.0_beta3 was to add a USE flag for GC64.

Enabling GC64 also requires a tweak to the LuaJIT Makefile.

More info:

* https://forum.minetest.net/viewtopic.php?f=3&t=18263
* https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/Makefile#L114
* Bug 678404
* Bug 682990
Comment 1 Red 2019-09-22 20:32:40 UTC
Created attachment 590662 [details, diff]
Enable GC64 in LuaJIT-2.1.0-beta3

Hi,

I've attached a patch file which enables GC64 mode in LuaJIT-2.1.0-beta3.

All it does is uncomment a single line in src/Makefile.

I don't know how to write ebuild files, but I hope to see this USE flag added soon, so that bug 682990 may be fixed.

Thank you!
Comment 2 William Breathitt Gray 2019-09-25 22:52:51 UTC
(In reply to Red from comment #1)
> Created attachment 590662 [details, diff] [details, diff]
> Enable GC64 in LuaJIT-2.1.0-beta3
> 
> Hi,
> 
> I've attached a patch file which enables GC64 mode in LuaJIT-2.1.0-beta3.
> 
> All it does is uncomment a single line in src/Makefile.
> 
> I don't know how to write ebuild files, but I hope to see this USE flag
> added soon, so that bug 682990 may be fixed.
> 
> Thank you!

Unfortunately, this patch unconditionally enables GC64 mode, which is not really what we want for a USE flag. Since USE flags conditionally enable features, we should conditionally enable GC64 mode by checking the USE flag and passing in "-DLUAJIT_ENABLE_GC64" if enabled.
Comment 3 Red 2019-09-26 01:32:54 UTC
(In reply to William Breathitt Gray from comment #2)
> (In reply to Red from comment #1)
> > Created attachment 590662 [details, diff] [details, diff] [details, diff]
> > Enable GC64 in LuaJIT-2.1.0-beta3
> > 
> > Hi,
> > 
> > I've attached a patch file which enables GC64 mode in LuaJIT-2.1.0-beta3.
> > 
> > All it does is uncomment a single line in src/Makefile.
> > 
> > I don't know how to write ebuild files, but I hope to see this USE flag
> > added soon, so that bug 682990 may be fixed.
> > 
> > Thank you!
> 
> Unfortunately, this patch unconditionally enables GC64 mode, which is not
> really what we want for a USE flag. Since USE flags conditionally enable
> features, we should conditionally enable GC64 mode by checking the USE flag
> and passing in "-DLUAJIT_ENABLE_GC64" if enabled.

Again I don't know how portage/ebuilds work, though I hope to learn someday. I just wanted to show that enabling GC64 mode is just about uncommenting a single line.
Comment 4 William Breathitt Gray 2019-11-02 17:52:34 UTC
Is there an opposition to this? If not, I can submit a patch introducing USE flag; it looks like a simple define enables the feature, so nothing complicated here.
Comment 5 Red 2019-11-02 22:07:52 UTC
(In reply to William Breathitt Gray from comment #4)
> Is there an opposition to this? If not, I can submit a patch introducing USE
> flag; it looks like a simple define enables the feature, so nothing
> complicated here.

I'm all for it. The reason I am being a nag about it is because I might want to switch said VPS to Gentoo at some point in the future, though I'd imagine running a Gentoo VPS would be quite a commitment.