sm64ex-ios icon indicating copy to clipboard operation
sm64ex-ios copied to clipboard

Not building on M1 Macs

Open arainot opened this issue 2 years ago • 8 comments

Describe the bug The build fails when building on M1 Macs

To Reproduce Steps to reproduce the behavior:

  1. build_ios.sh

Expected behavior Should build correctly but instead fails to level_rules.mk is missing

Desktop (please complete the following information):

  • OS: 12.6 M1 Pro

Additional context Some people have suggested changing the cpp-10 in the Makefile to cpp-12 (current one). Please see discussion here: https://www.reddit.com/r/SuperMario64/comments/os39w9/got_super_mario_64_running_natively_on_an_m1_mac_d/

And proposed build here: https://github.com/SrGarmaples/target_osx

arainot avatar Sep 27 '22 14:09 arainot

Also changes here: https://github.com/Xjs/sm64ex/commit/a1e5dde66a32689259b37dc61a356c407f074465

arainot avatar Sep 27 '22 14:09 arainot

@ckosmic The main fix is to change gcc commands to gcc-12 in the Makefile. But then the Xcode building outputs some errors.

arainot avatar Oct 02 '22 17:10 arainot

Hi I changed cpp-10 to cpp-12 and gcc to gcc-12 and updated the wiki instructions to reflect these changes. I don't have an M1 Mac to test, so let me know if this builds after installing gcc-12 (brew install gcc@12)

ckosmic avatar Oct 07 '22 06:10 ckosmic

I get this error now

src/pc/gfx/gfx_sdl2.m:140:48: error: no member named 'uikit' in 'union SDL_SysWMinfo::(unnamed at /opt/homebrew/include/SDL2/SDL_syswm.h:230:5)'

arainot avatar Oct 08 '22 07:10 arainot

The issue here seems to be with SDL. The proposed build here: https://github.com/SrGarmaples/target_osx uses SDL as well but not in the same structure as you did. There's an explanation here: https://www.reddit.com/r/SuperMario64/comments/os39w9/got_super_mario_64_running_natively_on_an_m1_mac_d/

arainot avatar Oct 08 '22 10:10 arainot

Hi, I finally switched over to Apple silicon and have been able to do some fixes for compilation on M1/M2 macs. I've created the apple_silicon_fix branch for these changes if you'd like to check it out before I merge. https://github.com/ckosmic/sm64ex-ios/tree/apple_silicon_fix

ckosmic avatar May 29 '23 18:05 ckosmic

Any update on this, I am unable to build on apple silicon as well

ndlanier avatar Sep 23 '23 18:09 ndlanier

Did you get this to work? Im getting this error on the branch apple_silicon_fix:

image image image

contreras2004 avatar Nov 11 '23 14:11 contreras2004