I am aware that X86_64 should work but I don’t know if it’s full proof at this point. @R101 what do you think?
The x86_64 runs fine on the M1 Mac via Rosetta, and my main concern was regarding enabling Rosetta; I don’t know if it can be enabled automatically on installation, or the end-user needs to turn it on manually for the specific binary (I don’t think it can be enabled system-wide, but I could be wrong).
In terms of performance, running x86_64 on the ARM hardware seems to be equivalent to running on the native x86_64 hardware, but I can’t give you specific numbers.
Ideally there should be arm64 native binaries though……to avoid Rosetta entirely.
@pinky2012 Hi! i was working on this issue today (m1 build) compiling the libraries but i cant seem to find glsl_optimizer anywhere, any ideas?
Sorry, can’t help you there. My project does not use that library ( I guess you are at Cocos 4.0?). Seems the sources are available though, so you could try to compile it for ARM yourself.
thanks a lot guys!
Hi all, I got in the same issues when trying to build cocos for Mac. I compiled most dependencies for M1. I can build cocos2dx with or without Lua using directly cmake, and it is available on my GitHub.
https://github.com/papatr0x/cocos2d-x/tree/v4-with-m1-deps
Just to be sure, for iOS, this arm64 libs I did build for Mac are not compatible and I need to rebuild a new set of libs for iOS even when Mac and iOS are both arm64. is that correct?
@papalma your repo can run cocos native Apple M1 without Rosetta right?
yes it does
made this a year ago. you can check it out.
I was just looking for this. Thanks @bilalmirza!
Hi @bilalmirza,
In order to build “my” cocos2dx (= 3.15.1) silicon versions of the following libraries are needed:
tiff
chipmunk
curl
which you have not ported to silicon in your repository.
“Your” version is 3.17.1. Does it mean that this version does not need tiff, chipmunk and curl anymore? I am asking to understand if I need to migrate to 3.17.1 or if you maybe do not use those libraries at all…
i dont think 3.15.1 should change anything. You also might be able to find these libraries in cocos creator repo.
Hi, I am using version 3.17 I have the same issue as @siarsky. I also need tiff, chipmunk and bullet for my project. Till now I have been using a intel mac. Only last year I moved to m4 mac models. I tried checking the external folder for cocos creator here (GitHub - cocos/cocos-engine-external: external 3rd party modules for cocos-engine) and they seem to use Physyx now ?!? And I dont see anything for tiff.
Xcode also doesnt show in which file the error is occuring for me to comment the include as well. So could you let me know where I could get the required libs.
Also I am pretty sure I dont use those libraries so I am not sure why it is even showing up!! How do I disable the use of those libraries? Thanks.
Edit: Solved: The project works natively now without the need for rosetta!!
- Disable Chipmunk, Bullet and Tiff by going into Cocos-> Base-?Config.h file. Set their values to 0 instead of 1. https://stackoverflow.com/questions/52344269/why-cocos2d-dynamic-library-is-too-heavy-how-to-disable-some-unused-functions
- Include OpenGLframework since OpenGLES Framework is red now for me now :|.
- Include glfw website and download the Apple Silicone Library. Add the libglfw.a file in the frameworks.
The build should work now! Thanks for all the help !!![]()