Friday, 2 December 2011

Upgrading to Ubuntu 11.10 with player/stage

Yesterday I thought it would be a good idea to upgrade my laptop to 64-bit Ubuntu 11.10 (Oneiric Ocelot), this turned out to be a TERRIBLE idea since I've now spent the last 7 hours trying to reinstall Player/Stage. JOY.

In this post I'll quickly go over what I did that was different to the install for Ubuntu 11.04 (a comparative breeze). A more user-friendly guide to installing Player/Stage can be found here.

Let's get to it!

This time round I installed Player version 3.0.2 and Stage version 4.0.0.


The list of dependencies is mostly the same. Download and install these (using ubuntu software centre or aptitude or whatever you like best):
  • pkg-config
  • cmake
  • Fast Light Toolkit - shared libraries, libfltk1.1
  • Fast Light Toolkit - development files, libfltk1.1-dev
  • OpenGL Utility Toolkit - freeglut3
  • OpenGL Utility Toolkit development files, freeglut3-dev
  • PNG Library Runtime, libpng12-0 (or whatever is the latest version number)
  • PNG Library Development, libpng12-dev
  • Generic Library support script, libtool
  • A system independent dlopen wrapper for GNU libtool, libltdl7
  • A system independent dlopen wrapper for GNU libtool, libltdl-dev
  • Generic Library support script, libtool
New dependencies for 11.10:
  • Portable C++ Multithreading (default version), libboost-thread-dev
  • Managed signals and slots library for C++ (default version), libboost-signals-dev
  • Berkeley v5.1 Database Libraries [stl runtime], libdb5.1-stl

Some dependency troubles

I found that if I installed the latest fltk development package (libfltk1.3-dev) it gave the following compile error in Stage:

[ 41%] Building CXX object libstage/CMakeFiles/stage.dir/region.o
/home/jenny/player/source/Stage-4.0.0-src/libstage/ error: reference to ‘Region’ is ambiguous
/usr/include/X11/Xutil.h:265:26: error: candidates are: typedef struct _XRegion* Region
/home/jenny/player/source/Stage-4.0.0-src/libstage/region.hh:54:9: error:                 class Stg::Region
/home/jenny/player/source/Stage-4.0.0-src/libstage/ error: ‘Region’ does not name a type
/home/jenny/player/source/Stage-4.0.0-src/libstage/ error: reference to ‘Region’ is ambiguous
/usr/include/X11/Xutil.h:265:26: error: candidates are: typedef struct _XRegion* Region
/home/jenny/player/source/Stage-4.0.0-src/libstage/region.hh:54:9: error: class Stg::Region
/home/jenny/player/source/Stage-4.0.0-src/libstage/ error: ‘Region’ does not name a type
make[2]: *** [libstage/CMakeFiles/stage.dir/region.o] Error 1
make[1]: *** [libstage/CMakeFiles/stage.dir/all] Error 2
make: *** [all] Error 2

If I used libfltk1.1-dev instead this problem doesn't happen.


Installing Player was the same as for Ubuntu 11.04. See:
Also, set up pkg-config as described in steps 1 to 3 of the 11.04  instructions.

Installing Stage 4.0.0 was DIFFICULT. The linking stage of C compiling seems to be done slightly differently in this version of Ubuntu, which meant that Stage's compile scripts don't fully work. So what you need to do is unpack the Stage download, then in a text editor open the libstage/CMakeLists.txt file. Completely replace the contents of the file with this:
new CMakeLists.txt
Now that's done you can configure and install Stage as described in point 4 of the natty instructions onwards.


  1. Hey, when replacing libstage/CMakeLists.txt with your file I get following error:

    -- Configuring libstage
    CMake Error at libstage/CMakeLists.txt:96(INSTALL):
    install TARGETS given no LIBRARY DESTINATION for shared library target

  2. installing player/stage has been quite a pain, even more so because i've always been a windows user, instead of going straight to learning the software, i have to spend load of time trying to get it installed.

  3. hi, while executing command 'make' in build directory of stage, I faced the same error at 4% progress. I removed libfltk1.3-dev while installing libfltk1.1-dev. This error is no more. Though I am facing new error at 76% progress.