Build failed for Mac using latest XCode 12.3

I am using Cocos2dx 3.17.2 with C++
Trying to build HelloWorld project on XCode 12.3 (MacOS Catalina 10.15.6)

First i get Bullet error which i got fixed by this thread

After that I am getting this Audio error

Anyone faced the same issue or able to build for Mac on latest XCode?
BTW iOS is working fine.


Sorry you are trying to build for Mac ( I presume since you said iOS works fine)

Yes, talking about Mac.
It was working fine in previous version, but in latest its not working.
Can you check on your side as well? if you are using latest Xcode 12.3

Just updated to XCode 12.3, and got the same building error on Mac, please help, thank you

I’ll update OS and Xcode and try too

I’m facing the same issue as above. Can anybody resolve this issue?

Same problem here. Any updates on this?

@zhangxm Please try to solve this.
Cocos should release 3.17.3 and 4.1 respectfully with these bug fixes, along with other cmake changes.
@giangphamreg @dragon0962 @kmaker Meanwhile you can comment those code part to compile successfully.

1 Like

Please help us release the new version for cocos2dx cpp -> 3.17.3 ! I think it has too many bugs @slackmoehrle

I’ll talk with the team.

Commenting the enum along with AudioSessionGetProperty definition an its uses seems to fix the issue. AudioSessionGetProperty does nothing anyways (it has a //TODO on its implementation), so I think this workaround won’t do any harm.
I had also an issue with which I solved changing the macOS Deployment Target on cocos2d project settings (mine was on macOS 10.7, and Xcode 12.3 requires macOS 10.9 at least).
Hope this helps…

Yes, that also i did. But i changed to 10.11, dont know its side effects.

@smitpatel88 were you able to generate cocos precompiled libs for arm64 (zlib, png, jpeg, etc)? otherwise compilation will fail for all valid archs which is the default for Release.

@kmaker I had not tried to make release build yet. Are you talking about Mac only?

I dont think Cocos team is concern about their old users anymore.
You guys are just concentrating on Creator, this is really bad.

1 Like

We haven’t forgotten about any users. I know the team is neck deep in work combining 2D and 3D, new platform support and working to combine the engines. This work will benefit Cocos2d-x and Creator users. While I don’t know every single detail I do know they are working hard and lots of extra hours.

Does this help: Apple M1 xcode build fails - #15 by zhangxm

@smitpatel88 Yes, Release compilation on Mac with Xcode 12.3.
@slackmoehrle I think that’s a solution for Creator. What we need here are all cocos2d c++ precompiled libs with the new arm64 architecture for macOS (regardless the cocos2d c++ version).
Even though there are workarounds (e.g., use an older Xcode or disable arm64 arch), keep in mind that they won’t work if you have a mac with M1 chip.

It’s not a solution for creator. It’s a PR for cocos2d-x.

@slackmoehrle Unfortunately that PR does not help.
Just in case the issue I’m seeing is not clear: on mac version of prebuilt cocos2d-x 3rd party libraries (the ones generated with GitHub - cocos2d/cocos2d-x-3rd-party-libs-src: Dependencies of cocos2d-x., like cocos2d/external/png/prebuilt/mac/libpng.a) the architecture arm64 is missing. You can tell this by running the command “lipo -info path-to-lib”.

I downloaded that code and played a little bit with it. I was able to generate zlib for arm64 but have problems with some of the others.