Fix luajit rolling release build in msys shell#54
Open
tobil4sk wants to merge 1 commit intoluarocks:masterfrom
Open
Fix luajit rolling release build in msys shell#54tobil4sk wants to merge 1 commit intoluarocks:masterfrom
tobil4sk wants to merge 1 commit intoluarocks:masterfrom
Conversation
The SHELL=cmd argument is needed when running hererocks from cmd or powershell, because in that case luajit will use dos commands. However, if MSYSTEM or TERM are defined (e.g. in a msys shell) then luajit will build using bash commands and the build will fail with the error below. To fix this, this patch respects the same variables that luajit uses to decide whether to use dos or unix commands. SHELL=cmd is no longer set in a unix environment, but still is in a dos environment. See luajit src/Makefile: https://github.com/LuaJIT/LuaJIT/blob/26fd1a7d6770b2237240a071e6f01132877a2425/src/Makefile#L157 Current build error: ``` Building LuaJIT @26fd1a7 (target: mingw) "==== Building LuaJIT 2.1 ====" mingw32-make -C src mingw32-make[1]: Entering directory 'C:/Users/RUNNER~1/AppData/Local/Temp/tmpadzy1my3/LuaJIT/src' "HOSTCC host/minilua.o" "HOSTLINK host/minilua.exe" "VERSION luajit.h" Error: host/genversion.lua:14: run from the wrong directory mingw32-make[1]: *** [Makefile:673: luajit.h] Error 1 mingw32-make[1]: Leaving directory 'C:/Users/RUNNER~1/AppData/Local/Temp/tmpadzy1my3/LuaJIT/src' mingw32-make: *** [Makefile:127: default] Error 2 Error: got exitcode 2 from command mingw32-make SHELL=cmd ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SHELL=cmd argument is needed when running hererocks from cmd or powershell, because in that case luajit will use dos commands.
However, if MSYSTEM or TERM are defined (e.g. in a msys shell) then luajit will build using bash commands and the build will fail with the error below.
To fix this, this patch respects the same variables that luajit uses to decide whether to use dos or unix commands. SHELL=cmd is no longer set in a unix environment, but still is in a dos environment.
See luajit src/Makefile:
https://github.com/LuaJIT/LuaJIT/blob/26fd1a7d6770b2237240a071e6f01132877a2425/src/Makefile#L157
Current build error:
Closes #53.
Related to #26.
cc: @un-def