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
Add support for MSYS2 + Mingw-w64 #1231
Conversation
Currently, LuaRocks supports:
* (a) Lua interpreters built for MSYS2 (Lua interpreters depend on
msys-2.0.dll).
(the "msys" platform)
* (b) Lua interpreters built by MinGW (Lua interpreters don't depend
on msys-2.0.dll).
(the "mingw" platform)
This change adds support for (c) Lua interpreters built as native
Windows application by MSYS2 + Mingw-w64 (Lua interpreters don't
depend on msys-2.0.dll). (the "msys2_mingw_w64" platform)
Here are differences between (a), (b) and (c):
* (a) can't work without MSYS2 (msys-2.0.dll)
* (b) can work without MSYS2
* (c) can work without MSYS2 but is generally used with MSYS2
because MSYS2 provides packages of useful libraries such as libxml2.
This change assumes that users use (c) with MSYS2. But this change
still uses win32/tools provided by LuaRocks not MSYS2.
MSYS2 has LuaRocks package:
https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-lua-luarocks
It applies a patch to support (c). If this change is merged into
LuaRocks, MSYS2 doesn't need to have a patch for LuaRocks.
Codecov Report
@@ Coverage Diff @@
## master #1231 +/- ##
===========================================
- Coverage 85.49% 64.87% -20.63%
===========================================
Files 94 259 +165
Lines 11472 32258 +20786
===========================================
+ Hits 9808 20926 +11118
- Misses 1664 11332 +9668
Continue to review full report at Codecov.
|
|
@hishamhm Could you review this? |
|
Merged, thank you! Appreciated replacing the Adding this link here for future reference: |
|
Thanks! |
|
@kou Great! That would be excellent for preventing regressions! |
The importance thing is that the latter two are segregated and if you are compiling things on a 64-Bit system for both 64-bit AND 32-bit environments you need to maintain 2 separate sets of luarocks - MSYS2/Mingw-w64 now does that a bit better since I fixed a problem in that (see: msys2/MINGW-packages#5928 --> msys2/MINGW-packages#6580). As I mention in the issue in that first URL, whilst installing rocks "system-wide" (the default) this is handled automatically because the files are placed in the appropriate ( rocks_trees = {
- { name = [[user]], root = home..[[/.luarocks]] },
+ { name = [[user]], root = home..[[/.luarocks-x64]] },
{ name = [[system]], root = [[C:/msys64/mingw64]] }
}which works but other users will also need to do something like this should they install both + - MSYS2 dropped support for installation on a 32-Bit system earlier this year but one can still build applications for it - like the project I code for will do once we get the kinks out. |
|
You say about LuaRocks configuration files not LuaRocks' internal platform configuration, right? |
|
Well might it also be an issue on other OSes when the user is targetting both 32 and 64 -bit platforms. Fair enough it is only going to be an issue for those who are effectively cross-compiling one (probably the 32-bit one) and native compiling the other on the other (probably 64-bit one). In the case of only a single install of one of those bitnesses it would probably require considering a bit-specific |
|
Once again, you say about LuaRocks configuration files not LuaRocks' internal platform configuration, right? |
Currently, LuaRocks supports:
(a) Lua interpreters built for MSYS2 (Lua interpreters depend on
msys-2.0.dll).
(the "msys" platform)
(b) Lua interpreters built by MinGW (Lua interpreters don't depend
on msys-2.0.dll).
(the "mingw" platform)
This change adds support for (c) Lua interpreters built as native
Windows application by MSYS2 + Mingw-w64 (Lua interpreters don't
depend on msys-2.0.dll). (the "msys2_mingw_w64" platform)
Here are differences between (a), (b) and (c):
because MSYS2 provides packages of useful libraries such as libxml2.
This change assumes that users use (c) with MSYS2. But this change
still uses win32/tools provided by LuaRocks not MSYS2.
MSYS2 has LuaRocks package:
https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-lua-luarocks
It applies a patch to support (c). If this change is merged into
LuaRocks, MSYS2 doesn't need to have a patch for LuaRocks.