lua-users home
lua-l archive

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


On Sat, Aug 20, 2011 at 11:09:20PM +0200, Luis Carvalho wrote:
> Hi Dirk,
> 
> Thanks for the report!
> 
> > Report on first installalation/testing attempt:
> > 
> >     $ luarocks make numlua-0.3-1.rockspec
> > 
> > So far so good: I can see numlua.so.  Now the installation.
> > 
> > 5.1  $ sudo mkdir /usr/local/lua/5.1/numlua
> >      $ sudo cp numlua.so *.lua /usr/local/lua/5.1/numlua
> 
> Are you copying the files according to your package.cpath and package.path?
> I'd probably try instead:
> 
> $ sudo cp numlua.so /usr/local/lib/lua/5.1
> $ sudo mkdir /usr/local/share/lua/5.1/numlua
> $ sudo cp *.lua /usr/local/share/lua/5.1/numlua
> 
That works.

> or, even better, just use the files as installed by luarocks and do nothing,
> but issue `lua5.1 -lluarocks.loader`. Can you please try that and see if it
> works?
>  
And so does that.

> > 5.2  $ sudo mkdir /usr/local/lua/5.2/numlua
> >      $ sudo cp numlua.so /usr/local/lua/5.2
> >      $ sudo cp *.lua /usr/local/lua/5.2/numlua
> 
> luarocks does not work with 5.2 out of the box, but you can fool it into
> building a 5.2 module by installing luarocks using
> 
> $ ./configure --with-lua-include=/usr/local/include --with-lua-lib=/usr/local/lib
> 
Not that simple.  luarocks, even luarocks 2.0.5, makes use of setfenv.

Dirk