Compiling DIVE @ UCL


SGI |WinNT/2000, Visual Studio 6 |WinNT/2000 Visual Studio 7 NEW

To access the DIVE source code you need to be a member of the UNIX group "divesrc".

SGI

The main code tree is stored:
 /cs/research/vr/dive/starship/dive/dive3.3x4
where the 3.3x4 refers the to version number (i.e. UCL version 4 relative to released 3.3x)

Compilation on SGI is very simple (see below), though if you want to make source changes, please make a complete copy of that repository and DO NOT change the original without checking with Anthony. This is because that directory is synchronised to the main CVS repository at SICS.

  1. Install supporting libraries. Your build options will depend on which libraries you want to bother installing (PNG support, TextToSpeech support, etc...), for the build options below, you can just copy the installation we have here.
  2. We will assume that the directory for your source code (either the base one above, or your own copy) is refered to as SRCDIR
  3. Create your build directory, preferably on local disk on your machine (compilation is much faster if you do not use NFS). We will call this directory BUILDDIR
  4. Optional step. If for some reason you need to alter or change the actual configure script you will need to run autoconf in the following three directories:
    $SRCDIR/
    $SRCDIR/threads
    $SRCDIR/sid2
    
    this creates the actual configure scripts.
  5. Configure dive. cd to $BUILDDIR. If you want a standalone OpenGL

    $SRCDIR/configure --enable-tcl=/cs/research/vr/dive/starship/build/dive_tools/n32-mips3/tcltk/irix6 --enable-audio --enable-zlib=/cs/research/vr/starship/common/vr/dive/dive_tools/n32-mips3/zlib/irix6 --enable-tts=/cs/research/vr/starship/common/vr/dive/dive_tools/n32-mips3/tts/irix6 --enable-gsm=/cs/research/vr/starship/common/vr/dive/dive_tools/n32-mips3/gsm/irix6 --enable-video --enable-sproc --enable-jpeg=/cs/research/vr/starship/common/vr/dive/dive_tools/n32-mips3/jpeg/irix6 --enable-png=/cs/research/vr/starship/common/vr/dive/dive_tools/n32-mips3/png/irix6 --enable-mips3 --enable-cxx-plugin --enable-vrpn=/cs/research/vr/starship/vr/vrpn/vrpn6.02

    The references to /cs/research/vr/starship/common/vr/dive/dive_tools/n32-mips3 are to pick up all the default libraries you need to link in with DIVE.

    By default we compile with VRPN support built in. Note that this is done through a plugin, and the default DIVE build doesn't require explicit configuration with the VRPN path. (References to vrpn within modules are to a vrpn_vhcl.c which will become a generic vehicle).

    If you want to compile with CAVElib and Performer, then you need this alternative:

    $SRCDIR/configure --enable-tcl=/cs/research/vr/dive/starship/build/dive_tools/n32-mips3/tcltk/irix6 --enable-audio --enable-zlib=/cs/research/vr/starship/common/vr/dive/dive_tools/n32-mips3/zlib/irix6 --enable-tts=/cs/research/vr/starship/common/vr/dive/dive_tools/n32-mips3/tts/irix6 --enable-gsm=/cs/research/vr/starship/common/vr/dive/dive_tools/n32-mips3/gsm/irix6 --enable-video --enable-sproc --enable-jpeg=/cs/research/vr/starship/common/vr/dive/dive_tools/n32-mips3/jpeg/irix6 --enable-png=/cs/research/vr/starship/common/vr/dive/dive_tools/n32-mips3/png/irix6 --enable-performer --enable-cavelib=/usr/local/CAVE --enable-mips3 --enable-cxx-plugin

    The differences are:

  6. Finally cd to $BUILDDIR/appl and type:
    gmake diva
    
    Note you must use gmake version 3.79 or better. You can find this for SGI in /cs/research/vr/starship/common/irix/bin/.
  7. You may want to compile the following processes as well: proxyserver, diveserver. The other processes are experimental.
  8. You may want to compile the following plugins as well: cd to $BUILDDIR/dive/plugins
    gmake vrpn_plugin.so
    gmake quake.so
    gmake example_plugin.so
    gmake quake.so
    cd to $BUILDDIR/dive/plugins/vnc
    gmake vnc_plugin.so

    Notes


WinNT/2000, Visual Studio 7

