Closed ellraiser closed 3 months ago
This is going to be very helpful for us, thanks
Thanks for the instructions! I mostly maintain this repo, but currently don't have a Mac to test this stuff out, or test it in Travis (which is kind of tricky...), and I have 0 knowledge of this universal binary stuff. Feel free to submit a PR either for the build or for the instructions in the documentation, I'll test to the best of my abilites.
I just had to go through this process as well by recompiling luajit as a universal and then updating the third-party folder in this repo. I can provide a PR if its desired.
If you wish, go for it! The trickiest part would be to get it working on Travis, as testing on Travis is tricky, but if you understand that, I can review the PR and help see if Travis is working out.
I just submitted two PRs. This one needs to be merged into the submodule and the submodule pointer updated
https://github.com/uspgamedev/luasteam-third-party/pull/1
And this one updates the makefile
Heya!
Currently making a game with LÖVE on an Apple Silicon machine, so when trying to require() the
luasteam.so
in the 3.X releases I get the following:Building locally with
make osx
errored with the following:Which makes sense as I just downloaded the
libluajit-5.1.a
from the repo here not realising that wasx86_64
too - if I instead use thelibluajit-5.1.a
that I get from installing locally withbrew
I can build a newluasteam.so
forarm64
using the same unmodifiedmake osx
Looking on the apple docs for silicon they mention that you can create two binaries, a standard + silicon one, and then combine them together to make a 'universal' binary to work for all mac architectures: https://developer.apple.com/documentation/apple-silicon/building-a-universal-macos-binary
I needed the two different
libluajit-5.1.a
files but I was able to build a universal library by modifying the cmake file to be:Didn't want to raise a PR as I don't know much about Travis (not sure if
-target arm64-apple-macos
would require a silicon device to work?), I dunno how theinclude/
works for being able to add the 2 diff. luajit versions and also (most importantly) because I can't test the resulting universal.so
on ax86_64
mac device yet - so I just wanted to raise it here in case it's useful for other silicon devs or if it's planned to be added in future eventually (even if it's just to the building docs)