Skip to content
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

Not building on M1 Macs #28

Open
arainot opened this issue Sep 27, 2022 · 8 comments
Open

Not building on M1 Macs #28

arainot opened this issue Sep 27, 2022 · 8 comments

Comments

@arainot
Copy link

arainot commented Sep 27, 2022

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
Copy link
Author

arainot commented Sep 27, 2022

Also changes here: Xjs/sm64ex@a1e5dde

@arainot
Copy link
Author

arainot commented Oct 2, 2022

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

@ckosmic
Copy link
Owner

ckosmic commented Oct 7, 2022

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)

@arainot
Copy link
Author

arainot commented Oct 8, 2022

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
Copy link
Author

arainot commented Oct 8, 2022

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/

@ckosmic
Copy link
Owner

ckosmic commented May 29, 2023

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

@ndlanier
Copy link

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

@contreras2004
Copy link

contreras2004 commented Nov 11, 2023

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

image image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants