lua-users home
lua-l archive

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


I've recently tried LuaRocks in my customized Lua-environment (Win32,
MinGW) and discovered that it almost unusable (by "unusable" I mean
that I had to patch here and there to make it work. Maybe my build
environment is just insane, so it is not LuaRocks' fault, but
mine...). There were several reasons:

I have lua51.dll (this name is used in _official_ Lua Makefile), but
all binary rocks depend on lua5.1.dll. So, I had to patch LuaRocks so
it will prefer source rocks to prebuilt ones;
Unfortunately, it is common for the source rocks to have a

win32 { build_pass = true }

in their rockspecs, so I had to unpack rock and manually change rockspec...

But then I discovered that rocks use Makefiles, instead of some
os-agnostic lua-based build engine! Even more, Windows makefiles use
MSVS as if it is the only compiler under Windows.

There also were several obscure bugs (probably related to MinGW's
back-slash intolerance), e.g. generated orbit.bat contained the
following path:

"D:/Tools/Lang/Lua/lua-5.1.2/bin//D:\Tools\Lang\Lua\lua-5.1.2\bin\\lua.exe"

LuaRocks also does not expect to find MinGW tools (e.g. mkdir) in PATH
instead of it's own tools. I had to insert some kludges into fs.win32
to convert '\' to '/'.

--
e.v.e



On Sun, Jan 25, 2009 at 6:38 AM, Ben Aurel <ben.aurel@gmail.com> wrote:
> hi
>
> I cannot run luarocks on windows xp with mingw/msys environment and in
> a rvxt terminal
>
> Setup
> ====
> - windows xp, (version 5.1, sp3)
> - minGW 5.1.3
> - gcc version 3.4.5 (mingw-vista special r3)
> - Lua 5.1.4
> - luarocks1.0
>
> Build
> ====
>  $ ./configure && make && make install
> [no errors - this runs OK]
>
> Resultiing files
> ============
> The executables:
>   /local/bin/luarocks
>   /local/bin/luarocks-admin
>
> The luarocks scripts:
>   /local/share/lua/5.1/luarocks/
>
> Error:
> ====
> When I want to run "luarocks" I get the following error. It says that
> it cant find the luarocks scripts. Since the files are there, it might
> be someting wrong with the path mapping.
>
> This looks strange:
>       no file '/usr/local/share/lua/5.1//luarocks\command_line.lua'
>       no file '/usr/local/share/lua/5.1//luarocks\command_line/init.lua'
>
> ----- error log ------
> C:\msys\1.0\local\bin\lua: C:/msys/1.0/local/bin/luarocks:4: module
> 'luarocks.command_line' not found:
>       no field package.preload['luarocks.command_line']
>       no file '/usr/local/share/lua/5.1//luarocks\command_line.lua'
>       no file '/usr/local/share/lua/5.1//luarocks\command_line/init.lua'
>       no file '.\luarocks\command_line.lua'
>       no file 'C:\msys\1.0\local\bin\lua\luarocks\command_line.lua'
>       no file 'C:\msys\1.0\local\bin\lua\luarocks\command_line\init.lua'
>       no file 'C:\msys\1.0\local\bin\luarocks\command_line.lua'
>       no file 'C:\msys\1.0\local\bin\luarocks\command_line\init.lua'
>       no file '.\luarocks\command_line.dll'
>       no file 'C:\msys\1.0\local\bin\luarocks\command_line.dll'
>       no file 'C:\msys\1.0\local\bin\loadall.dll'
>       no file '.\luarocks.dll'
>       no file 'C:\msys\1.0\local\bin\luarocks.dll'
>       no file 'C:\msys\1.0\local\bin\loadall.dll'
> stack traceback:
>       [C]: in function 'require'
>       C:/msys/1.0/local/bin/luarocks:4: in main chunk
>       [C]: ?
> -----
> It would be good if the first two lines in the list worked because
> minGW and msys doesn't like windows pathes.
>
> Hmm, any ideas?
>
> thanks in advance
> ben
>