lua-users home
lua-l archive

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


I'm tring to use luarocks with lua-5.2.2 that is compiled myself on Windows. but it runs errors for 'module()' function, that is not available in my lua5.2 install, Is luarocks lua5.2 compatible without LUA_COMPAT_ALL flags? how to make it works for my configure?

otherwise, If I called luarocks with it's default configure, how could I install lua5.2 modules into my lua install?

I install my lua at D:/Lua52, there are several files/directories:
D:/Lua52/lua.exe
D:/Lua52/luac.exe
D:/Lua52/lua52.dll
D:/Lua52/include/*.h
D:/Lua52/lib/*.a
D:/Lua52/lua/*.lua
D:/Lua52/clibs/*.dll

So, I want luarocks install *.lua into D:/Lua52/lua, and install *.dll into D:/Lua52/clibs, just like Lua For Window does. but I can only specific TREE in install.bat. is that anyway to do that?



2013/11/1 Hisham <h@hisham.hm>
On 30 October 2013 03:58, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> 2013/10/30 Hisham <h@hisham.hm>:
>
>> Those of you who installed LuaRocks 2.1.0 using "make bootstrap" on
>> Unix may upgrade by simply running:
>>
>> luarocks install luarocks
>>
>> !!Note!! To ensure a clean environment when upgrading, the first
>> installation of LuaRocks should be done using the configure script
>> followed by "make bootstrap". Only use "luarocks install luarocks" if
>> your previous installation was done using "make bootstrap". Future
>> upgrades of LuaRocks will be able to check this automatically.
>
> Since my previous install was 2.0.13, I thought I'd check this feature
> by installing 2.1.0 first.  This is what happened on Ubuntu 12.04,
> with Lua 5.2.2 separately built and installed in /usr/local.
>
> -----------------------------------------------------------------------------------------------------
>
> …/luarocks-2.1.0$ ./configure
> Lua interpreter found: /usr/local/bin/lua...
> Lua version detected: 5.2
> Looking for Lua... lua found in $PATH: /usr/local/bin
> Checking Lua includes... lua.h found in /usr/local/include/lua.h
> wget found at /usr/bin
> md5sum found at /usr/bin
> Configuring for system... Linux
> Configuring for architecture... i686
> Existing installation detected.
> Using previously configured rocks dir: /usr/local
> Writing configuration...
>
> Installation prefix: /usr/local
> LuaRocks configuration directory: /usr/local/etc/luarocks
> Using Lua from: /usr/local
>
> Done configuring.
> - Type 'make build' and 'make install':
>   to install to /usr/local as usual.
> - Type 'make bootstrap':
>   to install LuaRocks in /usr/local as a rock.
>
> …/luarocks-2.1.0$ sudo make bootstrap
> < ... about two screensful of things that worked ... >
> LUA_PATH="$PWD/src/?.lua;$LUA_PATH" src/bin/luarocks make rockspec
> --tree="/usr/local"
> /usr/local/bin/lua: /usr/local/share/lua/5.2/luarocks/help.lua:12:
> attempt to concatenate global 'program_name' (a nil value)
> stack traceback:
>     /usr/local/share/lua/5.2/luarocks/help.lua:12: in main chunk
>     [C]: in function 'require'
>     src/bin/luarocks:9: in main chunk
>     [C]: in ?
> make: *** [bootstrap] Error 1
> $ ls -l /usr/local/share/lua/5.2/luarocks/help.lua ./src/luarocks/help.lua
> -rw-r--r-- 1 dirk dirk 4022 Aug  9 23:32 ./src/luarocks/help.lua
> -rw-r--r-- 1 root root 3760 Apr 17  2013
> /usr/local/share/lua/5.2/luarocks/help.lua
>
> ---------------------------------------------------------------------------------------------
>
> It does not appear to be the right thing to use whatever `help.lua` already
> lies in the installation target in preference to the one supplied with 2.1.0.

I will look into this. Thanks for the report!

-- Hisham




--
regards,
Xavier Wang.