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
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!
(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.
(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.
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.
(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.
Recent commits to the LuaJIT repository automatically enables GC64 mode by default on 64-bit systems: https://github.com/LuaJIT/LuaJIT/commit/bd00094c3b50e193fb32aad79b7ea8ea6b78ed25