Comments (7)
This is still happening on Windows 10 with Lua 5.2.
c:\Users\soapdog\prog\lua\luarocks-2.4.0-win32>luarocks install luafilesystem
Installing https://luarocks.org/luafilesystem-1.6.3-2.src.rock
cl /nologo /MD /O2 -c -Fosrc/lfs.obj -IC:/lua/include src/lfs.c
lfs.c
link -dll -def:lfs.def -out:lfs.dll C:/lua/lua52.dll src/lfs.obj
Microsoft (R) Incremental Linker Version 14.00.24215.1
Copyright (C) Microsoft Corporation. All rights reserved.
C:\lua\lua52.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x330
Error: Build error: Failed compiling module lfs.dll
from luafilesystem.
I have the same issue. Here is what I get when I want to install the rock:
Using luafilesystem-1.6.2-2.src.rock... switching to 'build' mode
cl /MD /O2 -c -Fosrc/lfs.obj -Ic:/lua/include/ src/lfs.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.
lfs.c
c:\users\hoensr\appdata\local\temp\luarocks_luafilesystem-1.6.2-2-9080\luafilesystem-1.6.2\src\lfs.c(413) : warning C4716: 'make_link' : must return a value
link -dll -def:lfs.def -out:lfs.dll c:/lua/lua51.dll src/lfs.obj
Microsoft (R) Incremental Linker Version 10.00.40219.01
Copyright (C) Microsoft Corporation. All rights reserved.
c:\lua\lua51.dll : fatal error LNK1107: invalid or corrupt file: cannot read at 0x270
I tried to link against Lua 5.1.5, lua51.dll is 11KB.
Luarocks is version 2.1.2.
Any ideas?
from luafilesystem.
This indicates that a file you passed into the linker is not a binary file. Check your linker command line and make sure the files being passed are recognised by the linker. You can find a list of recognised file types here.
Following that link, the list of recognized file types is:
.obj files
.netmodule files
.lib files
.exp files
.def files
.pdb files
.res files
.exe files
.txt files
.ilk files
The command-line above says:
link -dll -def:lfs.def -out:lfs.dll c:/lua/lua51.dll src/lfs.obj
So perhaps there should be a .lib file there instead of .dll? Check you LuaRocks configuration.
from luafilesystem.
Got the exact same issue, switching to lua5.1.lib in LuaRocks config fixed the problem.
It is worth noting that looks like for some reason LuaRocks install script searches for lua51.dll (without extra dot) and for lua5.1.lib (with extra dot). So if you want to make this process automated, you need to remember that if you wish to make the installation of LuaRocks fully automated.
from luafilesystem.
where can I find lua5.3.lib?
from luafilesystem.
@soapdog Do you have c:\lua\lua52.lib in your system?
Try editing your LuaRocks config file and change the value of LUALIB to point to the lua52.lib file.
LuaRocks will tell the location of your config file if you type luarocks
with no arguments.
from luafilesystem.
@hishamhm I don't have it. I have lua52.dll and liblua52.a. My lua prebuilt binaries came from luabinaries project. They are not shipping lua52.lib on their windows download. Should the lib point to a DLL on windows? Also, thanks for the quick reply, I moved this to #82 because this issue is closed here.
from luafilesystem.
Related Issues (20)
- Fatal Error - /usr/include/features.h:461:12: fatal error: sys/cdefs.h: No such file or directory HOT 2
- lfs.chdir Changes current working directory to volume without end slash wont work
- lfs.link (symlink, new[, symlink]) always create a symbolic link
- Why is luarocks saying : Error: unknown option '-e' when installing luacheck? HOT 4
- load on windows fails HOT 2
- Upload new dev-rockspec to LuaRocks.org HOT 4
- Update homepage link on this GitHub project HOT 1
- performance in windows of lfs.attributes inside lfs.dir loop
- lfs.link unsupported on windows even in developper mode HOT 1
- keep got warning message with openresty
- Function lfs.mkdir() is not idempotent and hence not thread safe
- error when retrieve symlinkatrributes at directory symlink HOT 1
- Copying/moving files HOT 5
- Documentation site 404 error? HOT 1
- Update homepage HOT 5
- error while installing HOT 3
- missing prototypes warnings when building on windows using msys2
- Error when installing on windows via luarocks HOT 3
- Does not compile in Windows in Unicode (WCHAR) mode
- pl.Path.isdir doesn't work properly if the path prefix start by "~" HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from luafilesystem.