Error while trying to build luafilesystem library and errors with luarocks folder permissions

67 Views Asked by At

I am trying to install the library LuaFileSystem for Lua but i keep getting errors whatever i try........

`> C:\Users\Game>luarocks install luafilesystem

Installing http://www.luarocks.org/repositories/rocks/luafilesystem-1.8.0-1.src.rock... Using http://www.luarocks.org/repositories/rocks/luafilesystem-1.8.0-1.src.rock... switching to 'build' mode mingw32-gcc -O2 -IC:/Lua/bin/../include -c src/lfs.c -o src/lfs.o '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

C:\Users\Game> `

On a different machine i have tried installing the mingw32-gcc compiler, but even if that part of the installation works, i get folder permission errors, i dont know how to config the installation or rockspec files to match my system... im a total noob to this stuff, some help would be greatly appreciated...

This is the error i get running the make command on the other system

> PS C:\Lua\01_libs\luafilesystem> luarocks make
> luafilesystem-scm-1.rockspec
> 
> mingw32-gcc -O2 -IC:/Lua/bin/../include -c src/lfs.c -o src/lfs.o
> mingw32-gcc -shared -o lfs.dll src/lfs.o C:/Lua/bin/../lib -lmsvcr80
> c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe:
> cannot find C:\Lua\bin\..\lib: Permission denied collect2.exe: error:
> ld returned 1 exit status Error: Build error: Failed installing
> lfs.dll in
> C:\Lua\bin/../share/luarocks/rocks/lib/luarocks/rocks/luafilesystem/scm-1/lib
> PS C:\Lua\01_libs\luafilesystem>

this is the error i get on the main system:

> C:\Users\Game>luarocks install luafilesystem Installing
> http://www.luarocks.org/repositories/rocks/luafilesystem-1.8.0-1.src.rock...
> Using
> http://www.luarocks.org/repositories/rocks/luafilesystem-1.8.0-1.src.rock...
> switching to 'build' mode mingw32-gcc -O2 -IC:/Lua/bin/../include -c
> src/lfs.c -o src/lfs.o src/lfs.c: In function 'push_link_target':
> src/lfs.c:1097:9: warning: implicit declaration of function
> 'memmove_s' [-Wimplicit-function-declaration]
>          memmove_s(target, tsize - 3, target + 4, tsize - 3);
>          ^~~~~~~~~ mingw32-gcc -shared -o lfs.dll src/lfs.o C:/Lua/bin/../lib -lmsvcr80
> d:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe:
> cannot find C:\Lua\bin\..\lib: Permission denied collect2.exe: error:
> ld returned 1 exit status
> 
> Error: Build error: Failed installing lfs.dll in
> C:\Lua\bin/../share/luarocks/rocks/lib/luarocks/rocks/luafilesystem/1.8.0-1/lib
> 
> C:\Users\Game>
0

There are 0 best solutions below