VIRTUAL TERRAIN PROJECT - UNIX BUILD SUMMARY August 2001 Randall Hopper (aa8vb@yahoo.com) I. DEPENDENCY TREE 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 NOTES: 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. ------------------------------------------------------------------------------ II. DEPENDENCY PACKAGE LOCATIONS ftp://ftp.onshore.com/pub/libtiff/tiff-v3.5.5.tar.gz ftp://ftp.uu.net/graphics/png/src/zlib-1.1.3.tar.gz ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz http://www.libpng.org/pub/png/src/libpng-1.0.12.tar.gz ftp://unidata.ucar.edu/pub/netcdf/netcdf-3.5.0.tar.Z ftp://ftp.remotesensing.org/pub/gdal/gdal-1.1.5.tar.gz ftp://ftp.remotesensing.org/pub/proj/proj-4.4.3.zip http://www.openscenegraph.org/download/snapshots/osg-0.8.42.tar.gz http://prdownloads.sourceforge.net/wxwindows/wxGTK-2.3.1.tar.gz ftp://ftp.vterrain.org/pub/vterrain/dist/TerrainSDK-010829.zip ftp://ftp.vterrain.org/pub/vterrain/dist/TerrainApps-010829.zip NOTE: Many packages are available from other URLs as well ------------------------------------------------------------------------------ III. BUILDING INSTRUCTIONS A. FREEBSD PORTS, REDHAT RPMS, etc. FreeBSD Ports exist for VTerrain and all of its dependencies. So binary packages may already be available. Check for them first: http://www.freebsd.org/ports/ Chances are you have many of them installed already. Grab the new ports from the main repository, or here: http://www.freebsd.org/~rhh/vterrain/FREEBSD-PORTS/ 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. B. MANUAL BUILD 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: http://www.freebsd.org/~rhh/vterrain/FREEBSD-PORTS/distfiles/ 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: http://www.freebsd.org/~rhh/vterrain/FREEBSD-PORTS/ Also you may want to refer to: http://www.freebsd.org/~rhh/vterrain/FREEBSD-PORTS/pkg_info/ 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. 7. OPEN SCENE GRAPH (OSG) 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 \ --with-python gmake 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/libvtdata.so TerrainSDK/vtlib/vtosg/libvtosg.so 11. VTERRAIN APPS 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: TerrainApps-data.zip Enviro-demo.zip See this page for details: http://vterrain.org/Distrib/unix.html These web links may also be useful to you: http://www.vterrain.org/Implementation/Apps/Enviro/ http://www.vterrain.org/Request/index.html http://vterrain.org/Distrib/unix.html Good luck! If you have questions or feedback, please subscribe to the VTP mailing lists (http://www.vterrain.org/contact.html). For questions about the UNIX port, feel free to post to the list, or mail me directly. Randall Hopper aa8vb@yahoo.com (last update: 8/29/01)