lua-users home
lua-l archive

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


Hi list,

I am trying to install luarocks on my Windows 10 system. luarocks installed just fine,
but I encounter some config problems. I use mingw toolchain. when I try to build the
luafilesystem rock, I got the error

>
> C:\Users\nerditation>luarocks install luafilesystem
> Installing https://luarocks.org/luafilesystem-1.6.3-1.src.rock...
> Using https://luarocks.org/luafilesystem-1.6.3-1.src.rock... switching to 'build' mode
> mingw32-gcc -O2 -c -o src/lfs.o -Id:/Applications/lua/luadist/include/ src/lfs.c
> 'mingw32-gcc' is not recognized as an internal or external command,
> operable program or batch file
>
> Error: Build error: Failed compiling object src/lfs.o
>

since I use the Twilight Dragon Media MinGW_w64 distribution, a.k.a. tdm-gcc, there is
no 'mingw32-gcc.exe' but 'x86_64-w64-mingw32-gcc.exe' instead, and of course the 'gcc.exe'.

I edited the 'config-5.2.lua' file of luarocks to add the following variables:

> --[[...]]
> variables = {
>     MSVCRT = 'm',   -- make MinGW use MSVCRT.DLL as runtime
>     LUALIB = 'liblua.dll.a'
>     CC = 'gcc',
>     LD = 'gcc',
> }
>--[[...]]

but luarocks won't see it and still tried to call mingw32-gcc, and link against lua5.2.lib.

I can work around it by modify luarocks/cfg.lua and change the default value of those variables,
but I wonder whether it is a bug of luarocks, or I am missing something?

b.t.w. the version is luarocks 2.2.3


thanks.

--
the nerdy Peng / 书呆彭 / Sent from Thunderbird