Thursday, February 19, 2026

Cannot run cocos2d-x on M1 Chip – Web page 3 – C++


I’m conscious that X86_64 ought to work however I don’t know if it’s full proof at this level. @R101 what do you suppose?

The x86_64 runs high quality on the M1 Mac through Rosetta, and my principal concern was concerning enabling Rosetta; I don’t know if it may be enabled routinely on set up, or the end-user wants to show it on manually for the particular binary (I don’t suppose it may be enabled system-wide, however I could possibly be mistaken).

By way of efficiency, operating x86_64 on the ARM {hardware} appears to be equal to operating on the native x86_64 {hardware}, however I can’t offer you particular numbers.

Ideally there must be arm64 native binaries although……to keep away from Rosetta totally.

@pinky2012 Hello! i used to be engaged on this subject at present (m1 construct) compiling the libraries however i cant appear to search out glsl_optimizer wherever, any concepts?

Sorry, can’t enable you to there. My venture doesn’t use that library ( I suppose you might be at Cocos 4.0?). Appears the sources can be found although, so you could possibly attempt to compile it for ARM your self.

https://github.com/cocos2d/glsl-optimizer

Hello all, I received in the identical points when making an attempt to construct cocos for Mac. I compiled most dependencies for M1. I can construct cocos2dx with or with out Lua utilizing straight cmake, and it’s out there on my GitHub.

https://github.com/papatr0x/cocos2d-x/tree/v4-with-m1-deps

Simply to make certain, for iOS, this arm64 libs I did construct for Mac will not be appropriate and I have to rebuild a brand new set of libs for iOS even when Mac and iOS are each arm64. is that right?



1 Like

@papalma your repo can run cocos native Apple M1 with out Rosetta proper?

made this a yr in the past. you’ll be able to test it out.

I used to be simply searching for this. Thanks @bilalmirza!

Hello @bilalmirza,

With the intention to construct “my” cocos2dx (= 3.15.1) silicon variations of the next libraries are wanted:
tiff
chipmunk
curl
which you haven’t ported to silicon in your repository.

“Your” model is 3.17.1. Does it imply that this model doesn’t want tiff, chipmunk and curl anymore? I’m asking to know if I have to migrate to three.17.1 or for those who perhaps don’t use these libraries in any respect…

i dont suppose 3.15.1 ought to change something. You additionally would possibly be capable to discover these libraries in cocos creator repo.

Hello, I’m utilizing model 3.17 I’ve the identical subject as @siarsky. I additionally want tiff, chipmunk and bullet for my venture. Until now I’ve been utilizing a intel mac. Solely final yr I moved to m4 mac fashions. I attempted checking the exterior folder for cocos creator right here (GitHub – cocos/cocos-engine-external: exterior third occasion modules for cocos-engine) and so they appear to make use of Physyx now ?!? And I dont see something for tiff.

Xcode additionally doesnt present through which file the error is occuring for me to remark the embrace as effectively. So might you let me know the place I might get the required libs.

Additionally I’m fairly positive I dont use these libraries so I’m not positive why it’s even displaying up!! How do I disable using these libraries? Thanks.

Edit: Solved: The venture works natively now with out the necessity for rosetta!!

  1. Disable Chipmunk, Bullet and Tiff by going into Cocos-> Base-?Config.h file. Set their values to 0 as an alternative of 1. https://stackoverflow.com/questions/52344269/why-cocos2d-dynamic-library-is-too-heavy-how-to-disable-some-unused-functions
  2. Embody OpenGLframework since OpenGLES Framework is purple now for me now :|.
  3. Embody glfw web site and obtain the Apple Silicone Library. Add the libglfw.a file within the frameworks.

The construct ought to work now! Thanks for all the assistance !!:smiley:

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -spot_img

Latest Articles