rjpcomputing / luaforwindows

Lua for Windows is a 'batteries included environment' for the Lua scripting language on Windows. NOTICE: Looking for maintainer.
2.88k stars 482 forks source link

luarocks install lfs #80

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.luarocks install lfs
2.or luarocks --local install lfs

What is the expected output? What do you see instead?
i see error lfs already exists. 

What version of the product are you using? On what operating system?
LuaForWindows_v5.1.4-46, ms windows xp sp3, i386.

Please provide any additional information below.
luarock can't update lfs because luarocks use lfs. I think that better way move 
luarocks in dependent dir with personal lua, lfs and etc. binaries. 

Original issue reported on code.google.com by ispsiber...@gmail.com on 2 Dec 2014 at 2:09

Rainrider commented 8 years ago

Is there any way to update luafilesystems?

Installing http://luarocks.org/repositories/rocks/luafilesystem-1.6.3-2.src.rock... cl /MD /O2 -c -Fosrc/lfs.obj -IC:/Programming/Lua/5.1/include src/lfs.c Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x86 Copyright (C) Microsoft Corporation. All rights reserved.

lfs.c link -dll -def:lfs.def -out:lfs.dll C:/Programming/Lua/5.1/lib/lua5.1.lib src/lfs.obj Microsoft (R) Incremental Linker Version 14.00.23506.0 Copyright (C) Microsoft Corporation. All rights reserved.

Creating library lfs.lib and object lfs.exp

Error: File already exists: C:\Programming\Lua\5.1\clibs/lfs.dll

rjpcomputing commented 8 years ago

I think it would be easiest to just remove C:\Programming\Lua\5.1\clibs/lfs.dll first before installing with LuaRocks.

Rainrider commented 8 years ago

I tried that already. One can't run luarocks without lfs.dll. This is what the original issue author meant by luarocks depending on luafilesystem I think

Rainrider commented 8 years ago

This is the error message when trying to install luafilesystem with clibs/lfs.dll removed

c:\Programming\Lua\5.1>luarocks install luafilesystem 'pwd' is not recognized as an internal or external command, operable program or batch file. C:\Programming\Lua\5.1\lua: ...\Programming\Lua\5.1\lua/luarocks\fs\win32\tools. lua:24: attempt to index local 'directory' (a nil value) stack traceback: ...\Programming\Lua\5.1\lua/luarocks\fs\win32\tools.lua:24: in function 'command_at' ...\Programming\Lua\5.1\lua/luarocks\fs\win32\tools.lua:125: in function <...\Programming\Lua\5.1\lua/luarocks\fs\win32\tools.lua:124> (tail call): ? ...\Programming\Lua\5.1\lua/luarocks\fs\win32\tools.lua:147: in function 'make_dir' C:\Programming\Lua\5.1\lua\luarocks\command_line.lua:30: in function 'is _writable' C:\Programming\Lua\5.1\lua\luarocks\command_line.lua:76: in function 'ru n_command' C:\Programming\Lua\5.1\luarocks.lua:20: in main chunk

rjpcomputing commented 8 years ago

This feels like a LuaRocks issue. I have no experiance with that on Windows. I would ask the LuaRocks mailing list. https://lists.sourceforge.net/lists/listinfo/luarocks-developers

Sorry.

rjpcomputing commented 8 years ago

Are you running this from a Visual C++ command prompt? Or a minGW command prompt? That might be needed.

Rainrider commented 8 years ago

Sorry for the late response. Visual C++ command prompt. It's the Enterprise 2015 edition if that matters.

rjpcomputing commented 8 years ago

OK so I worked up a solution to update LuaRocks to a MUCH newer version. I am going to add the file to the download section of GitHub Steps: 1) Install LuaForWindows 2) In a temp location, unzip http://keplerproject.github.io/luarocks/releases/luarocks-2.2.2-win32.zip 3) In same location, unzip the downloaded _lfwluarocks-2.2.2-win32.zip from GitHub project 4) In same location, open a command prompt

rjpcomputing commented 8 years ago

Here is the link to the file. https://github.com/rjpcomputing/luaforwindows/releases/download/luarocks-update/lfw_luarocks-2.2.2-win32.7z

Rainrider commented 8 years ago

I moved to using https://github.com/Tieske/luawinmulti for the time being. It's minimal and I have full control of what gets installed. It also supports Lua 5.2 and 5.3.

I do appreciate your effort and will keep an eye on your project. Thank you very much