Last modified: 2013-01-30 01:33:25 UTC
I tried compiling the mediawiki/php/luasandbox PHP extension on gallium (which runs Ubuntu Precise). I end up with a compilation error: /var/lib/jenkins/jobs/php-luasandbox-build/workspace/luasandbox_lstrlib.c:382:21: error: 'LUAI_MAXCALLS' undeclared (first use in this function) luaconf.h does not have any LUAI_MAXCALLS defined: $ grep LUAI /usr/include/luajit-2.0/* /usr/include/luajit-2.0/luaconf.h:#define LUAI_MAXSTACK 65500 /* Max. # of stack slots for a thread (<64K). */ /usr/include/luajit-2.0/luaconf.h:#define LUAI_MAXCSTACK 8000 /* Max. # of stack slots for a C func (<10K). */ /usr/include/luajit-2.0/luaconf.h:#define LUAI_GCPAUSE 200 /* Pause GC until memory is at 200%. */ /usr/include/luajit-2.0/luaconf.h:#define LUAI_GCMUL 200 /* Run GC at 200% of allocation speed. */ /usr/include/luajit-2.0/luaconf.h:#define LUAI_UACNUMBER double /usr/include/luajit-2.0/luaconf.h:#define LUAI_MAXNUMBER2STR 32 I got the luajit and libluajit-5.1-dev packages installed (https://gerrit.wikimedia.org/r/#/c/43182/ ). apt-cache policy libluajit-5.1-dev is version 2.0.0~beta9+dfsg-1
Example build output https://integration.mediawiki.org/ci/job/php-luasandbox-build/3/console
vvv told me to use liblua5.1-0-dev . I have installed it manually on gallium and retriggered a build in Jenkins, that solved it. https://integration.mediawiki.org/ci/job/php-luasandbox-build/5/console The related puppet manifest is https://gerrit.wikimedia.org/r/43999
I still want to know whether we want to support LuaJIT or not. This seems like something possibly easy to fix, but I want to hear Tim's opinion on it.
https://gerrit.wikimedia.org/r/#/c/44606/ makes the Jenkins job to vote -1 on build failure.
*** Bug 44221 has been marked as a duplicate of this bug. ***
Well, no, bug 44221 isn't really a duplicate, it's the same compile error message but another reason, I'm reopening it.
Definitions prefixed with LUAI_ are *internal* (that's what the I stands for). They are only used for building the VM itself. LuaJIT has moved most of these to private headers. Modules compiled against Lua or LuaJIT are not supposed to use these for any purpose whatsoever. The proper fix is to change the offending code which relies on an internal symbol.
Should be fixed in https://gerrit.wikimedia.org/r/#/c/46660