Building love-ios for Simulator on Apple Silicon Macs

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
ruairidx
Prole
Posts: 4
Joined: Sun Nov 28, 2021 6:49 am
Contact:

Building love-ios for Simulator on Apple Silicon Macs

Post by ruairidx »

Everything described happens on an Apple Silicon Macbook with or without a game.love.

When attempting to build `love-ios` in Xcode, the build will fail with the following error:

Code: Select all

ld: warning: ignoring file /Users/ruairi/Library/Developer/Xcode/DerivedData/love-dobjgrinkafvppfbsagcjwhfjkzn/Build/Products/Debug-iphonesimulator/liblove.a, building for iOS Simulator-x86_64 but attempting to link with file built for iOS Simulator-arm64
ld: entry point (_main) undefined. for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My first attempted fix was just to run Xcode in Rosetta. With Rosetta, the build would not hit the same error and would start the simulator; however the app crashes here with the following error:

Code: Select all

Thread 1: EXC_BAD_ACCESS (code=1, address=0x8)
(I noticed in Activity Monitor that Simulator is not running in Rosetta, even when Xcode is. Not sure if this is important, but I imagine it's correct since iOS apps target arm anyway).

This is on the latest version of main, both for love and love-apple-dependencies. I haven't done much work with Xcode previously (as a result, sorry in advance if any of my descriptions were incomplete or unhelpful), so I'm not sure how to investigate this issue further. Any tips or advice greatly appreciated. Thanks!

Ruairi

EDIT 2021-11-29: I was actually able to reproduce the second issue on an Intel mac; same crash, same line. Does the Simulator just not work at all with Love?

EDIT 2021-11-29 2: I borrowed someone's iPhone and tried building the game on the Apple Silicon mac with Rosetta onto the physical device instead of using the simulator. The game ran first time. I guess this just means Love can't run in the simulator, which is a shame (would at least be useful to verify the game boots, plays nicely with the screen notch etc., even if it's not practical for testing gameplay). Hopefully I'm wrong.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 16 guests