Add a builder for LuaJIT
I don't actually need this for anything, this was just for "fun."
Why is this how I'm choosing to spend my time
It looks to me like LuaJIT does bootstrapping. womp womp.
LuaJIT does all sorts of heinous things, including but not limited to intercepting CC, using the host compiler to build a separate installation of Lua, telling you you can use an external Lua then not recognize it, etc.
On macOS:
[ Info: Beginning audit of /workspace/L/LuaJIT/build/x86_64-apple-darwin14/Z8nCtJKW/destdir
[ Info: Checking bin/luajit-2.0.5 with RPath list String[]
[ Info: Ignored system libraries /usr/lib/libSystem.B.dylib
[ Info: Checking lib/libluajit-5.1.2.0.5.dylib with RPath list String[]
[ Info: Ignored system libraries /usr/lib/libSystem.B.dylib
[ Info: Modifying dylib id from "/workspace/destdir/lib/libluajit-5.1.2.dylib" to "@rpath/libluajit-5.1.2.dylib"
[ Info: lib/libluajit-5.1.2.0.5.dylib already has SONAME "@rpath/libluajit-5.1.2.dylib"
[ Info: lib/libluajit-5.1.2.0.5.dylib already has SONAME "@rpath/libluajit-5.1.2.dylib"
[ Info: Checking license file
[ Info: Found license file(s): COPYRIGHT
[ Info: /workspace/L/LuaJIT/build/x86_64-apple-darwin14/Z8nCtJKW/destdir/bin/luajit matches our search criteria of ["luajit"]
[ Info: Found a valid dl path libluajit-5.1.2.dylib while looking for libluajit-5.1, lua51
[ Info: Found a valid dl path libluajit-5.1.dylib while looking for libluajit-5.1, lua51
[ Info: Could not locate libluajit-5.1, lua51 inside ["/workspace/L/LuaJIT/build/x86_64-apple-darwin14/Z8nCtJKW/destdir/lib64", "/workspace/L/LuaJIT/build/x86_64-apple-darwin14/Z8nCtJKW/destdir/lib"]
┌ Error: Built LuaJIT but libluajit still unsatisfied:
└ @ BinaryBuilder ~/.julia/packages/BinaryBuilder/0Fsun/src/AutoBuild.jl:692
ERROR: LoadError: Cannot continue with unsatisfied build products!
All ARM and i686 builds:
[03:49:08] BUILDVM lj_vm.s
[03:49:08] Error: pointer size mismatch in cross-build.
[03:49:08] Try: make HOST_CC="gcc -m32" CROSS=...
[03:49:08]
[03:49:08] BUILDVM lj_ffdef.h
[03:49:08] make[2]: *** [Makefile:619: lj_vm.s] Error 1
[03:49:08] make[2]: *** Waiting for unfinished jobs....
[03:49:08] BUILDVM lj_bcdef.h
[03:49:08] Error: pointer size mismatch in cross-build.
[03:49:08] Try: make HOST_CC="gcc -m32" CROSS=...
[03:49:08]
[03:49:08] BUILDVM lj_folddef.h
[03:49:08] Error: pointer size mismatch in cross-build.
[03:49:08] Try: make HOST_CC="gcc -m32" CROSS=...
Windows x86-64:
[03:49:10] ASM lj_vm.o
[03:49:10] lj_vm.s: Assembler messages:
[03:49:10] lj_vm.s:6: Error: unknown pseudo-op: `.hidden'
[03:49:10] lj_vm.s:7: Warning: .type pseudo-op used outside of .def/.endef ignored.
[03:49:10] lj_vm.s:7: Error: junk at end of line, first unrecognized character is `l'
[03:49:10] lj_vm.s:8: Warning: .size pseudo-op used outside of .def/.endef ignored.
[03:49:10] lj_vm.s:8: Error: junk at end of line, first unrecognized character is `l'
[03:49:10] lj_vm.s:13: Error: unknown pseudo-op: `.hidden'
[03:49:10] lj_vm.s:14: Warning: .type pseudo-op used outside of .def/.endef ignored.
[03:49:10] lj_vm.s:14: Error: junk at end of line, first unrecognized character is `l'
[03:49:10] lj_vm.s:15: Warning: .size pseudo-op used outside of .def/.endef ignored.
[03:49:10] lj_vm.s:15: Error: junk at end of line, first unrecognized character is `l'
[03:49:10] lj_vm.s:24: Error: unknown pseudo-op: `.hidden'
[03:49:10] lj_vm.s:25: Warning: .type pseudo-op used outside of .def/.endef ignored.
[03:49:10] lj_vm.s:25: Error: junk at end of line, first unrecognized character is `l'
[03:49:10] lj_vm.s:26: Warning: .size pseudo-op used outside of .def/.endef ignored.
[03:49:10] lj_vm.s:26: Error: junk at end of line, first unrecognized character is `l'
For macOS, locally I'd put false as last line of the script in order to see what's the problem. As far as I can see, the library is there, but maybe it can't be dlopen'ed? Running otool -L could give some hint.
Any update on this? We can try with the 2.1.0beta3 version or the https://github.com/openresty/luajit2 openresty branch as well
Any update on this?
Nope, I've not looked into this any more. I was doing it for fun but it turned out not to be all that fun after all. :grimacing:
We can try with the 2.1.0beta3 version or the https://github.com/openresty/luajit2 openresty branch as well
Using the proper upstream beta version could work but I'd rather not use OpenResty's fork and call it LuaJIT; if we go that route, I think we should make a separate builder to make it clear that it's OpenResty's fork specifically, since there are a number of other folks who've forked and maintained or semi-maintained LuaJIT.
(Though I'd be amazed if the upstream beta actually fixed the insanity of the build system)
ERROR: LoadError: GitError(Code:ERROR, Class:HTTP, invalid content-type: 'application/octet-stream')
wut
Why is this how I'm choosing to spend my time
Why, three years later, am I back at this again
Host minilua is being compiled for the target, instead of the host