lupa
lupa copied to clipboard
installation fails with luajit from homebrew
Hi,
Thanks for an awesome project!
I'm installing lupa into 2.7 virtualenv on OS X 10.9.5. The following seems to work fine:
brew install lua
pip install lupa
It detects lua 5.2.3, builds fine and examples from readme work.
With
brew install luajit
pip install lupa
it correctly detects luajit 2.0.3 and builds without errors, but lupa doesn't work:
>>> import lupa
>>> lupa.LuaRuntime()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "lupa/_lupa.pyx", line 147, in lupa._lupa.LuaRuntime.__cinit__ (lupa/_lupa.c:2906)
lupa._lupa.LuaError: Failed to initialise Lua runtime
>>>
From the install instructions it is unclear if it should ever work, but since non-jit lua seems to work maybe there is a way to make lupa work with homebrew-installed luajit too?
Might be the usual 64bit MacOS-X problem with LuaJIT described here: https://github.com/scoder/lupa/blob/master/INSTALL.rst
Interesting.. A workaround suggested in the the linked blogpost is to build a custom Python with the following flags:
-pagezero_size 10000 -image_base 100000000
I'll stick to non-jit lua for now. Thanks!
Having the same issue OS X 10.10.2
Fast workaround when error happened: (for those who came here from google and want to try lupa)
brew uninstall luajit
pip uninstall lupa
pip install lupa
brew install luajit
In result we have lua, luajit and lupa=(python+lua)
Currently lupa doesn't work with luajit on OSX at all.
@scoder Could you please change installation for OS X users in order to don't even try luajit without special flags? Its better to work on "simple" lua then having fun with manual setup.
I take pull requests.
Using luajit version greater than 2.1.0-beta3 with GC64 option enabled solve the issue.
Currently, brew install luajit --devel --with-gc64
installs 2.1.0-beta3.
updating @hodduc command line for installing luajit:
brew install luajit --HEAD