Compiling and Linking a DIVE application


- Technical Memo -
Web site: <http://www.sics.se/dive/manual/build.html>

Emmanuel Frécon - <emmanuel@sics.se>
Olof Hagsand - <olof@sics.se>

The Swedish Institute of Computer Science,
Stockholm, June, 1997


1. Introduction

This document is intended to describe how to compile and link a Dive application for Dive 3.2 released in June, 1997. It requires an average knowledge of C and Unix.

2. Software required

To be able to compile and link a DIVE application you need tools and libraries. You might be able to get along with other versions, but the following list describes the environment we have at SICS for building the 3.2 release.

2.1 Installing, Configuring

  • GNU make version 3.71.
  • 2.2 Compiling/Linking, External Libraries

  • C compiler:
  • Tcl version 7.6
  • Tk version 4.2
  • 2.3 Rendering

  • For software-only rendering is MesaGL version 2.2 and above required.
  • On Sun Solaris 2.5 OpenGL may be used.
  • On SGIs, either IrisGL or OpenGL may be used.
  • 2.4 Audio

  • On SGIs libaudio.a is shipped with Irix 5.3 or 6.X
  • On Sun Solaris 2.4/2.5 the "default" audio lib.
  • 2.5 Networking

  • For multicast capabilities IP multicast version 3.5 or later. You can compile and/or run without multicast using the proxyserver capabilities.
  • 3. Where to get it

    3.1. MesaGL

    Mesa 3-D graphics library is linked with some Dive applications. Mesa is an OpenGL compliant library written by Brian Paul,
    Avid Technologies 6400
    Enterprise Lane, Suite 201
    Madison, WI 53719
    Email: brianp@elastic.avid.com
    Web: http://www.ssec.wisc.edu/~billh/bp/Mesa.html

    3.2 IP multicast

    (for SUNOS 4.1)

    IP Multicast Extensions for BSD-Derived Unix Systems

    Release 3.5 + mrouted 3.6
    Jun 26, 1995

    available from parcftp.xerox.com,
    ftp://parcftp.xerox.com/pub/net-research/ipmulti/ipmulti3.5-sunos41x.tar.Z and ftp://parcftp.xerox.com/pub/net-research/ipmulti/mrouted3.6.tar.Z

    3.3. Tcl and Tk

    The official Ftp archive for the core Tcl/Tk distribution is at ftp://ftp.smli.com/pub/tcl. Dive 3.2 requires Tcl 7.6 and Tk 4.2 to be able to run.

    3.4. The GSM Library

    The GSM Library is a GSM compression and decompression library by Jutta Degener (jutta@cs.tu-berlin.de) and Carsten Borman (cabo@cs.tu-berlin.de), Communications and Operating Systems Research Group, TU Berlin. One known distribution site for the library is ftp://ftp.fokus.gmd.de/pub/step/nevot/gsm-1.0.7.tar.gz.

    3.5. zlib

    zlib is a general purpose data compression library by Jean-Loup Gailly (gzip@prep.ai.mit.edu) and Mark Adler (madler@alumni.caltech.edu). Its home page is at http://www.cdrom.com/pub/infozip/zlib/.

    4. UNIX and X Setup

    The following setup supposes that you have installed Dive in a directory called "dive3.2", directly under your home directory. You may, of course, install in other places. In your UNIX Shell environment you will need the following environment variables to be set correctly:

    5. Building a Dive Application

    Building your own application is somewhat restricted in the 3.2 release you will probably have to modify the makefiles.

    From the sub directory 'appl' under the binary directory corresponding to your machine type (for example ~/dive3.2/mips-sgi-irix5.3/appl), you should type 'gmake vishnu'. This should build the program 'vishnu', your first DIVE application.

    You are certainly impatient to start your first vishnu. Start it with the options '-world http://www.sics.se/dive/data/sics.vr -bo body_blockie' and you will experience your first DIVE immersion.

    If you get the message 'Diveserver not found on address: XXXX, continuing in singleuser mode' you will not be able to run multi-user DIVE. You should then compile the DIVE name server by entering 'gmake diveserver' and start it without any option. Starting vishnu should now print the message 'Diveserver answering at XXXX'.

    6. Misc Problems

    Netscape (or other program) uses up all of the colors in my colormap so my MesaGL colors gets screwed.

    There are two ways: the first is to use the -install command-line option (or the installColormap resource) to cause Netscape to install a private colormap instead of using the default, shared colormap. Netscape's image quality will be high, but, depending on your system, this may cause unattractive colormap flashing when changing focus between Netscape and other applications.

    The second way is to use the -ncols command-line option (or the maxImageColors resource) to limit the number of color cells Netscape will attempt to allocate. The lower the number, the lower the quality of images displayed in Netscape, but the more cells will be left for other applications. 200 is probably a good choice. The default is 0, meaning Netscape will allocate as many colors as it can.)

    References

    [1] What to do when Tk reports that your display is insecure?, Kevin B. Kenny, <http://ce-toolkit.crd.ge.com/tkxauth>