Cocos2d-x 3.15, pthread and a problem with NDK 15rc0

I wanted to update to 3.15 and like every update, I created a new empty project (to compare the changes with my configuration).

I tested the old cocos command line for my project, after only replacing the cocos folder in my project. I got after some time (fresh compiling) the error

cocos2d/external/bullet/BulletMultiThreaded/PosixThreadSupport.cpp:319:62: error: 'pthread_barrier_in it' was not declared in this scope

That’s strange, because the bullet folder didn’t changed (git shows no changes there) and with 3.14.1 everything works fine. So I decided to compile the empty project in Android Studio (which was freshly created minutes before).

This project also generated the same error. I’m out of idea, because the build within CLion (on macOS) works fine and I get an executable with cocos2-d 3.15 runtime.

Could it be a problem with NDK 15rc1? If this is a problem, it will be a problem for everybody in the future. How can I fix this? Any ideas.

PS: Should I also need to report this in the bullet repo?

1 Like

It looks like Google has broken everything again.
Try ndk r14.

I think that Google probably will fix it in the next release. Or I just want to think so…

This was also my first idea, but why did 3.14.1 compile without any problems with 15rc0? And the bullet extension didn’t change from 3.14.1 to 3.15.

It’s really confusing.

Okay, I checked again and the new ndk 15rc0 is the culprit. I switched back to 14b and everything compiles like a charm.

1 Like

Thanks for the info.