Linux

From PLplotWiki
Revision as of 17:28, 10 January 2009 by Airwin (Talk | contribs) (Quick recipe for building and installing PLplot from a tarball)

Jump to: navigation, search

Compiling plplot on GNU-Linux

Prerequisites

List of Debian/Ubuntu packages provides a list about all packages needed to configure and compile PLplot successfully. Even for other Linux distributions you might derive the correct name of the package needed.

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:

  1. cd /home/yourname/plplot
  2. tar -zxf plplot-5.9.2.tar.gz
  3. cd plplot-5.9.2
  4. mkdir build_directory
  5. cd build_directory
  6. cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/yourname/plplot/plplot-5.9.2/install_directory/ ..
  7. make
  8. 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/plplot-5.9.2/install_directory directory specified in step (6) as the install prefix.

For more details consult the generic Unix instructions for our build system.

Other options

Follow the generic Unix commands in the page that links to this page, and normally you should be fine on Linux

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.