Since 2005, this is now the preferred way to build DIVE. Under bin/winnt_vs7/ is a build system for Visual Studio 7.1 (.Net 2003). It is not tested on Visual Studio .Net 2000 (7.0).

There are two solution files:

In dive.sln are the applications:

and all the DIVE internal libraries.

In dive_plugins.sln are the plugins:

more will be added here as they become available.

Getting Started

You MUST set the DIVE_TOOLS_DIR environment variable to point to the directory where the Dive support tools are installed. On my machine that is:
 C:/dev/dive/dive_tools_vc
this is the directory usually called that contains the sub-directories, jpeg, tcltk, X11, xdr, zlib.

In you want to compile with VRPN, you MUST set the VRPN_DIR. On my machine that is:

 C:\dev\vrpn\vrpn_06_06.beta7
also, you MUST compile VRPN with the "Multithreaded Debug" run-time system. This may or may not be the default in your build system. The VRPN version above uses Visual Studio 6, where you find the option under Project/Settings/C-C++/Code-Generation.

Running DIVE

diva.exe is built to the directory bin/winnt_vs7/appl (i.e. in the same relative directories as other build systems. To run DIVE Use you favourite wrapper scripts, or e.g.:

export DIVEPATH=c:/dev/dive/dive3.3x5/data
./diva.exe -init vishnu_init.tcl -sin

If it complains that it could not find tcl83.dll, then you need to copy the following four files into the appl directory: msvcrt.dll, tcl83.dll, tclpip83.dll, tk83.dll. They can be found in the dive_tools_vc/tcltk/win32/bin directory.

Notes

This is not a complete build from scratch, some steps have been skipped because they rely on GNU tools. In particular: Note that I had to comment out one line in the assembler code to get DIVE to compile with ml 7. Otherwise things seem very straightforward.

WinNT/2000, Visual Studio 6

You can refer to original (slightly outdated) instructions here. Note that the following instructions were written for a more modern version of Cygwin than previous releases of DIVE. This has had an impact on the actual configure script, but not the process of running it.
  1. You need:
  2. Setting up the environment
  3. We will assume that the directory for your source code (either the base one above, or your own copy) is refered to as SRCDIR
  4. Create your build directory. We will call this directory BUILDDIR
  5. Run autoconf in the following three directories:
    $SRCDIR/
    $SRCDIR/threads
    $SRCDIR/sid2
    
    this creates the actual configure scripts.

    NOTE for 3.3x5 and earlier (not CVS version) There is a small issue with cygwin and dive3.3x5 and earlier here. The dive3.3x5 and older source trees, rely on an old version of autoconf, which has recently been superceeded. When you run autoconf, if you do NOT see something like the following statements several times:

    configure.in:547: warning: AC_TRY_RUN called without default to allow cross comp
    iling
    
    They you will need to insert this line as the 2nd line in each of the three configure.in files in those directories listed above.
    AC_PREREQ(2.13)
    
  6. Configure dive. cd to $BUILDDIR

    $SRCDIR/configure --host i686-unknown-winnt --enable-tcl=c:/dev/dive/dive_tools_vc/tcltk/win32 --with-X11=c:/dev/dive/dive_tools_vc/X11/win32 --with-xdr=c:/dev/dive/dive_tools_vc/xdr/win32 --enable-audio --enable-zlib=c:/dev/dive/dive_tools_vc/zlib/win32 --enable-jpeg=c:/dev/dive/dive_tools_vc/jpeg/win32 --enable-pthreads --with-cc=cl

    If you have a very old version of autoconf, you might replace --host with --build.

    Of course you will need to change /c/dive/dive/dive_tools_vc to your own corresponding path.

  7. Build DIVE. cd to $BUILDDIR/appl

    gmake diva

  8. Run DIVE. Use you favourite wrapper scripts, or e.g.:

    export DIVEPATH=c:/dev/dive/dive3.3x5/data
    ./diva.exe -init vishnu_init.tcl -sin

    If it complains that it could not find tcl83.dll, then you need to copy the following four files into appl directory: msvcrt.dll, tcl83.dll, tclpip83.dll, tk83.dll. They can be found in the dive_tools_vc/tcltk/win32/bin directory.


Any local queries about Dive should go to
Anthony Steed, A.Steed@cs.ucl.ac.uk