[osg-users] 2.6 Mac OS X issues and some solutions

Filip Wänström filip.wanstrom at gmail.com
Thu Sep 4 02:24:48 PDT 2008

Hi there!

I tried out to run the 2.6 source release on my MacBook Pro (Leopard 10.5.4)
And run into some issues but it seems that I resolved them in the process
and I want to share my experience in order to help others in a similar


1. The provided Xcode project is out of date/doesn't work. I didn't bother
further with that after the initial failure to get it to work.
2. There seems to be no updated info on what to do with the Mac version
except that its seems hard, its not supported and Apple has broken binary
compatibility going from Tiger to Leopard. Scary stuff. I would have stopped
here if it wasn't for that I badly want Mac to be a viable development
environment for me. Maybe  some old info could be removed and replaced with
a simple "1.2.3" list of what to do now.

Anyway, I decided to go the CMake route even though it's not exactly well
documented anywhere (neither osg site or CMake homepage talks much about the
current status of Mac)

In short it worked, but not completely flawlessly. I found the following

1. There is not much documentation (The biggest problem is that a lot of
documentation is contradictory or just to old). So it's trial and error (and
2. The install script doesn't work since you have to run as root/su to
install in /usr/local
3. After install. You need to set OSG_LIBRARY_PATH to the plugin install dir

3b. Since this is very far from common practice when it comes to mac I think
It can be good to provide an example:

1. Download source (from svn or zipped, I use OpenSceneGraph-2.6.0 as the
example here)
2. Extract
3. Open terminal and go to your newly created directory (something like
4. Create a place for building the project (like: ~/tmp/osgbuild)
5. Enter that dir
5. run cmake with the flag -GXcode (cmake -GXcode ../OpenSceneGraph-2.6.0)
6. start ccmake to configure further (you probably want to build the
examples) (ccmake  ../OpenSceneGraph-2.6.0)
7. In the text-gui of ccmake. make changes like turn on the examples build.
then configure and generate project (c, g)
8. Start the xcodeproject and build (
9. run the installscript from the command line with su privileges ( or login
as root user for this task)
10. in order to test examples and make sure that plugins work: set the
environment variables:
Create a file called .profile in you root.
export OSG_LIBRARY_PATH=/usr/local/lib/osgPlugins-2.6.0/
export OSG_FILE_PATH=/path/to_where/you_put/OpenSceneGraph-Data-2.6.0/

Hope this help some other to shorten the time to get it working on the mac.

Best regards

/Filip Wänström
Creative Engineer - Visualization
The Interactive Institute
Norrköping, Sweden
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080904/5804ee43/attachment-0002.htm>

More information about the osg-users mailing list