-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linker Errors When Compiling LuaSystem on windows #15
Comments
here's a similar error; lunarmodules/luasocket#336 I just tested using the TDM releases for 32 and 64 bit, and they worked fine for me. GCC version 10.3.0 (so that's old...) |
also how did you compile Lua itself? Ensure to use the same toolchain for building Lua, installing LuaRocks, and executing LuaRocks. |
ping @Arethusag |
Thanks @Tieske, I looked at #336, it does seem to be similar. Trying MSVC would be my next step. I tried compiling luasystem again, this time on a new windows machine, and using the luarocks all-in-one package, and got the same error compiling with mingw
My need to use luasystem is no longer, so I will not be testing this issue further. |
I'm getting the same error in the Windows job of the Teal CI: https://github.com/teal-language/tl/actions/runs/7375549890/job/20206856159?pr=730
This CI was working back in November with luasystem 0.2.1: https://github.com/teal-language/tl/actions/runs/6921415243/job/18826976992 |
I tried applying changes in a similar way to fixing LuaSocket, lunarmodules/luasocket#321 (comment), and it seems to have worked, at least with MinGW. diff --git a/luasystem-scm-0.rockspec b/luasystem-scm-0.rockspec
index 86209a6..ff5af61 100644
--- a/luasystem-scm-0.rockspec
+++ b/luasystem-scm-0.rockspec
@@ -42,6 +42,13 @@ local function make_platform(plat)
win32 = { "advapi32", "winmm" },
mingw32 = { },
}
+ local libdirs = {
+ linux = nil,
+ unix = nil,
+ macosx = nil,
+ win32 = nil,
+ mingw32 = { },
+ }
return {
modules = {
['system.core'] = {
@@ -55,6 +62,7 @@ local function make_platform(plat)
},
defines = defines[plat],
libraries = libraries[plat],
+ libdirs = libdirs[plat],
},
},
} I'll make a PR modifying the scm rockspec ahead of time. |
@hishamhm I created a PR, alike your setup with Teal, to add the Windows platform to github actions, see #17. But the build fails with a Luarocks error: https://github.com/lunarmodules/luasystem/actions/runs/7716992556/job/21035164192?pr=17 tried older versions as well, but same thing everywhere. If we can verify the failure here, we can also test @goldenstein64 s fix for it. Any hints to what might cause this? |
PR was merged. I created a new rockspec, and CI pushed it to LuaRocks; https://luarocks.org/modules/lunarmodules/luasystem So new rockspec 0.3.0-2 is up. |
Description
I am trying to install luasystem via luarocks on Windows, and the build is failing with the following error:
Error: Build error: Failed compiling module system/core.dll
Environment
Windows 10
Lua 5.1
LuaRocks 3.9.2 (64-bit)
GCC 13.2 from MSYS/MinGW-64 toolchain
shell: pwsh
Steps to reproduce
Run the following command in the above environment:
luarocks --lua-version=5.1 install luasystem
Full error message
Installing https://luarocks.org/luasystem-0.3.0-1.src.rock
Attempts to resolve:
Request for help
My first thought is that this is an issue in my windows environment, but I am not sure about how to proceed. Any advice on how to get this compiled via luarocks on windows?
The text was updated successfully, but these errors were encountered: