-
Notifications
You must be signed in to change notification settings - Fork 13
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
Building on macOS? #65
Comments
Solved!
|
Next
|
Thanks for attempting this - macOS isn't really my area. Hitherto I've always installed all the external libs with brew and it's worked OK, but I've never attempted Apple Silicon or a universal binary. I'm led to believe brew installs are not universal. |
I checked and freetype is universal, so... did some more digging. Found an old file at And I've built it successfully!
🥳 |
Fantastic! 😁 |
So, now I've built I figure I can save time by just asking 👍 |
Have you seen macOS.md in the samples/golf folder? That has a run-down of building a bundle with cmake |
No, I had not 🔰 On it... |
It basically contains the full extent of my knowledge of building on macOS - I actually started writing it to remind myself how to do the existing builds each release... 😅 |
So close!
|
Just to make sure, I'm doing:
and
|
I've never used
personally, I let cmake find the compiler itself. These lines were added by someone else working on a mac build.
Sounds like it's building the arm version, but not the x86_64 version so it fails when linking. I've never tried this before, so there may be a missing step when telling xcode/clang to build. If you omit the architecture define from cmake it'll probably compile but you'll have an arm-only version (or it might fail trying to link to universal libraries 😅) |
Yeah, the feeling I get is that I have just built Apple silicon only version using I've run out of time but I'll circle back soon to try again for a Universal build. Also, it's possible to build these in the cloud (maybe even through GitHub actions) which may be something to look into once we have this all nailed down. |
Just added a quick change to macOS build doc, as #66 |
For build script/instructions see #68 (comment) |
Building 1.12.1 fails with the following error regarding MenuAvatars.cpp Is this the llvm/clang issue you were referring to on Twitter?
other possible errors from subsequent attempts
|
My error was the lack of std::filesystem support - the actual error appears just before the In hindsight this line in the CMake file is probably not helping (at least on newer versions of macOS). Increasing the value or outright omitting it may help with missing features. |
Sadly still the same "BUILD FAILED" error. |
LOL, sorry.
|
Aha! Well that does explain what's going on - and is in fact the same lack of std::filesystem I suffer. Or rather, it has been suppressed because it wasn't introduced until 10.15, and we're apparently still trying to target below that. This makes sense for me, because I'm still on 10.14 - however I'm not sure what's going on your end. If you modified the CMake file to target a higher version, it ought to work... My best suggestion is: |
Well. This is progress I guess? :) Looks like a shader failed to compile - are there any errors in the console window? |
Hm, well that's a different (mac specific, but thankfully trivial) error, and shouldn't be causing this. You can try a debug build to increase verbosity, but the game itself will probably run like toffee :) Although I do have a bit of a sinking feeling... could you try changing this line from
to
(the second |
It's some groundwork I was doing for a future update involving weather - so not currently strictly necessary. To fix the latter you'll need to do the same thing on this line. (ie set it to false). No idea how I'll debug this without a mac :( |
Changing that second line got things going in-game. The only things I can suggest are macOS in a VM (if your Mac is capable of running newer but you're holding back, just install newer in a VM) or cloud renting a Mac for short periods (monthly?) or pick up a cheap old Mac (even 10 year old old laptops can run Catalina). Of course this is easy for me to suggest :) |
Hm. I've tried VMs on windows and they were slow as feh. It never occurred to me I could run a VM on the mac :) I don't really like to mess with mine because actually it's just there to run the software for my DJ equipment. Building software on it was a kind of experiment which has since spiralled out of scope 🤦♀️ And there's no such thing as a cheap mac :P |
OK the build is working now on Sonoma (? whatever the latest is) with mac hardware. Except when built as a bundle it won't run with some codesigning error. Maybe you'll have some luck - use the 1.14.1 tag 👍 |
I can only see 1.14 tag and it doesn't build edit: ah i was looking at branches, will look into tags
|
The text was updated successfully, but these errors were encountered: