Compile ODE 0.11.0 on Mac OS X 10.6

Filed under Apple + Physics Engines on Wednesday, 30 December, 2009 10:54 am

The Official ODE instructions for compiling on Mac OS (even Linux) are pretty useless. Their wiki and instruction files included with the source code contains 'generic' instrcutions that list at what worked years ago. It frustrates me that their entire project becauses useless on one platform because it takes an inner knowledge of ODE's development process in order to get the damn thing to build.

Macports doesn't install ODE correctly either. Macports installs a PPC binary on your system (even if you have an Intel Mac). So here is the correct way to compile ODE on a Mac.

Download the ODE Source Code from Sourceforge.

Extract the source to a directory of your choosing (I use: /lib/ode-0.11.1)

Open a Terminal:

cd build
premake4 gmake --platform=universal32
cd gmake
make

At this point you need to add in some flags to the makefile in order to get this to build on Intel correctly. So open ode.make and change the following 2 lines:

cd ode-0.11.1/build/gmake
vim ode.make

You need to add -m32 to the CXXFLAGS, which you can do by adding it to the CPPFLAGS (which uses CXXFLAGS. Find the line starting with CPPFLAGS and change it to this:

CPPFLAGS  += -MMD -m32 $(DEFINES) $(INCLUDES)

You also need to add -m32 to LDFLAGS:

LDFLAGS   += -m32 -dynamiclib -flat_namespace -framework Carbon

Save and quit.

Build Release Libraries:

make config=releasesingledll

Build Debug Libraries:

make config=debugsingledll

This will build the libraries to here:

ode-0.11.1/lib/ReleaseSingleDLL/libode_single.dylib
ode-0.11.1/lib/DebugSingleDLL/libode_singled.dylib

So there you go. Enjoy using ODE!

5 Comments »

Pingback by – Compiling PAL with Bullet Physics 2.75 (Mac OS X) BrockWoolf.com

December 30, 2009 @ 11:14am

[...] Note: I tried to install ODE on Mac OS X - It no longer runs on Snow Leopard due to the DrawStuff API being removed in Snow Leopard. UPDATE: I figure out how to compile ODE on OS X 10.6. [...]

Pingback by – Compiling PAL with Bullet Physics 2.75 (Mac OS X) BrockWoolf.com

February 6, 2010 @ 11:21pm

[...] It no longer runs on Snow Leopard due to the DrawStuff API being removed in Snow Leopard. UPDATE: I figure out how to compile ODE on OS X 10.6. [...]

Comment by santi

February 26, 2010 @ 4:15am

Awesome post. It worked perfectly for me. The only extra thing I had to do is to download premake4 for Max OS X, since ODE-0.11.1 only comes with a windows version of premake4.

Comment by Brock Woolf

March 5, 2010 @ 9:24am

Regarding my post on getting ODE to build.

My post will tell you how to build it, but for some reason it just didn't work for me on SL. Maybe it does work, but i abandonded using ODE for other physics engines on OS X.

I had to try building it for a physics engine benchmark research that I ran, but in the end
we had to scrap ODE from our testing, resulting in only using Bullet, Newton, PhysX and (ODE on Windows only).

If the Windows benchmarks strongly reflect the Mac ones (and I think they would have as they did for Bullet and Newton on OS X)
I would forget ODE. It's a poor engine that just doesn't scale with objects and crashes often. You really have to be careful when programming
using ODE.

I'd recommend switching to Bullet as I found it to be excellent.
You could also use Newton, however it is closed source, which is a problem.

Comment by Mani

July 14, 2010 @ 6:11pm

Thank you very much for the instruction, it worked like a charm :-)

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

8) :wink: :P :D :) :o :? :( :x