Difference between revisions of "Linux"

From PLplotWiki
Jump to: navigation, search
(fast way with cmake-2.6 on Linux)
Line 1: Line 1:
 +
== Compiling plplot on GNU-Linux ==
 +
 +
=== Quick compilation ===
 +
 +
This very quick way should be relevant for most local usages.
 +
 +
 +
A very simple way does exist to compile plplot-5.9.0 on linux with cmake 2.6.0
 +
(Assuiming we are in path /home/visiteur/GDL/):
 +
 +
# tar -zxf plplot-5.9.0.tar.gz
 +
# cd plplot-5.9.0
 +
# mkdir Compilation
 +
# cd Compilation/
 +
# cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/visiteur/GDL/plplot-5.9.0/Compilation/ ..
 +
# make
 +
# make install
 +
 +
First step (1) is to extract the archive. This will create a directory (plplot-5.9.0/) containing a lot of files and sub-directories ... Please in this directory (step 2), then create a new directory (step 3) where you will put the compilation products. Please go inside this subdirectory (step 4). Let assuming you are working in full directory expansion: /home/visiteur/GDL/plplot-5.9.0/Compilation/
 +
In command 5, you will said to cmake to prepare the makefile for plplot (root of plplot is in ..) with a target in Compilation/
 +
After doing that, you just need to call ''make'' (step 6) then ''make install'' (step 7) which will do the copy of compilation product inside the /home/visiteur/GDL/plplot-5.9.0/Compilation/ subdirectory.
 +
 
 +
 +
=== Other options ===
 +
 
Follow the generic Unix commands in the page that links to this page, and normally you should be fine on Linux
 
Follow the generic Unix commands in the page that links to this page, and normally you should be fine on Linux
  

Revision as of 05:08, 24 June 2008

Compiling plplot on GNU-Linux

Quick compilation

This very quick way should be relevant for most local usages.


A very simple way does exist to compile plplot-5.9.0 on linux with cmake 2.6.0 (Assuiming we are in path /home/visiteur/GDL/):

  1. tar -zxf plplot-5.9.0.tar.gz
  2. cd plplot-5.9.0
  3. mkdir Compilation
  4. cd Compilation/
  5. cmake -DCMAKE_INSTALL_PREFIX:PATH=/home/visiteur/GDL/plplot-5.9.0/Compilation/ ..
  6. make
  7. make install

First step (1) is to extract the archive. This will create a directory (plplot-5.9.0/) containing a lot of files and sub-directories ... Please in this directory (step 2), then create a new directory (step 3) where you will put the compilation products. Please go inside this subdirectory (step 4). Let assuming you are working in full directory expansion: /home/visiteur/GDL/plplot-5.9.0/Compilation/ In command 5, you will said to cmake to prepare the makefile for plplot (root of plplot is in ..) with a target in Compilation/ After doing that, you just need to call make (step 6) then make install (step 7) which will do the copy of compilation product inside the /home/visiteur/GDL/plplot-5.9.0/Compilation/ subdirectory.


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.