Last modified: 2013-01-30 01:33:25 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T45819, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43819 - Current version of LuaSandbox is incompatible with LuaJIT
Current version of LuaSandbox is incompatible with LuaJIT
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Scribunto (Other open bugs)
master
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-10 11:14 UTC by Antoine "hashar" Musso (WMF)
Modified: 2013-01-30 01:33 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Antoine "hashar" Musso (WMF) 2013-01-10 11:14:19 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
Comment 1 Antoine "hashar" Musso (WMF) 2013-01-10 11:17:25 UTC
Example build output https://integration.mediawiki.org/ci/job/php-luasandbox-build/3/console
Comment 2 Antoine "hashar" Musso (WMF) 2013-01-15 08:38:46 UTC
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
Comment 3 Victor Vasiliev 2013-01-15 08:44:55 UTC
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.
Comment 4 Antoine "hashar" Musso (WMF) 2013-01-18 12:44:27 UTC
https://gerrit.wikimedia.org/r/#/c/44606/ makes the Jenkins job to vote -1 on build failure.
Comment 5 Dereckson 2013-01-21 20:50:15 UTC
*** Bug 44221 has been marked as a duplicate of this bug. ***
Comment 6 Dereckson 2013-01-21 20:58:53 UTC
Well, no, bug 44221 isn't really a duplicate, it's the same compile error message but another reason, I'm reopening it.
Comment 7 Mike Pall 2013-01-22 04:22:43 UTC
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.
Comment 8 Tim Starling 2013-01-30 01:14:49 UTC
Should be fixed in https://gerrit.wikimedia.org/r/#/c/46660

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links