As of the date of this web page, February 17, 2024, there are no inherent difficulties in compiling and running the Computer Programs in Seismology codes. However as Linux migrates to using the Wayland graphics compositor, I had some concern about X11 support. However. I was able to get everything running on Fedora which uses XWayland.

The instructions below show how to install the compilers and useful software to be able to compile Computer Programs in Seismology and to have a functioning system for research.

Of the distributions below, the author uses Linux Mint, and thus the instructions are current. I have tested the distributions below by installing them using VirtualBox/ 

Linux Distributions

In order to improved the experience of installing Computer Programs in Seismology (CPS), installation was performed on these latest LINUX versions on February 16, 2024.

Mint 21.3 
Ubuntu 23.10
Fedora 39-1.5
Necessary for compilation:

sudo apt-get insall libx11-dev
sudo apt-get install gcc (if not already installed)
sudo apt-get install make (if not already installed)
sudo apt-get isnsall gfortran
sudo apt-get install libncurses-dev
Optional for a functional research platform: These permit viewing PostScript and converting PostScript images from CPS
to PNG for incorporation into web pages and presentations
sudo apt-get install gv
sudo apt-get install imagemagick
For research one may desire GMT
sudo apt-get install gmt

The synaptic packae manager was installed.

sudo apt-get install libx11-dev
sudo apt-get install gcc (if not already installed)
sudo apt-get install make (if not already installed)

sudo apt-get install gfortran
sudo apt-get install libncurses-dev

sudo apt-get install gv
sudo apt-get install imagemagick

sudo apt-get install gmt (this loads gmt-gshhg-high geography.
You can optionally load the full and low resolution)

You may wish to install the synaptic pckage manager for greater control on selections

sudo apt-get install synaptic

sudo yum update
sudo yum install make
sudo yum install gcc
sudo yum install gfortran
sudo yum install libX11
sudo yum install libX11-devel
sudo yum install ncurses-devel

sudo yum install gv
sudo yum install ImageMagick

sudo yum install GMT (this loads gshhg-gmt-nc4 geography.
You can optionally load the GSHHG and GSHHG
full and high resolution)


To compile CPS, do the following
  • Download the latest version which will have a name such as NP330.Oct-26-2023.tgz
  • Unpack in a subdirectory of your choice
    • gunzip -c NP330.Oct-26-2023.tgz | tar xf -
    • cd PROGRAMS.330
    • ./Setup LINUX6440    (For the options, just enter ./Setup)
    • ./C > C.txt  2>&1       (This is the compile and the C.txt will contain a lot of details. If the compile does not work,  look at the C.txt or Email it to the author)
    • cd bin ; ls | wc           (This will indicate the number of programs compiled
  • CAREFULLY edit the .profile or .bash_profile to add a line at the end that reads
    • # set PATH so it includes CPS
      if [ -d "$HOME/PROGRAMS.330/bin" ] ; then
      This assumes that PROGRAMS.330 was installed in the login directory. If it is placed somewhere else, then modify this line. If you have codes in ${HOME}/bin and if you want to easily use executables in the current directory, then also add at the bottom
The revised path will be available on the next login or immediately in the terminal window if one enters
source ~/.profile    or     source ~/.bash_profile
  • To test the installation, try this
    • cd    (return to the login directory
      which gsac
      If you see something like /home/user/PROGRAMS.330/bin/gsac > then everything is ready to run
  • NOTE:  the evalresp-5.0.1 from the EarthScope evalresp page ( uses  the "safer" strlcpy as a replacement for the standard strncpy routine. If the compile gives the warning such as this
     gcc (Ubuntu 11.4.0-ubuntu1-22.04) 11.4.0         
     [Note cc is symbolically linked to /usr/bin/gcc which is 11.4 here] 
                 mxmldoc.c:658:3: warning: implicit declaration of function ‘strlcpy’; did you mean ‘strncpy’? [-Wimplicit-function-declaration]
                   658 |   strlcpy(temp->anchor, anchor, sizeof(temp->anchor));
                       |   ^~~~~~~ 
                       |   strncpy
    then carefully change the 11 instances of strlcpy( in mxmldoc.c to strncpy( and then return to PROGRAMS.330/IRIS and enter the command DOCOMPILE

Notes on ImageMagick

You can use the software download page, or open a terminal window and enter the following commands:

   sudo apt-get install make
   sudo apt-get install gcc
   sudo apt-get install gfortran
   sudo apt-get install xorg-dev
   sudo apt-get install libncurses5-dev
   sudo apt-get install gawk

The following programs are useful:

   sudo apt-get install gv
   sudo apt-get install ImageMagick

ImageMagick is useful tool for converting Encapsulated PostScript to other graphics files. This is useful when creating documents using Microsoft Work or LibreOffice and presentations using MS PowerPoint or LibreOffice Impress. As software is further developed, there are often slight differences that must be accounted for to be useful.

First beware of ImageMagick 7.1.1-8. See the discussion given in the section on MacOS.

Also note that there may be permission problems in creating PNG files from EPS files using ImageMagick. To be able do this,follow these instructions:

   As superuser,  edit /etc/ImageMagick-6/policy.xml 
   e.g., sudo vi /etc/ImageMagick-6/policy.xml 
   or sudo xed /etc/ImageMagick-6/policy.xml
   Change  the lines
   <policy domain="coder" rights="none" pattern="PS" />
   <policy domain="coder" rights="none" pattern="EPS" />
   <policy domain="coder" rights="none" pattern="PDF" />
   <policy domain="coder" rights="none" pattern="XPS" />
   to this:
   <policy domain="coder" rights="read|write" pattern="PS" />
   <policy domain="coder" rights="read|write" pattern="EPS" />
   <policy domain="coder" rights="read|write" pattern="PDF" />
   <policy domain="coder" rights="read|write" pattern="XPS" />