lua-users home
lua-l archive

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


> Currection: The package is not compatible with Lua 5.1; it uses a small 
> script to support packages with a direct call to global 'loadlib'. Hiding 
> this script actually fixes the problem.

My packages were originally written for Lua 5.0, hence the small script
that used loadlib. For Lua 5.1, just ignore this script and save the .so
as random.so, not as lrandom.so, so that you can call require"random".
(See below.)

The same applies my other packages. See
	http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/

Those marked as 5.x have been verified to work with Lua 5.1, but you'll
probably need to remove the loadlib script and rename the .so. Here are
the diffs for the Makefile for lrandom. In particular, note the use of
	env LUA_PATH= $(LUABIN)/lua -l$(MYNAME) $(TEST)
to ignore the loadlib script if you don't want to remove it.

4,7c4,7
< LUA= /tmp/lhf/lua-5.0
< LUAINC= $(LUA)/include
< LUALIB= $(LUA)/lib
< LUABIN= $(LUA)/bin
---
> LUA= /tmp/lhf/lua-5.1.1
> LUAINC= $(LUA)/src
> LUALIB= $(LUA)/src
> LUABIN= $(LUA)/src
16c16
< T= $(MYLIB).so
---
> T= $(MYNAME).so
23c23
< 	$(LUABIN)/lua -l$(MYNAME) $(TEST)
---
> 	env LUA_PATH= $(LUABIN)/lua -l$(MYNAME) $(TEST)