August 2001

Randall Hopper

            - vterrain-apps                      ver. 010829
              - wxWindows (wxGTK)                ver. 2.3.0
                - gettext                        ver. 0.10.35
                - tiff                           ver. 3.5.5
                  - jpeg                         ver. 6b
                  - zlib                         ver. 1.1.3
              - vterrain-sdk                     ver. 010829
                - png                            ver. 1.0.12
                - osg                            ver. 0.8.42
                  - OpenGL (glut,GLU,etc.)       ver. 1.2
                - netcdf                         ver. 3.5-beta8
                - gdal                           ver. 1.1.5
                  - PROJ.4                       ver. 4.4.3
    1. Each dependency is listed only once, at the deepest possible location in the tree.
    2. The versions listed are only those tested together. No doubt other combinations will work, but come back to these if you experience problems.


    NOTE: Many packages are available from other URLs as well.



      FreeBSD Ports exist for VTerrain and all of its dependencies. So binary packages may already be available. Check for them first: Chances are you have many of them installed already. Grab the new ports from the main repository, or here: Unpackage them, and simple run "make install" as root. These ports were developed on FreeBSD 4.3.

      It should not be difficult for someone familar with the Linux package managers (Redhat, Debian, etc.) to convert these ports to various Linux flavors so building and installing is simple there as well.


      Your system probably already has some of the needed components installed, so check there first to save yourself trouble. If you have problems, come back to the dependency version list above.

      Thus far I've compiled this VTerrain snapshot on FreeBSD 4.3, with the gcc 2.95.3 compiler. I ported a previous snapshot to IRIX 6.5 with both gcc and the IRIX compilers as well as Linux Mandrake with gcc, so compiling the latest on those platforms shouldn't be too hard.

      See section II for URLs to various packages. Many dependencies will be available here as well for a time: Some of the dependencies require patches to build on UNIX (or certain UNIX flavors), while some are very portable and probably will not. Refer to what the FreeBSD ports are doing for tips and patches: Also you may want to refer to: for information on where the various dependency files are being installed on FreeBSD.

      The following is a suggested build order for dependencies. Skip those you already have:

      1. ZLIB
        Supports GNU configure. So to build, just run: "configure", "make", "make install".
      2. JPEG
        GNU configure: "configure", "make", "make install"
      3. TIFF
        GNU configure.
      4. PNG
        make -f scripts/makefile. install
      5. NETCDF
        GNU configure.
      6. WXWINDOWS (wxGTK)
        GNU configure. You'll also want the OpenGL pieces to be built, so specify --with-opengl on the configure command-line. And when you issue make, use: "make all CREATE_LINKS_GL". And when installing, use: "make install CREATE_INSTALLED_LINKS_GL". Use GNU make to build.
        See the INSTALL in the package for details. But basically, run "make " (use GNU make). Ver. 0.8.42 knows linux, irix, and irix-nonstd, and freebsd.
      8. PROJ.4
        This is the USGS projection library, which is dynamically loaded by the VTERRAIN SDK via GDAL. So you'll need to build to generate a dynamic library. Uses GNU configure, so: "configure", "make", "make install"
      9. GDAL
        Another easy one. Just a few tricks. Install Python first if you want Python support (not needed by VTP though). Uses GNU configure and requires GNU make. For best results you may want to specify some configure options. Here's how I installed it:
                     configure --prefix=/usr/local \
                        --with-libz=internal \
                        --with-png=internal \
                        --with-libtiff=internal \
                        --with-libgeotiff=internal \
                        --with-libjpeg=internal \
                        --with-libgif=internal \
                     gmake install

      10. VTERRAIN SDK
        Finally, onto the good stuff! Pick some directory. Set the environment variable $VTP_ROOT to point to it.

        Now fetch the TerrainSDK package, and unzip (with the -a option) into this directory. cd into TerrainSDK.

        Edit Make.defs and uncomment the section of make definitions for your platform. Note that you'll also want to tweak the list of _DIR, _INC, and _LIB defines at the bottom of Make.defs to point to where you've installed the includes and libraries for the various dependencies.

        Ok, now "make" (use GNU make). With some luck, everything will build and you'll end up with these files:

        • TerrainSDK/vtdata/
        • TerrainSDK/vtlib/vtosg/

        Fetch the TerrainApps package, unzip with "unzip -a" into the $VTP_ROOT directory, and cd into the TerrainApps subdirectory.

        Copy your Make.defs from TerrainApps (they're basically copies

        of each other).

        Now "make" (use GNU make). You should end up with a "TerrainApps/Enviro/wxEnviro" executable. Copy to your favorite installed binary directory.

        NOTE: As of this time, the VTBuilder app hasn't been ported to UNIX. If you have the time, go for it!

Now you're ready to work with Enviro. See the Virtual Terrain Project web site for instructions and datafiles needed to run the demo. In particular, you'll want to get these ZIPs containing the run-time project datafiles: See this page for details: These web links may also be useful to you:

Good luck! If you have questions or feedback, please subscribe to the VTP mailing lists ( For questions about the UNIX port, feel free to post to the list, or mail me directly.

Randall Hopper <>
Last modified: Thu Aug 30 22:49:02 EDT 2001