

                          Build instructions for VisIt
                         ==============================

VisIt relies on several external libraries which must be built and installed
prior to building VisIt.  This document provides detailed step by step
instructions for building VisIt and each of the dependent libraries.  The
instructions have been designed so that you can cut and paste most of the
commands needed to build the libraries and VisIt from this file into your
shell prompt.


    Library  Version  Description            For More Information
    =======  =======  ===========            ====================
    Mesa     5.0      3-D Graphics Library   http://www.mesa3d.org/
    Python   2.1.2    Scripting Language     http://www.python.org
    Qt       3.3.2    GUI Toolkit            http://www.trolltech.com
    Silo     4.4.2    File I/O library       http://www.llnl.gov/bdiv/meshtv
    VTK      20031028 Visualization Toolkit  http://www.kitware.com


The public version of VisIt has been built with the above listed versions
of the libraries, so it is known to work properly with those versions.  For
all the packages except VTK and Qt, you can probably use newer versions of the
packages and VisIt should work properly.  For Mesa, you must build a mangled
version of Mesa.  The distribution provided has already been set up to build
a mangled version so no additional work is required if you use it.  For VTK,
you must use the October 28, 2003 distribution provided. The version of Qt
used to build VisIt must be greater than or equal to 2.3.0. VisIt is also
compatible with Qt versions 3.0.2 or later.

VisIt also contains many database readers which are also built on external
libraries.  If you want to make use of these readers you will also need to
build and install those libraries prior to building VisIt.


    Library  Version  Description            For More Information
    =======  =======  ===========            ====================
    Boxlib   ???      An AMR I/O library     ???
    HDF5     1.6.0    File I/O library       http://hdf.ncsa.uiuc.edu/HDF5/
    Mili     1.06     File I/O library       (none)

Most of the third party libraries necessary to build VisIt are available for
download from ftp://ftp.llnl.gov/pub/visit/3rd_party.  It is suggested that
you start there and then go to the "For More Information" web sites for
any remaining libraries.


Building VisIt
===============

VisIt can currently be built on aix, irix, mac os x, linux, solaris, tru64
and windows operating systems.  The following instructions only apply to
building VisIt on Unix systems and does not apply to Mac OS X or Windows.

We currently build VisIt using the following compilers on the following
operating systems.  It is suggested that you use the same compilers.


   Operating System          Compiler
   ================          ========
   AIX 5.1                   g++ 3.1
   IRIX64 6.5                MIPSpro 7.3.1.2m and MIPSpro 7.4
   Linux 7.1 and 7.2         g++ 2.96 or g++ 3.2.3
   Solaris 7                 g++ 2.95.2 or g++ 3.2
   Tru64 5.1                 g++ 3.3.3

The following compilers will *NOT* work with VisIt.  They will either not
compile VisIt or will generate bad code.

   Operating System          Compiler
   ================          ========
   Linux 7.1 and 7.2         g++ 3.3 -> 3.3.3
   AIX 5.1                   g++ 3.2.3 -> 3.3.3

It is essential that you build all the dependent packages and VisIt using
the same c++ compiler or you will encounter linking problems because different
compilers or different versions of the same compiler may use different name
mangling schemes.

If you are using gmake or are building on an SGI and your machine has
multiple CPUs, you may speed up the build process for many of the products
by doing a parallel make.  For gmake, the command would be

   make -j "# of processors"

and for an SGI the command would be

   env PARALLEL="# of processors" make -P

Lets go ahead and build VisIt.  Start off by creating a directory to hold
VisIt and the installed versions of each of the dependent libraries.

mkdir visit
setenv VISITDIR `pwd`/visit

Typically a single directory will hold the binaries and libraries for
multiple machine architectures.  Lets create an environment variable to
hold the name of the architecture specific directory.  Some examples
include:

setenv VISITARCH aix_5_gcc_3.3.3
setenv VISITARCH irix64_cc_7.3.1.2_64
setenv VISITARCH irix64_cc_7.4_64
setenv VISITARCH linux_chaos_gcc_3.3.3
setenv VISITARCH linux_redhat_gcc_2.96
setenv VISITARCH solaris_gcc_2.95.2
setenv VISITARCH solaris_gcc_3.2
setenv VISITARCH tru64_5_gcc_3.3.3

Now build each of the dependent libraries followed by VisIt.


Mesa
=====

Mesa is a 3-D graphics library with an API which is very similar to that of
OpenGL.  It is used for performing off-screen rendering.

#
# Build Mesa
#
gunzip Mesa-5.0-mangled.tar.gz
tar xf Mesa-5.0-mangled.tar
cd Mesa-5.0

