lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


LPeg 12.1 buils under Lua 5.3.0-alpha but does not run.

$ lua -l lpeg
lua: error loading module 'lpeg' from file '/usr/local/lib/lua/5.3/lpeg.so':
    /usr/local/lib/lua/5.3/lpeg.so: undefined symbol: lua_equal
stack traceback:
    [C]: in ?
    [C]: in function 'require'
    [C]: in ?

Just before that run, I did a successful 'make install' of Lua 5.3.0 and
a successful 'luarocks install lpeg'.

$ luarocks show lpeg

LPeg 0.12-1 - Parsing Expression Grammars For Lua

LPeg is a new pattern-matching library for Lua, based on Parsing Expression
Grammars (PEGs). The nice thing about PEGs is that it has a formal basis
(instead of being an ad-hoc set of features), allows an efficient and simple
implementation, and does most things we expect from a pattern-matching library
(and more, as we can define entire grammars).

License:     MIT/X11
Homepage:     http://www.inf.puc-rio.br/~roberto/lpeg.html
Installed in:     /usr/local

Modules:
    lpeg (/usr/local/lib/lua/5.3/lpeg.so)
    re (/usr/local/share/lua/5.3/re.lua)

I've had similar problems before [1] but this time have not yet
succeed in sorting
them out.

In my opinion the current LuaRocks setup is seriously broken when there
is any ambiguity whatsoever as far as the Lua version is concerned. The
main reason why I say so is that it ferrets about in $HOME/bin, discovers
that I have a ~/lua53 and prefers that over what `/usr/bin/env lua` would
call. Where does LuaRocks think it is going to find the correct include files
and libraries for that?

Moreover, the <version> parameter on `luarocks install` is not documented
beyond a bare mention by `luarocks help install`. It does not what I have
so far managed to guess.