1. Anders Ruud
  2. love
  3. Issues

Issues

Issue #1277 resolved

support for luajit-2.1.0-beta3

Vladimír Čunát
created an issue

love-0.10.2 fails to build with the new luajit version, probably because it now provides some features from lua 5.2 and 5.3.

In file included from libraries/luasocket/libluasocket/unix.c:12:0:
libraries/luasocket/libluasocket/auxiliar.h:38:61: error: unknown type name 'luaL_reg'
 void auxiliar_newclass(lua_State *L, const char *classname, luaL_reg *func);
                                                             ^
libraries/luasocket/libluasocket/unix.c:45:8: error: unknown type name 'luaL_reg'

Comments (9)

  1. Alex Szpakowski

    The error originates in luasocket's source code - it was trying to use Lua 5.0 types which were deprecated all the way back in Lua 5.1 (LuaJIT 2.1 just removes those obsolete deprecated APIs).

    love 0.11's source uses luasocket 3.0 which no longer uses those deprecated Lua 5.0 APIs I believe, so it should already be fixed in love's latest source code (in the 'minor' branch).

  2. Bart van Strien

    That is surprising, because libraries/luasocket/libluasocket/lua.h, which is (should be?) included by libraries/luasocket/libluasocket/unix.c contains that very define. Maybe the greater than should be greater than or equals? Can you confirm that fixes compilation, because I'd like to commit the fix for future packagers?

  3. Bart van Strien

    Fix luasocket compatibility with luajit 2.1.0 beta 3 (fix #1277)

    Note that luasocket 3.0 (in minor) targets lua 5.1, so it does not rely on a 5.0 compatibility feature, and does not require this patch. Since a 0.10.3 release seems unlikely at this point, this commit is mostly targeted at future packagers of older love versions.

    → <<cset 10f58e78bbfd>>

  4. Log in to comment