#
# To build Mesa, one of the following targets should probably be used.  The
# complete list of targets is available by typing "make" in the Mesa-5.0
# directory.
#
#  make aix                  for IBM RS/6000
#  make darwin               for Macintosh systems running MacOS X
#  make irix6-n32-dso        for SGI systems with IRIX 6.x, make n32-bit DSOs
#  make irix6-64-dso         for SGI systems with IRIX 6.x, make 64-bit DSOs
#  make linux                for Linux systems, make shared .so libs
#  make linux-alpha          for Linux on Alpha systems
#  make osf1-sl              for DEC Alpha systems with OSF/1, make shared libs
#  make solaris-x86          for PCs with Solaris
#  make solaris-x86-gcc      for PCs with Solaris using GCC
#  make sunos5-sl            for Suns with SunOS 5.x, make shared libs
#  make sunos5-gcc-sl        for Suns with SunOS 5.x, GCC, make shared libs
#
# To change the compiler modify CC and CXX in the file Make-config under
# the appropriate target from the above list.
#

#
# Install it in the visit directory under the mesa directory.
#
mkdir $VISITDIR/mesa
mkdir $VISITDIR/mesa/5.0
mkdir $VISITDIR/mesa/5.0/$VISITARCH
mkdir $VISITDIR/mesa/5.0/$VISITARCH/{include,lib}
mkdir $VISITDIR/mesa/5.0/$VISITARCH/include/GL
cp include/GL/*.h $VISITDIR/mesa/5.0/$VISITARCH/include/GL
#
# On aix systems you will need to build shared libraries from the
# archives.
#
# cd lib
# ar -x libMesaGL.a
# g++ -Wl,-G -shared -o libMesaGL.so -Wl,-bmaxdata:0x70000000 -Wl,-brtl *.o
# rm *.o
# ar -x libOSMesa.a
# g++ -Wl,-G -shared -o libOSMesa.so -Wl,-bmaxdata:0x70000000 -Wl,-brtl *.o
# rm *.o
# cd ..
#

#
# If you built a 64 bit version of the library on irix, then the library
# will be located in the lib64 directory.
#
cp lib/*.so       $VISITDIR/mesa/5.0/$VISITARCH/lib 
cd ..

VTK
====

VTK is an object oriented library for visualizing 3D data.  VisIt uses it
for all its visualization functionality. Follow the directions listed below
to build VTK.  If you have any problems building or installing VTK, read the
VTK/README.html file included in the VTK distribution for more information.

#
# Build CMake which is used by VTK to configure its distribution
#
gunzip cmake-1.8.1.tar.gz
tar xf cmake-1.8.1.tar
cd cmake-1.8.1
#
# We have experienced problems building CMake on aix with g++/gcc.
# so for aix use the native compilers to build CMake: 
# env CXX=xlC CC=xlc CXXFLAGS="" CFLAGS="" ./bootstrap
# otherwise:
env CXXFLAGS=""  CFLAGS="" ./bootstrap
make

#
# Build VTK
#
cd ..
gunzip vtk_cvs_2003_10_28.tar.gz
tar xf vtk_cvs_2003_10_28.tar
cd VTK
#
# On irix systems we have experienced problems with CMake not using the
# -LANG:std for all the tests, so you will need to add it manually.
#
# env CXXFLAGS="-LANG:std" ../cmake-1.8.1/bin/cmake .
#
../cmake-1.8.1/bin/cmake .
#
# Edit CMakeCache.txt.  Turn BUILD_SHARED_LIBS, VTK_USE_HYBRID,
# VTK_USE_MANGLED_MESA, and VTK_USE_ANSI_STDLIB on, Turn BUILD_TESTING off.
#
# If you want to change the compilers you should modify CMAKE_CXX_COMPILER
# and CMAKE_C_COMPILER.  If you want to change the compiler flags you should
# modify CMAKE_C_FLAGS and CMAKE_CXX_FLAGS.  You might want to specify "-O2"
# as a compiler flag to build an optimized version.  If you want to specify
# the location of the OpenGL library you should modify OPENGL_gl_LIBRARY and
# OPENGL_glu_LIBRARY (/usr/shlib/libGL.so and /usr/shlib/libGLU.so on tru64
# systems.)
#
# On irix systems you will need to specify "-LANG:std" for the compiler and
# linker flags.  If you are building a 64 bit version you will also need
# to add "-64" to the compiler and linker flags.  These include CMAKE_C_FLAGS,
# CMAKE_CXX_FLAGS, CMAKE_EXE_LINKER_FLAGS, CMAKE_MODULE_LINKER_FLAGS, and
# CMAKE_SHARED_LINKER_FLAGS,
#
# On aix systems you will need to specify "-mminimal-toc" for CMAKE_CXX_FLAGS.
# You may also experience problems with X11 headers. The default X11 headers
# files that cmake finds are not C++ compliant. Change "/usr/lpp/X11/include"
# to "/usr/include" for CMAKE_X_CFLAGS, X11_X11_INCLUDE_PATH,
# X11_Xlib_INCLUDE_PATH and X11_Xutil_INCLUDE_PATH.
#
../cmake-1.8.1/bin/cmake .
#
# Edit CMakeCache.txt, setting MANGLED_MESA_INCLUDE_DIR, MANGLED_MESA_LIBRARY,
# MANGLED_OSMESA_INCLUDE_DIR, MANGLED_OSMESA_LIBRARY, to point to the
# appropriate files and directories in the mesa directory.
# For example:
#
# MANGLED_MESA_INCLUDE_DIR:PATH=/home/visit/mesa/include
# MANGLED_MESA_LIBRARY:FILEPATH=/home/visit/mesa/lib/libMesaGL.so
# MANGLED_OSMESA_INCLUDE_DIR:PATH=/home/visit/mesa/include
# MANGLED_OSMESA_LIBRARY:FILEPATH=/home/visit/mesa/lib/libOSMesa.so
#
# Note that you need to be very careful in setting the above variables so
# that you provide the appropriate filename or path.
#
../cmake-1.8.1/bin/cmake .

#
# On linux systems the link line generated for the Hybrid and Rendering
# libraries will have the X11 library directory listed before the mesa
# library directory which may cause the library to be linked against the
# osmesa library in the X11 directory instead of the one that comes with
# our version of mangled mesa.  To correct this problem you will need to
# edit the Makefiles in the Hybrid and Rendering directories to swap the
# order of the X11 library directory and the mesa library directory.
#

#
# On tru64 systems using g++ 3.0.4, several files in the Imaging directory
# will not compile because of an internal compiler error.  You will need to
# comment out the code in the method ThreadedExecute (with "#if 0" as the
# first line in the method and "#endif" as the last line in the method.)
# The files are:
#    Imaging/vtkImageContinuousDilate3D.cxx
#    Imaging/vtkImageContinuousErode3D.cxx
#    Imaging/vtkImageConvolve.cxx
#    Imaging/vtkImageRange3D.cxx
#    Imaging/vtkImageVariance3D.cxx
#

#
# On tru64 systems using g++ 3.3.3, you may get messages indicating that
# "-timplicit_local -no_implicit_include" are not supported compiler
# options when building cmake.  Ignore them, the options appear to be
# necessary for things to build properly.
#
make

#
# Install it in the visit directory under the vtk directory.
#
mkdir $VISITDIR/vtk
mkdir $VISITDIR/vtk/2003.10.28
mkdir $VISITDIR/vtk/2003.10.28/$VISITARCH
mkdir $VISITDIR/vtk/2003.10.28/$VISITARCH/{Common,Filtering,Graphics,Hybrid,IO,Imaging,Rendering,MangleMesaInclude,lib}
cp vtkConfigure.h                 $VISITDIR/vtk/2003.10.28/$VISITARCH
cp vtkToolkits.h                  $VISITDIR/vtk/2003.10.28/$VISITARCH
cp vtk*Instantiator.h             $VISITDIR/vtk/2003.10.28/$VISITARCH
cp Utilities/zlib/zlib.h          $VISITDIR/vtk/2003.10.28/$VISITARCH
cp Utilities/zlib/zconf.h         $VISITDIR/vtk/2003.10.28/$VISITARCH
cp Utilities/zlib/zlibDllConfig.h $VISITDIR/vtk/2003.10.28/$VISITARCH
cp Utilities/tiff/tiffio.h        $VISITDIR/vtk/2003.10.28/$VISITARCH
cp Utilities/tiff/tiff.h          $VISITDIR/vtk/2003.10.28/$VISITARCH
cp Utilities/tiff/tiffvers.h      $VISITDIR/vtk/2003.10.28/$VISITARCH
cp Utilities/tiff/tconf.h         $VISITDIR/vtk/2003.10.28/$VISITARCH
cp Utilities/tiff/tiffDllConfig.h $VISITDIR/vtk/2003.10.28/$VISITARCH
cp Common/*.h                     $VISITDIR/vtk/2003.10.28/$VISITARCH/Common
cp Filtering/*.h                  $VISITDIR/vtk/2003.10.28/$VISITARCH/Filtering
cp Graphics/*.h                   $VISITDIR/vtk/2003.10.28/$VISITARCH/Graphics
cp Hybrid/*.h                     $VISITDIR/vtk/2003.10.28/$VISITARCH/Hybrid
cp IO/*.h                         $VISITDIR/vtk/2003.10.28/$VISITARCH/IO
cp Imaging/*.h                    $VISITDIR/vtk/2003.10.28/$VISITARCH/Imaging
cp Rendering/*.h                  $VISITDIR/vtk/2003.10.28/$VISITARCH/Rendering
cp MangleMesaInclude/*.h          $VISITDIR/vtk/2003.10.28/$VISITARCH/MangleMesaInclude
cp bin/*.so                       $VISITDIR/vtk/2003.10.28/$VISITARCH/lib
cd ..

#
# Several of the header files in MangleMesaInclude have absolute paths
# of other headers files that are located in the directories you built
# VTK in.  This means that even though the header files were copied to
# the visit/vtk directory, there are still references to header files
# in directories where you built VTK.  This may cause problems if you
# later remove the directories where you built VTK, or if someone else
# were to use your installation and the permissions in your directories
# were incorrect.
#

Qt
===

The Qt toolkit from Trolltech is a free (for non-commercial use), cross-
platform Graphical User Inteface toolkit that runs on X11, MS Windows, and
Mac-X. VisIt uses Qt as the basis of its GUI and Viewer.  Follow the
directions listed below to build Qt.  You can use Qt version 2.3.0, 3.0.2
or 3.3.2 on all the systems except tru64 where you must can't use 2.3.0.
We recommend using 3.3.2.  If you have any problems building or installing
Qt, read the INSTALL file in the Qt distribution for more information.

#
# Build Qt 3.3.2
#
gunzip qt-x11-free-3.3.2.tar.gz
tar xf qt-x11-free-3.3.2.tar
cd qt-x11-free-3.3.2
setenv QTDIR `pwd`
set path=($QTDIR/bin $path)
setenv LD_LIBRARY_PATH $QTDIR/lib:$LD_LIBRARY_PATH
setenv LD_LIBRARYN32_PATH $QTDIR/lib:$LD_LIBRARYN32_PATH     # SGI
setenv LD_LIBRARY64_PATH $QTDIR/lib:$LD_LIBRARY64_PATH       # SGI
# Use the appropriate configure command based on the operating system on
# which you are building Qt.
./configure -platform aix-g++ -shared -no-largefile -no-imgfmt-png -no-imgfmt-jpeg -no-imgfmt-mng
./configure -platform irix-cc-64 -shared -no-imgfmt-png -no-imgfmt-jpeg -no-imgfmt-mng
./configure -platform linux-g++ -shared -no-imgfmt-png -no-imgfmt-jpeg -no-imgfmt-mng
./configure -platform solaris-g++ -shared -no-imgfmt-png -no-imgfmt-jpeg -no-imgfmt-mng
./configure -platform tru64-g++ -shared -no-imgfmt-png -no-imgfmt-jpeg -no-imgfmt-mng
#
# When you build qt, not all of qt will build successfully because support
# for png, jpeg and mng are missing.  This is ok because the library and
# the executables that we care about get built.
#
# On tru64 systems you will need to make the following changes to
# the file mkspecs/tru64-g++/qmake.conf:
# set QMAKE_LIBDIR_OPENGL to "/usr/shlib"
#
# On tru64 systems qt generates some unaligned access errors. To
# correct the problem change the following two code blocks in
# src/tools/qlocale.cpp.
#
# #if !defined(INFINITY)
#         ...
# #endif
#
#                    to
#
# #if !defined(INFINITY)
# static const union {unsigned char c[8];double d;} be_inf_bytes = { 0x7f, 0xf0, 0, 0, 0, 0, 0, 0 } ;
# static const union {unsigned char c[8];double d;} le_inf_bytes = { 0, 0, 0, 0, 0, 0, 0xf0, 0x7f };
# static inline double inf()
# {
#     return ByteOrder == BigEndian ? be_inf_bytes.d : le_inf_bytes.d;
# }
# #   define INFINITY (::inf())
# #endif
#
#                    and
#
# #if !defined(NAN)
#         ...
# #endif
#                    to
#
# #if !defined(NAN)
# static const union {unsigned char c[8];double d;} be_nan_bytes = { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 };
# static const union {unsigned char c[8];double d;} le_nan_bytes = { 0, 0, 0, 0, 0, 0, 0xf8, 0x7f };
# static inline double nan()
# {
#     return ByteOrder == BigEndian ? be_nan_bytes.d : le_nan_bytes.d;
# }
# #   define NAN (::nan())
# #endif
#
# On aix systems qt will normally find non c++ compliant X11 header files in
# /usr/lpp/X11/include.  You will need to make the following changes to the
# file mkspecs/aix-g++/qmake.conf:
# remove "/usr/X11R6/include" from QMAKE_INCDIR_X11
# remove "/usr/X11R6/include" from QMAKE_INCDIR_OPENGL
#
# On linux systems using the gcc 2.96 compiler, the compiler has a bug that
# causes most of the text fields that contain numeric values to have 1
# added to the 6th digit.  For example, 1 is displayed as 1.00001. To
# correct this problem you will need to replace the code in the function
# doubleToString in the file src/tools/qlocale.cpp with
#
#     char str[80];
#     sprintf(str, "%g", d);
#     QString num_str(str);
#
#     return num_str;
#
# You will also need to add "#include <stdio.h>" at the beginning of the
# file to get the prototype for sprintf.
#
# On linux systems if the OpenGL library is built with threading support,
# qt won't by default compile the QGL widget.  To overcome this problem you
# will need to add "-thread" to the configure line.  When qt creates the
# qt library it will name it qt-mt instead of qt.  This will cause problems
# linking visit.  To fix this you should first build qt, having it create
# libqt-mt.so.  Then remove all occurances of "-mt" from src/Makefile and
# issue the make command again.  It will now create the qt library properly
# named for visit.
#
make

#
# Install it in the visit directory under the qt directory.
#
mkdir $VISITDIR/qt
mkdir $VISITDIR/qt/3.3.2
mkdir $VISITDIR/qt/3.3.2/$VISITARCH
mkdir $VISITDIR/qt/3.3.2/$VISITARCH/{bin,include,lib}
mkdir $VISITDIR/qt/3.3.2/$VISITARCH/include/private
cp bin/{findtr,moc,qt20fix,qtrename140} $VISITDIR/qt/3.3.2/$VISITARCH/bin
cd include; cp *.h $VISITDIR/qt/3.3.2/$VISITARCH/include
cp private/*.h $VISITDIR/qt/3.3.2/$VISITARCH/include/private
cd ../lib;find . -print | cpio -pvmud $VISITDIR/qt/3.3.2/$VISITARCH/lib
cd ../..
#
# On aix systems you will need to add an additional link to the lib
# directory so that the loader can find the library.
#
# ln -s libqt.so.3.3.2 $VISITDIR/qt/3.3.2/$VISITARCH/lib/libqt.so
#

#
# Build Qt 3.0.2
#
gunzip qt-x11-free-3.0.2.tar.gz
tar xf qt-x11-free-3.0.2.tar
cd qt-x11-free-3.0.2
setenv QTDIR `pwd`
# Use the appropriate configure command based on the operating system on
# which you are building Qt.
./configure -platform aix-g++ -shared -qt-libpng
./configure -platform irix-64 -shared -qt-libpng
./configure -platform linux-g++ -shared -qt-libpng
./configure -platform solaris-g++ -shared -qt-libpng
./configure -platform tru64-g++ -shared -qt-libpng
#
# On tru64 systems you will need to make the following changes to
# the file mkspecs/tru64-g++/qmake.conf:
# remove "/usr/X11R6/include" from QMAKE_INCDIR_X11
# remove "/usr/X11R6/lib"     from QMAKE_LIBDIR_X11
# remove "/usr/X11R6/include" from QMAKE_INCDIR_OPENGL
# set QMAKE_LIBDIR_OPENGL to "/usr/shlib"
#
# On aix systems you will need to make the following changes to
# the file mkspecs/aix-g++/qmake.conf:
# remove "/usr/X11R6/include" from QMAKE_INCDIR_X11
# remove "/usr/X11R6/include" from QMAKE_INCDIR_OPENGL
#
make

#
# Install it in the visit directory under the qt directory.
#
mkdir $VISITDIR/qt
mkdir $VISITDIR/qt/3.0.2
mkdir $VISITDIR/qt/3.0.2/$VISITARCH
mkdir $VISITDIR/qt/3.0.2/$VISITARCH/{bin,include,lib}
cp bin/{designer,findtr,moc,qt20fix,qtrename140} $VISITDIR/qt/3.0.2/$VISITARCH/bin
cd include; cp *.h $VISITDIR/qt/3.0.2/$VISITARCH/include
cp private/*.h $VISITDIR/qt/3.0.2/$VISITARCH/include/private
cd ../lib;find . -print | cpio -pvmud $VISITDIR/qt/3.0.2/$VISITARCH/lib
cd ../..
#
# On aix systems you will need to add an additional link to the lib
# directory so that the loader can find the library.
#
# ln -s libqt.so.3.0.2  $VISITDIR/qt/3.0.2/$VISITARCH/lib/libqt.so
#

#
# Build Qt 2.3.0
#
gunzip qt-x11-2.3.0.tar.gz
tar xf qt-x11-2.3.0.tar
cd qt-2.3.0
setenv QTDIR `pwd`
# Use the appropriate configure command based on the operating system on
# which you are building Qt.
./configure -platform aix-g++ -shared -qt-libpng
./configure -platform irix-64 -shared -qt-libpng
./configure -platform linux-g++ -shared -qt-libpng
./configure -platform solaris-g++ -shared -qt-libpng
./configure -platform tru64-g++ -shared -qt-libpng
#
# On aix systems you will need to make the following changes to
# the file mkspecs/aix-g++/qmake.conf:
# remove "/usr/X11R6/include" from QMAKE_INCDIR_X11
# remove "/usr/X11R6/include" from QMAKE_INCDIR_OPENGL
#
make

#
# Install it in the visit directory under the qt directory.
#
mkdir $VISITDIR/qt
mkdir $VISITDIR/qt/2.3.0
mkdir $VISITDIR/qt/2.3.0/$VISITARCH
mkdir $VISITDIR/qt/2.3.0/$VISITARCH/{bin,include,lib}
cp bin/{designer,findtr,moc,qt20fix,qtrename140} $VISITDIR/qt/2.3.0/$VISITARCH/bin
cd include; cp *.h $VISITDIR/qt/2.3.0/$VISITARCH/include
cd ../lib;find . -print | cpio -pvmud $VISITDIR/qt/2.3.0/$VISITARCH/lib
cd ../..
#
# On aix systems you will need to add an additional link to the lib
# directory so that the loader can find the library.
#
# ln -s libqt.so.2.3.0 $VISITDIR/qt/2.3.0/$VISITARCH/lib/libqt.so
#

Silo
=====

Silo is a self-describing, machine-independent scientific file format.
Silo is one of the file formats supported by VisIt.  Follow the directions
listed below to build Silo.  If you have any problems building or installing
Silo, read the BUILD_NOTES file in the Silo distribution for more information.

On itanium (ia64) systems, the -fPIC flag is needed.  You can replace
CFLAGS=-O2 with CFLAGS="-fPIC -O2" in the configure command below.

On irix systems, if you want to build a 64 bit version you can replace
CFLAGS=-O2 with CFLAGS="-64 -O2" in the configure command below.

#
# Build Silo
#
sh silo050228.sh
cd silo050228
env CFLAGS=-O2 ./configure --without-readline --without-hdf5 --without-exodus
make

#
# Install it in the visit directory under the silo directory.
#
mkdir $VISITDIR/silo
mkdir $VISITDIR/silo/4.4.2
mkdir $VISITDIR/silo/4.4.2/$VISITARCH
mkdir $VISITDIR/silo/4.4.2/$VISITARCH/{include,lib}
cp silo/silo/silo.{h,inc}   $VISITDIR/silo/4.4.2/$VISITARCH/include
cp silo/sdx/sdx.{h,inc}     $VISITDIR/silo/4.4.2/$VISITARCH/include
cp lib/libsilo.a            $VISITDIR/silo/4.4.2/$VISITARCH/lib
cd ..


Python
=======

Python is a powerful, free scripting language that is used to drive VisIt's
viewer when running VisIt without a GUI. Python is cross platform and runs on
many UNIXes as well as MS Windows and other platforms. VisIt can be configured
to run without Python if scripting features are not desired.  Follow the
directions listed below to build Python.  If you have any problems building
or installing Python, read the README file in the Python distribution for more
information.

On itanium (ia64) systems, the -fPIC flag is needed.  To add this flag to
python's build, do the following:  (1) Follow the commands below until the
configure step.  Execute configure as given.  (2) Look at the Makefile and
find the value of the variable OPT.  (3) Re-execute configure with OPT
specified through the env command, with -fPIC added to OPT.  For example:

env OPT="-fPIC -O2" ./configure --prefix=$VISITDIR/python/$VISITARCH

where the "-O2" was the value of OPT in the makefile.  (4) Continue with
the commands below as given.

On irix systems, if you want to build a 64 bit version will need to override
the default compiler and linker options.  This is done in a similar fashion
as described above but -64 is added to OPT and LDFLAGS.  For example:

env OPT="-64 -O2" LDFLAGS="-64" ./configure --prefix=$VISITDIR/python/$VISITARCH 

#
# Build and install it in the visit directory under the python directory.
#
gunzip Python-2.1.2.tar.gz
tar xf Python-2.1.2.tar
cd Python-2.1.2
./configure --prefix=$VISITDIR/python/$VISITARCH
make
make install

#
# You will also need to create a shared version of the python library.
#
mkdir tmpdir
cd tmpdir
ar -x ../libpython2.1.a
# Use the appropriate command based on the operating system on which
# you are creating the shared library.
g++ -Wl,-G -shared -o ../libpython2.1.so *.o                         # aix
g++ -shared -o ../libpython2.1.so *.o                                # irix
CC  -shared -o ../libpython2.1.so *.o                                # irix
CC  -64 -shared -o ../libpython2.1.so *.o                            # irix 64
g++ -shared -o ../libpython2.1.so *.o                                # linux
g++ -Wl,-G -o ../libpython2.1.so *.o                                 # solaris
g++ -Wl,-expect_unresolved -Wl,'*' -shared -o ../libpython2.1.so *.o # tru64
cd ..
rm -rf tmpdir
cp libpython2.1.so $VISITDIR/python/$VISITARCH/lib/python2.1/config/libpython2.1.so
cd ..


Mili (Optional)
================

Mili uses GNU's autoconf system to provide platform independence when
building Mili in a UNIX environment.  It requires both a C and Fortran
compiler.  Its compiler flags are built directly into the configure script
based on platform.  In order to change the flags you must edit the configure
script.

#
# Build Mili.
#
gunzip mili.tar.gz
tar xf mili.tar
cd Mili

On irix systems, if you want to build a 64 bit version will need to override
the default compiler options.  You will need to replace all occurances of
"-n32" with "-64" in the configure script.

./configure
make

#
# Install it in the visit directory under the mili directory.
#
mkdir $VISITDIR/mili
mkdir $VISITDIR/mili/1.06
mkdir $VISITDIR/mili/1.06/$VISITARCH
cp src/mili.h      $VISITDIR/mili/1.06/$VISITARCH
cp src/mili_enum.h $VISITDIR/mili/1.06/$VISITARCH
cp src/libmili.a   $VISITDIR/mili/1.06/$VISITARCH
cp src/libgahl.a   $VISITDIR/mili/1.06/$VISITARCH
cd ..

#
# Build HDF5.
#
gunzip hdf5-1.6.0.tar.gz
tar xf hdf5-1.6.0.tar
cd hdf5-1.6.0

HDF5 will by default want to use the vendor supplied compiler so you will
probably need to specify the compiler.  This can be done by preceding the
configure command with "env CC=compiler_name".

On Linux systems you will need to add -fPIC to the compile flags.  This
can done by preceding the configure command with "env CFLAGS=-fPIC".

./configure --disable-shared -prefix=$VISITDIR/hdf5/1.6.0/$VISITARCH
make

#
# Install it in the visit directory under the hdf5 directory.
#
mkdir $VISITDIR/hdf5
mkdir $VISITDIR/hdf5/1.6.0
mkdir $VISITDIR/hdf5/1.6.0/$VISITARCH
make install
cd ..

#
# Build Boxlib.
#
gunzip boxlib.tar.gz
tar xf boxlib.tar
cd CCSEApps/BoxLib

Boxlib does not work on Solaris or Irix systems.  We had to modify boxlib
to use it with VisIt so you will need to contact us for the source code if
you wish to build it.

On Itanium systems you will need to modify FPC.cpp and whereever you see
a reference to "__i486__", you will need to add an appropriate reference to
"__ia64__".

On Linux systems you will also need to add -fPIC to the compile flags.
This can done by adding the line "CXXFLAGS += -fPIC" near the top of the
file GNUmakefile.

On systems using MPI 2.0 (altix), you will need to change the following 3
lines

typedef int MPI_Op;
typedef int MPI_Comm;
typedef int MPI_Datatype;

to

typedef unsigned int MPI_Op;
typedef unsigned int MPI_Comm;
typedef unsigned int MPI_Datatype;

in the file ccse-mpi.H.

#
# Boxlib builds either a 2d or 3d version and VisIt needs both, so you will
# need to build the 3d version, install it and then build the 2d version and
# install it.
#
# You will need to modify GNUmakefile to set the compiler.  Typically, this
# will involve replacing "KCC" with the name of your c++ compiler in the
# line "COMP      = KCC".  If the compiler doesn't match one of the ones
# in the file ../mk/Make.defs, you will need to create an entry for it
# in that file.  The only value of COMP that it understands and is relevant
# for VisIt is g++.  If the g++ compiler is referenced by anything other
# than g++, the easiest thing is to change all occurances of g++ with the
# other name in the file ../mk/Make.defs.  For example if the compiler is
# g++-3.2.3, then change all occurances of g++ to g++-3.2.3.
#

#
# Start off by building the 3d version.
#
make -f GNUmakefile

#
# Install the 3d version in the visit directory under the boxlib directory.
#
mkdir $VISITDIR/boxlib
mkdir $VISITDIR/boxlib/$VISITARCH
mkdir $VISITDIR/boxlib/$VISITARCH/{include,lib}
mkdir $VISITDIR/boxlib/$VISITARCH/include/{2D,3D}
cp libbox3d*.a $VISITDIR/boxlib/$VISITARCH/lib/libbox3D.a

#
# Now build the 2d version.
#
make clean

#
# You will need to modify the GNUmakefile to set the dimension to 2.  This
# will involve replacing "3" with "2" in the line "DIM       = 3".
#
make -f GNUmakefile

#
# Install the 2d version in the visit directory under the boxlib directory.
#
cp libbox2d*.a $VISITDIR/boxlib/$VISITARCH/lib/libbox2D.a

#
# Install the header files.
#
cp Boxlib2D.h.tar $VISITDIR/boxlib/$VISITARCH/include/2D
cp Boxlib3D.h.tar $VISITDIR/boxlib/$VISITARCH/include/3D
cd $VISITDIR/boxlib/$VISITARCH/include/2D
tar xf Boxlib2D.h.tar
cd $VISITDIR/boxlib/$VISITARCH/include/3D
tar xf Boxlib3D.h.tar
cd $VISITDIR
cd ..

VisIt
======

VisIt uses GNU's autoconf system to provide platform independence when
building VisIt in a UNIX environment. Autoconf creates a script called
configure that tests your system for various libraries and programs required
to build VisIt.  Follow the directions listed below to build VisIt.
More information about building VisIt follows after that.

Note: for Itanium (ia64) systems, add the -fPIC flag to the CXXFLAGS in the
env command for configure.

#
# Build and install it in the visit directory.
#
gunzip visit050307.tar.gz
tar xf visit050307.tar
cd visit050307/config-site
echo VISITHOME=$VISITDIR > `hostname`.conf
sed "s/ARCH/$VISITARCH/" Template.conf >> `hostname`.conf
cd ..
env CXXFLAGS=-O2 ./configure
make
clearcase_bin/visit-bin-dist
# Use the appropriate install command based on the operating system on
# which you built VisIt.
clearcase_bin/visit-install 1.4.2 aix $VISITDIR
clearcase_bin/visit-install 1.4.2 irix6 $VISITDIR
clearcase_bin/visit-install 1.4.2 linux $VISITDIR
clearcase_bin/visit-install 1.4.2 linux-ia64 $VISITDIR
clearcase_bin/visit-install 1.4.2 osf1 $VISITDIR
clearcase_bin/visit-install 1.4.2 sunos5 $VISITDIR

When running the configure script you can enable or disable certain dependent
packages.  All the configure options are listed at the beginning of the
configure script or can listed by the configure script by typing
"./configure -help".  The most commonly used options are:

  --enable-parallel       make the parallel version
  --disable-scripting     build without Python scripting capability
  --enable-java           build the Java interface library
  --enable-buildall       build all plugins

  --with-hdf5=INC,LIB     Location of HDF5 header and library
  --with-vbt=INC,LIB      Location of VBT/DSL headers and libraries
  --with-saf=INC,LIB      Location of SAF headers and libraries

  --with-exodus[=<DIR>]           enable Exodus driver
  --with-exodus-include[=<DIR>]   specify Exodus include path
  --with-exodus-lib[=<DIR>]       specify Exodus lib path

The enable parallel option builds the parallel version of VisIt.  Parallel
versions are supported on SGI, IBM AIX, Tru64, and some Linux systems.  The
disable scripting option builds VisIt without the Python scripting.  The
enable buildall option builds all the VisIt plugins.  By default, only the
most common plugins are built.

The second group of options are used when building with support for reading
SAF files.  The third group of options are used when building with support
for reading exodus files.

If you have any problems send e-mail to visit-help@llnl.gov.

