m-ab-s / media-autobuild_suite

This Windows Batchscript helps setup a Mingw-w64 compiler environment for building ffmpeg and other media tools under Windows.
GNU General Public License v3.0
1.5k stars 257 forks source link

Fix for upstream luajit changes #2518

Closed waldonnis closed 9 months ago

waldonnis commented 9 months ago

Below is a patch to allow luajit to install its binary without error. They moved to a rolling release method, such that the Makefile's install target installs a version-named binary (e.g. luajit-0.1.2) then adds an unversioned symlink pointing to it, allowing people to keep multiple versions in parallel. This is useless for the scope of the suite, and also happens to cause problems. The suite currently overrides INSTALL_TNAME to set it to luajit.exe, but the Makefile uses that as the symlink name, so it tries linking luajit.exe to luajit.exe, leading to an error. To avoid these versioned binaries building up over time in bin-global, I'm just reverting those specific changes in the luajit Makefile (and to the uninstall target as well) so that it works the way the suite expects it to: install the binary as INSTALL_TNAME.

I brought this up in a PR, but figured I'd post it here in case someone wants to use it until I figure out how to get this in officially. Note: this should never be submitted upstream, since it's undoing an intentional change by them. Given the scope of the suite, I doubted having parallel versions of luajit was really useful for any of us, making it easier to just revert that behaviour rather than clean up after it.

diff --git a/Makefile b/Makefile
index 3aed365d..66b0baf8 100644
--- a/Makefile
+++ b/Makefile
@@ -142,12 +142,11 @@ install: $(INSTALL_DEP)
          $(RM) $(FILE_PC).tmp
        cd src && $(INSTALL_F) $(FILES_INC) $(INSTALL_INC)
        cd src/jit && $(INSTALL_F) $(FILES_JITLIB) $(INSTALL_JITLIB)
-       $(SYMLINK) $(INSTALL_TNAME) $(INSTALL_TSYM)
        @echo "==== Successfully installed LuaJIT $(VERSION) to $(PREFIX) ===="

 uninstall:
        @echo "==== Uninstalling LuaJIT $(VERSION) from $(PREFIX) ===="
-       $(UNINSTALL) $(INSTALL_TSYM) $(INSTALL_T) $(INSTALL_STATIC) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) $(INSTALL_MAN)/$(FILE_MAN) $(INSTALL_PC)
+       $(UNINSTALL) $(INSTALL_T) $(INSTALL_STATIC) $(INSTALL_DYN) $(INSTALL_SHORT1) $(INSTALL_SHORT2) $(INSTALL_MAN)/$(FILE_MAN) $(INSTALL_PC)
        for file in $(FILES_JITLIB); do \
          $(UNINSTALL) $(INSTALL_JITLIB)/$$file; \
          done

Update: Submitted a pair of PRs for this (#2520 here and 5 in mabs-patches), so this will probably be closed once they're merged.