Open Source Platform
for interconnected virtual worlds

Building Naali in Linux

From Rex community wiki

Contents

NOTE!

These instructions are for Naali 0.0.1. For up to date insturctions how to build trunk, see [[1]].


Introduction

Sadly the viewer has many external libraries which may not be satisfied by default on many distributions. A list of dependencies can be found in the file trunk/viewer/doc/dependencies.txt. However not all of them will be missing from your installation (MD5 is a good example, it should be on all unix-like operating systems).

Many distributions separate packages into two (or more parts): a user package containing the binaries (ex: "foo"), and a developer package containing headers and other development files (ex: "foo-devel" or "foo-debug"). You will need both.

Be ready for that your distribution might not have the required version for a library. In that case you need to get your hands dirty and compile a compatible (hopefully just newer) version of an external library from the sources.

// TODO: Describe here which library versions have been used to successfully build Naali on Linux, so we can have a baseline for required versions to work from.

Currently CMake is being used as the build system to build the Naali sources. Additionally, some of the dependency libraries can be built with CMake, but others need Scons as well.

CMake-gui users

  1. Choose source code, example: /my/path/to/code/viewer
  2. Choose location where binaries are build, example: /my/path/to/build/directory
    • Change view from Simple view to Grouped view, it's more informative
  3. Hit the configure button, verify that all external libraries are found
  4. After successful configuration hit the Generate button which will create actual Makefile which is located in your build directory
  5. Go to your build directory and run $ make

Plain CMake users

  1. Change to viewer code directory
  2. Run $ NAALI_DEP_PATH=/path/to/external/deps cmake
    • Note: some cases just clean cmake . will work
  3. Assure that cmake found all external libraries
  4. Run $ make

Known problems

  1. If the build crashes with "relocation R_X86_64_32 against `a local symbol'" message, ensure that all your statically linked external libraries are compiled with -fPIC flag, OR only use shared libraries
  2. Remember to change unix-plugins.cfg file to point current location of your OGRE plugins (it can be example /usr/local/lib/OGRE)
  3. Remember that viewer searches plugins and configuration files to load from it own current directory this means that your folder where viewer executable lies has to have next folders and files:
    • data/
    • media/
    • modules/
    • plugins.cfg
    • plugins-unix.cfg
    • pymodules
    • resources.cfg
    • testing
  4. If library X is not found, but you know that you have managed compiled it yourself try to set environment variable like: MYLIBRARY_HOME = /path/to/library and run cmake command again