OSX Mavericks Simulations appear to have no friction.

Post Reply
jmacey
Posts: 3
Joined: Tue Mar 25, 2014 11:45 am

OSX Mavericks Simulations appear to have no friction.

Post by jmacey »

I'm getting some weird simulations with Bullet under mac osx, using either the bullet-2.82-r2704.tgz or the git repo.

I'm using clang++ -v
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0

My demo works find on linux and another older mac book pro, however with the latest Macbook pro ( Processor 2.3 GHz Intel Core i7 NVIDIA GeForce GT 750M 2048 MB) I get what appears to be no friction in any of the demos.

For example the fork lift demo the block drops and then proceeds to slide into the screen, with my own demos all the rigid bodies seem to spin out of control and never come to rest.

A movie of these problems can be seen http://youtu.be/i-fgATMTpw4.

I've also had some link errors to do with Symbol not found: ___sincosf_stret but have fixed them using -mmacosx-version-min=10.8 does anyone have a clue what is causing this as I can't figure it out.
jmacey
Posts: 3
Joined: Tue Mar 25, 2014 11:45 am

Re: OSX Mavericks Simulations appear to have no friction.

Post by jmacey »

A quick update,

just built the demos using xcode and all works well, my version was built using cmake (and my own demos using qmake / Qt Creator) so it seems to be a compile option / flag issue with cmake.

For now I have copied the libs created by xcode into /usr/local/lib and renamed them to remove the _xcode4_debug and it all seems to work.

Is this an issue with the cmake version of the build?
dl83
Posts: 1
Joined: Tue Apr 15, 2014 2:37 am

Re: OSX Mavericks Simulations appear to have no friction.

Post by dl83 »

Ah, glad to know I'm not the only one :)
Would be curious to know what's causing this!
LtBrick
Posts: 6
Joined: Mon Apr 14, 2014 6:39 pm

Re: OSX Mavericks Simulations appear to have no friction.

Post by LtBrick »

I wonder if this is causing my issues too, "Ball Physics not working as expected." http://www.bulletphysics.org/Bullet/php ... f=9&t=9890

I haven't tried the demos yet, but friction in my model doesn't seem to behave properly. I built the library using cmake on my iMac running mavericks. Will have to try rebuilding them with Xcode and see if that works.
jmacey
Posts: 3
Joined: Tue Mar 25, 2014 11:45 am

Re: OSX Mavericks Simulations appear to have no friction.

Post by jmacey »

Not looked at this for a while but their is a huge difference in compiler flags from the Xcode and the CMake versions, removing all the -I path elements

Xcode

Code: Select all

clang -x c++ -arch x86_64 -fmessage-length=0 
-fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 
-std=gnu++11 -Wno-trigraphs -fno-rtti -fpascal-strings
 -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-non-virtual-dtor
  -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces 
  -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label 
  -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body 
  -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants 
  -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion 
  -Wno-enum-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions 
  -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk 
  -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.9 -g 
  -Wno-sign-conversion

Cmake

Code: Select all

/usr/bin/c++   -DUSE_GRAPHICAL_BENCHMARK -O3 -DNDEBUG 
I'guessing one of the flags above changes something in the Library to make it work or not
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA
Contact:

Re: OSX Mavericks Simulations appear to have no friction.

Post by Erwin Coumans »

I can reproduce the issue with Clang and will have a look at fixing it in the new github repo.

https://github.com/bulletphysics/bullet3/issues/164

Thanks for the report,
Erwin
Post Reply