4.2. Compiling VOS from Source

If binary packages are not available for your platform, you will have to compile VOS yourself. If you are interested in VOS development you will of course probably want to have the source code on hand as well.

VOS is supported on Debian Linux, Solaris Macintosh OS X and Microsoft Windows. Please send us an email (see website at http://interreality.org) if you successfully build and run VOS on a new platform, or if you are using VOS for your project. Thanks!

Have fun with VOS, and if you have any problems or questions please send an email to the vos-d@interreality.org mailing list, or to the developers directly.

4.2.1. Supported Platforms

If you are building VOS on Unix, VOS uses the GNU build system which relies on standard Unix tools such as bash, make, sed, and of course a compiler (usually GCC), along with autoconf, automake and make. On Windows, you must have Visual C++ 7.0 or better (Visual C++ 6.0 will NOT work) or Cygwin (http://www.cygwin.com). VOS also requires the C++ Standard Template Library, which should be a part of any modern C++ compiler.

VOS development takes place is on Debian GNU/Linux, RedHat GNU/Linux, Microsoft Windows 2000/XP with Visual C++ 7.0 (part of Visual Studio.NET), and on Macintosh OS X (with the help of some software from Fink: http://fink.sf.net). It in also be possible to use the Windows port of GCC with the Cygwin (http://sources.redhat.com/cygwin) . Other Linux distributions and Unix variants ought work with few or no changes, provided you have recent a recent version of GCC.

We strongly recommand that you use the most recent version of GCC, version 3.3 as of this writing. Version 2.95.2 of GCC will also work. [1] Please note that that versions 3.0, 3.1 and 3.2 of GCC do NOT work! [2]

The standard Mac OS X GCC-derived compilers (both 2.95 and 3.2) are both somewhat broken. If you have both GCC 2.95.4 (or 2.96) and 3.2 installed on your system, and 3.2 is the default, then you can set the following environment variables before running the configure script: set CXX to "c++-2.95" or "c++-2", set CPP to "cpp-2.95" or "cpp-2" and set CC to "cc-2.95" or "cc-2" (depending on what your 2.95 tools are named). It is necesary to do this on Mac OSX and on Cygwin.

On Unix and Cygwin (GNU toolset), you will need the recent versions of automake (at least 1.5) and autoconf (at least 2.53) available.

Windows 2000 is known to work. Windows 98 and NT4 may work as well. Other versions of Windows (95, ME) have not been tested.

4.2.2. Build Dependencies

4.2.2.1. Boost

The VOS core library uses the Boost threads library. (The Boost regular expression library is also necessary on some platforms.)

Prebuilt Boost libraries are available for some systems: check your system's software package resources for more information. Debian users should install the "libboost-thread-dev" and "libboost-regex-dev" packages. If you are using Debian 3.0 ("Woody"), however, please read the note below regarding the --with-stlport option to the configure script (users of testing or unstable can ignore this). If you are using Visual C++, there is a vos-win32-support-libs package available which includes all the necessary libraries and headers for boost (see section 4.3.2 for more information).

If a prebuilt Boost thread library is not available for your system, you must download and compile it yourself. Download the latest version of Boost for your platform at http://www.boost.org/download. Follow the instructions for building and installing Boost. Probably you will just need to install the "bjam" program (a build manager system similar to make used by Boost). Copy "bjam" somewhere so that it is in your run path. To build Boost (including bjam) with Visual C++ is covered in section 4.3.2.1.

To build "bjam" on Unix, go into boost_X_YY_Z/tools/build/jam_src and build it by running the "build.sh" script found inside. (On Cygwin, run "export CC=gcc-2; ./build.sh cc") The output "bjam" binary will be in a subdirectory called "bin.YOURPLATFROM" (e.g. "bin.cygwinx86"). Copy bjam to /usr/local/bin or some other place in your PATH.

Once bjam is installed, unpack boost and enter the unpacked "boost_X_YY_Z" directory.

  • On Linux, use "bjam -sTOOLS=gcc boost_thread" and " bjam -sTOOLS=gcc boost_regex".

  • On Windows with Cygwin and MinGW, use "bjam -sTOOLS=gcc boost_thread" and " bjam -sTOOLS=gcc boost_regex".

  • On MacOSX, use "bjam -sTOOLS=darwin boost_thread" and " bjam -sTOOLS=darwin boost_regex".

Unfortunately, there is not automated tool to install Boost, so you must do it manually.

  • On Linux and MacOS X, copy the resulting libraries from libs/thread/build/bin and libs/regex/build/bin (they will be beneath a couple of subdirectories) to /usr/local/lib/ (you can try this command to copy ALL the boost libraries to /usr/local/lib: cp `find libs/ -name \*.so\* -type f` /usr/local/lib/. On MacOSX, replace so with dylib.) Then copy or link then boost directory to /usr/local/include/boost.

4.2.2.2. Other Requirements

Optionally, VOS can use the Dante SOCKS library for bidirectional firewall traversal. See the SOCKS section later in this document for more information.

Optionally, VOS can use OpenSSL for secure communications and user authentication. It may be downloaded from http://www.openssl.org. If you are using Debian, you may install the "libssl-dev" package.

Other dependencies of the various applications are documented in README files in the respective directories. The configure script should skip compiling applications that rely on libraries you don't have.

For Ter'Angreal, the 3D client, you must install Crystal Space (http://crystal.sourceforge.net) before building VOS. You should download and unpack the CVS version of Crystal Space. Information on how to check it out may be found at http://sourceforge.net/cvs/?group_id=649 For details about building Crystal Space, please consult the Crystal Space documentation. For more information about Ter'Angreal, see chapter 3 of this manual.

Notes

[1]

On some platforms, GCC 2.95.2 and 2.95.3 reportedly has a bug that prevents dynamic_cast from working with virtual base classes and multiple inheritence. This problem makes some code break subtly, but other programs may run fine.

[2]

GCC 3.2 cannot compile virtual methods that use '...'. The bug report is online at this URL: http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=7306 . It has been fixed in the 3.3 release.