Try adding "-fno-fast-math" to the compiler flags for cpRobust.c. (Click the project > Build Phases > Compile Sources)
The version of clang that comes with Xcode 7+ broke a risky optimization I had used in the GJK and EPA algorithms to avoid needing arbitrary thresholds. I was relying on an inlined function to generate the exact same results when inlined in different places. The fix was to move the two functions to a separate file where unsafe math optimizations were not allowed. It fixes the problem without requiring me to add thresholds, and without measurably affecting performance. It did make the build a little more complicated though.
I would *highly* recommend compiling Chipmunk as a static library or adding the Chipmunk project to yours as a subproject. It avoids build problems like this and makes it easy to integrate bug fixes. Really I would recommend this for any library.
Chipmunk warning: high GJK iterations
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Chipmunk warning: high GJK iterations
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
-
- Posts: 2
- Joined: Thu Dec 03, 2015 1:59 am
- Location: Colorado, USA
- Contact:
Re: Chipmunk warning: high GJK iterations
LOL my posts got deleted, but this fixed my problem. Thanks!
I have the Chipmunk source included in the project mainly to keep from having to manage separate debug/release static libraries for both iOS and tvOS. I'll probably add Chipmunk as a subproject instead, eventually.
I have the Chipmunk source included in the project mainly to keep from having to manage separate debug/release static libraries for both iOS and tvOS. I'll probably add Chipmunk as a subproject instead, eventually.
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Chipmunk warning: high GJK iterations
I suppose I should add a build target for tvOS, until then it's easy to do yourself. You just need to duplicate the iOS target and change the SDK I think.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Who is online
Users browsing this forum: No registered users and 2 guests