Linux
Contents
Compiling plplot on GNU-Linux
Prerequisites
List of Debian/Ubuntu packages provides a list of packages needed to configure and compile PLplot successfully. The Debian/Ubuntu package names should be a rough guide for the names of required packages for other Linux distributions.
Quick recipe for building and installing PLplot from a tarball
This quick method should be relevant for most Linux users. Assume the path /home/yourname/plplot exists and is empty. Then do the following steps:
- cd /home/yourname/plplot
- tar -zxf plplot-5.9.5.tar.gz
- cd plplot-5.9.5
- mkdir build_directory
- cd build_directory
- cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/yourname/plplot/install_directory/ ..
- make
- make install
Step (1) changes your directory to the correct starting directory; step (2) unpacks the tarball into the plplot-5.9.2 subdirectory of your starting directory; step (3) changes to that subdirectory; step (4) create a new subdirectory of plplot-5.9.2 where the configuration and build steps will be done; step (5) changes to that; step (6) configures PLplot using the cmake application (n.b. the ".." refers to the top of the source directory tree); step (7) builds PLplot; and step (8) installs PLplot in the /home/yourname/plplot/install_directory directory specified in step (6) as the install prefix.
To summarize, the various directories are:
- the source-tree directory (top-level directory in the tree), /home/yourname/plplot/plplot-5.9.5
- the build-tree directory, /home/yourname/plplot/plplot-5.9.5/build_directory
- the install-tree directory, /home/yourname/plplot/install_directory
For more details consult the generic Unix instructions for our build system.
Other options
The Python and Java interfaces to PLplot are generated with SWIG so if you want those interfaces you must install SWIG. If SWIG is installed and cmake cannot find it, then you must help cmake out by specifying the directory where swig.swg (an important SWIG file) is located using the CMAKE_INCLUDE_PATH environment variable. For example, one of our users reported success with finding SWIG and generating our Python and Java interfaces for Arch Linux by specifying
CMAKE_INCLUDE_PATH=/usr/share/swig/1.3.27
Normally, though, such extraordinary measures are not required on Linux.
Compiling the plplot examples
Following the previous quick recipe for building and installing plplot, here is how to compile the examples:
- cd /home/yourname/plplot/install_directory/share/plplot5.9.5/examples
- make test_noninteractive >& make_test.out
The compilation takes time and a significant amount of files (pdf, png, xfig,...) is generated. For more detail consult Testing PLplot.