OpenSceneGraph install instructions for Ubuntu 9.04 Jaunty Jackalope

Note: make sure to update your video card drivers before installing OpenSceneGraph. (my post before this one talks a little about that)

I wrote this blog as I went along, truly keeping a (web) log of my progress. I'm thinking I may write a much shorter summary post later, but maybe not. It's not like its a book or anything.

My instructor posted the following link on his blog. Unfortunately, this didn't seem to be enough to get the job done. At least not with my limited beginner knowledge.

So... here are some noob (that's me!) clarifications:

First I opened a terminal and entered this command:

apt-get build-dep openscenegraph

This will install all of the build dependencies needed to run OpenSceneGraph.
I went to this site to download the OpenSceneGraph source files:


I scrolled down a bit and chose this one OpenSceneGraph-2.8.2.zip .

I unzipped it inside of my /home/ultramanjones folder. I then renamed it simply OpenSceneGraph to keep things simple. ultramanjones is my user name.

Also on the OpenSceneGraph site, I found a copy of OpenSceneGraph-Data-2.8.0. Couldn't seem to find a 2.8.2 version. No worries, it will work. I downloaded that and unzipped into /home/ultramanjones right along side of the OpenSceneGraph folder.

I wasn't quite sure what he was referring to when he wrote:

Then I just downloaded the source code for Open Scene Graph 2.8.2 and compiled it as normal with the ./configure ; make; sudo make install

Then I went back and did the CMake turned on demos and apps and did the make; sudo make install

So I looked in the OpenSceneGraph folder and found a readme.txt. That helped make things a little clearer:

cd OpenSceneGraph
sudo make install

I just needed to get in the terminal and Change Directory to the OpenSceneGraph folder. and then, one at a time, enter the next three commands listed above.

"./configure" will only take a minute to execute. "make" will take a good half hour or so. "sudo make install" will flash by in a couple seconds.

Then he writes this:

Then I went back and did the CMake turned on demos and apps and did the make; sudo make install

Okay... um what? Never heard of CMake. So I googled it. I found this link concerning using CMake with OpenSceneGraph.


(btw I also found out that CMake is already included with Ubuntu 9.04, so no need to install it)

I read it and followed this bit of instruction:
# Assuming we're in the directory where the OSG sources
# are unpacked (usually as the directory "OpenScenGraph")
cd OpenSceneGraph
ccmake .
sudo make install
cd ..
After entering "ccmake ." I saw a little window with lots of yellow high-lighting open up - the CMake GUI I presume. I used the arrow keys to select "application" and "examples" and make sure they are set to "on". I used the enter key to change if necessary.

Used the "c" key to configure and then hit "g" to ready the build and exit. I was returned to the command line quickly.

Typed "make" and CMake did its work for the next 15 minutes or so.

Typed "sudo make install" and entered the administrator password when prompted, as usual. Seconds later I was returned to the command prompt.

After this I tried to follow the rest of Nate's instructions from his blog post, the first link at the top of this post, but I could not find an "ld.config.so" file in the /etc system folder. Once again I've hit a wall. I will update when I get this thing complete!!!

...time passes...

Woo hoo!! I finally got it working and saw the glorious cow! I'm still not quite sure what I was doing wrong, but, wouldn't you know it, I found the solution to my problems by returning to the source itself. The OpenSceneGraph site. Go figure. More specifically:


I used the following commands from the "4. Running the example applications" section of the page:

export PATH={$PATH}:/usr/local/share/OpenSceneGraph/bin
export OSG_FILE_PATH=/home/myaccount/MyData/OpenSceneGraph-Data
osgviewer cow.osg
And blammy! I was spinning a shiny metallic cow. I know this is a long post, but I really wanted to make it as accessible to newbies as possible.

NOTE: I never did find that file my instructor was referring to, but I did find one named ld.so.conf and I added the line "/usr/local/lib" to that file. The only other thing in the file is "include /etc/ld.so.conf.d/*.conf" at the top of an otherwise empty file. I didn't think it could hurt anything to add that simple line. AND the good news is that it is working.
Another link that may be of help:


1 comment:

Let me know what you think!