- First, download the source for Mesa, gtkglarea, python, pygtk,
gtk/gdk/glib, gtk+extra, python-gtkextra, gnuplot,
and proj (for gnuplot and proj, just the binary executables and
library are fine). Note that OpenEV uses gtk 1.2.x and pygtk 0.6.x,
not gtk 2.x and pygtk 1.99.x.
- Optionally, create a new directory to install the libraries in. You could
install directly to your system directories, but new versions of gtk/Mesa in
particular might not mesh with other applications, so a new
directory is safest.
- Create a "build_setup.csh" setup file to set your paths
to point to the new installation directory first. This is
important for ensuring that the correct libraries are found for those
packages that depend on others (eg. pygtk). The following example
assumes that the newly-built libraries have been installed in
/data/local_installations.:
# setup for openev/gdal, other builds
setenv PATH "/data/local_installations/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/bin:/opt/bin:/usr/X11R6/bin:/usr/X11R6/bin"
setenv PYTHONHOME "/data/local_installations"
setenv LD_LIBRARY_PATH "/data/local_installations/lib"
On solaris and irix, the standard directories will be different, and
you may have to add other paths to your LD_LIBRARY_PATH (after
the new directory path). Source this setup script before doing any
building.
- On irix, you may also have to set the environment variable CPP to be
"gcc -E" if the default preprocessor is a Kernaghan & Ritchie one (this
might be the case if configure complains about the presence of
elif's in headers).
- On solaris, if the build stops with messages about "Relocation errors",
you might have to add "-fPIC" to the C and C++ compile options in the
Makefile.
- On irix or solaris, if you get messages about "Undefined symbols",
make sure that all the necessary headers are in the include path in
the Makefile, and that the most up-to-date header is the one being
used by the Makefile (directories with the latest builds should be first
in the include list).
- You may also have to play with the CC, CXX/CPP, and LD_SHARED
variables in the Makefile if OpenEV is to work with applications
built with a specific version of C/C++ compilers.
- Configure and build and install glib:
./configure --prefix=/data/local_installations
make
make install
- Configure and build and install gtk:
./configure --prefix=/data/local_installations --with-glib-prefix=/data/local_installations
make
make install
- Configure and build and install Mesa
./configure --prefix=/data/local_installations
make
make install
- Configure and build and install gtkglarea
./configure --prefix=/data/local_installations --with-gtk-prefix=/data/local_installations --with-GL-prefix=/data/local_installations --with-lib-GL
make
make install
- Configure and build Python, (this configuration is without threads).
./configure --with-threads=no --prefix=/data/local_installations
make
make install
- Install the python extensions:
python setup.py install
- Download and install Numeric python.
python setup.py install
- Configure and make and install pygtk:
./configure --prefix=/data/local_installations --with-gtk-prefix=/data/local_installations --with-gl-prefix=/data/local_installations --with-gtkgl-prefix=/data/local_installations --disable-imlibtest --disable-gdk-pixbuftest --disable-thread
make
make install
- Configure and make and install gtk+extra:
./configure --prefix=/data/local_installations --with-gtk-prefix=/data/local_installations
make
make install
- Install python-gtkextra:
python setup.py install
cd /data/local_installations/lib/python?.?/site-packages
mv gtkextra pygtkextra
The last move avoids namespace conflicts with OpenEV's GtkExtra on Windows.
- Configure and make and install proj:
./configure --prefix=/data/local_installations
make
make install
- Check out and build GDAL:
setenv CVSROOT :pserver:anonymous@cvs.remotesensing.org:/cvsroot
cvs login
password: anonymous
cvs checkout gdal
cd gdal
./configure --with-libz=internal --with-png=internal --with-libtiff=internal --with-geotiff=internal
make
The options included here force gdal to compile with internal code rather than using
other libraries for png/libz/libtiff/geotiff (in case end users do not have these libraries installed).
- Check out and build OpenEV:
cvs -d:pserver:anonymous@cvs.OpenEV.sourceforge.net:/cvsroot/openev login
password:
cvs -z3 -d:pserver:anonymous@cvs.OpenEV.sourceforge.net:/cvsroot/openev co openev
./configure --with-gtk-prefix=/data/local_installations --with-gl-prefix=/data/local_installations --with-gtkgl-prefix=/data/local_installations --prefix=/data/local_installations --with-ogr
make
You may have to adjust the makefiles (Makefile and pymod/Makefile) to find the necessary headers on solaris/irix (configure doesn't always work properly). In particular, "-I/data/local_installations/include" may need to be added to Makefile and pymod/Makefile depending on where gtk/glib installed the headers.
- Creating a distribution: There is a "mkdist" script in OpenEV's "delivery" directory that will
copy the necessary files into two directories under "delivery"- "common", and "(Platform)", where
(Platform) is either Linux, IRIX64, or SunOS. You will have to edit mkdist to find the libraries
properly on your machine before running it, and may have to change the version numbers. Prior to running mkdist,
you should make sure that none of your local files are in the openev directories
(especially pymod), as they will be copied to the distribution. It is best to build a release from clean
openev/gdal builds. After this, you will need to set the permissions on the files properly, eg.:
#!/bin/sh
# Sets file permissions in deliverable.
openev_DIR=`pwd`
platform_NAME=`uname -s`
case "${platform_NAME}" in
"Linux") plat_DIR="${openev_DIR}/Linux";;
"SunOS") plat_DIR="${openev_DIR}/SunOS";;
"IRIX64") plat_DIR="${openev_DIR}/IRIX64";;
*) echo "Unknown Platform! Exiting..."; exit 1;;
esac
common_DIR="${openev_DIR}/common"
cd "${plat_DIR}"
find . -type f -exec chmod a+r {} \;
find . -type d -exec chmod 755 {} \;
find . -name "*.so*" -exec chmod 755 {} \;
find . -name "openev.py" -exec chmod 755 {} \;
find . -name "openev" -exec chmod 755 {} \;
find . -name "python" -exec chmod 755 {} \;
find . -name "gdaladdo" -exec chmod 755 {} \;
find . -name "gdalinfo" -exec chmod 755 {} \;
find . -name "gdal_translate" -exec chmod 755 {} \;
find . -name "gvtest" -exec chmod 755 {} \;
cd "${common_DIR}"
find . -type f -exec chmod a+r {} \;
find . -type d -exec chmod 755 {} \;
After running mkdist, you must also be sure to create links in the lib directory to
match those in the installation you copied from, and to change the ownership and group of both common and (Platform) recursively to "root".
The common and (Platform) directories can then be tarred up for distribution.