[Ifeffit] compiling ifeffit with pgplot on unix

Bruce Ravel ravel at phys.washington.edu
Mon Jul 28 12:24:59 CDT 2003

Hi folks,

The other day a user of ifeffit on linux asked a question that I have
seen several times now and so thought it would be prudent to explain
the situation on the mailing list.  It is fairly easy to get confused
about the sequence of how things must be installed when installing
ifeffit on a unix machine for the first time.  The explanation below
only applies to unix users (including, but not limited to, linux
users) and does not apply to MS Windows users.  (The situation is
different for OSX users, as well, as indicated by last week's flurry
of email.)

When installing this stuff for the first time on a unix machine, the
correct sequence is:
  1.  install pgplot
  2.  install ifeffit
  3.  install Atoms, Athena, Artemis, GIfeffit, and/or SixPack

The easiest way to install pgplot is to use the PGPLOT_install script
that Matt supplies with the ifeffit source code tarball.  Just unpack
the ifeffit tarball, cd into the build directory, and do

  ~> sh PGPLOT_install

before doing the "./configure; make; make install" incantation.  This
script will try very hard to fetch the pgplot tarball from the web.
Once downloaded, it will unpack it, compile it, and install it
automagically.  Once this is done, go ahead and install ifeffit.

In the future, when you upgrade ifeffit, it should not be necessary to
reinstall pgplot (unless, of course, you have done something to change
things on your computer in the interim).

When pgplot is installed correctly, the "./configure" step on the
installation will end with a message that says something like this:
  ===  ifeffit 1.2.1 Configuration Results:
  ===  linking to PGPLOT with: -L/usr/local/pgplot -lpgplot -lpng -lz 
-L/usr/X11R6/lib -lX11
  ===  ready for next step: type 'make' then 'make install'

Note that in the second line it has correctly identified the location
of the pgplot installation and its library.  It has also identified
several other libraries necessary for drawing stuff to the screen
under X.

If pgplot is not found on your computer, "./configure" will end with a
message like this:

  ===  ifeffit 1.2.1 Configuration Results:
  ===  linking to PGPLOT with: 
  ===  ready for next step: type 'make' then 'make install'

Note that, in this case, the ifeffit library will be linked to
something called `libnopgplot.a'.  This is a stub that allows ifeffit
to continue working as a data analysis tool even in the absence of
pgplot.  That is, you will still be able to import and export data, do
background removals, and so, but you will not be able to plot stuff.
This seems like a good decision that Matt made -- that is, it seems
appropriate that ifeffit should still be functional even in the
absence of pgplot.

Athena and Artemis, however, will not function in the absence of
pgplot.  If pgplot was not found and you did not notice that ifeffit
was linking to libnopgplot.a, then you will not realize that there is
a problem until *after* you have installed one of the GUIs and tried
to run them.  At that point, the program will fail with a variety of
cryptic error messages like so:

  Can't load 
  for module Ifeffit: 
  undefined symbol: pgqndt_ at 
  /usr/lib/perl5/5.8.0/i386-linux-thread-multi/DynaLoader.pm line 229.
  at /usr/bin/athena line 55
  Compilation failed in require at /usr/bin/athena line 55.
  BEGIN failed--compilation aborted at /usr/bin/athena line 59.

The common feature of these error messages is the failure to find
symbols that begin with the letters "pg", as in the 5th line of the
error message I replicated above.

If you run into this situation, the thing to do is to go back to the
beginning.  Install pgplot and make sure that it got installed
correctly.  Then build ifeffit *from scratch*.  It is not enough just
to install pgplot.  You MUST rebuild ifeffit after installing pgplot.
Once ifeffit it rebuilt, go ahead and install one or more of the
GUIs.  Again, it is insufficient just to rebuild ifeffit and not to
rebuild the GUIs.

If you are careful to follow the procedure of installing pgplot, then
ifeffit, then GUIs, you should find that everything will work as

And finally, if you have any questions or suggestions regarding
installation, don't hesitate to ask them here on the mailing list.  If
you ask questions on the mailing list, then everyone can benefit by
the answer.


P.S.  Carlo Segre is kindly packaging ifeffit into Debian package
      files.  This is a *great* way for people to help out with the
      ifeffit project without needing to write code.  If any of you
      are users of Red Hat, SuSE, Mandrake, Connectiva, or any other
      linux distribution (such as the über-cool Gentoo) and wanted to
      contribute packages guaranteed to work on those systems, that
      would be great!  Just let me or Matt know and we will help you
      get started.  The same would be true for anyone using any of the
      commercials unixes (Solaris, SGI, etc.)  which have their own
      packaging systems.
 Bruce Ravel  ----------------------------------- ravel at phys.washington.edu
 Code 6134, Building 3, Room 222
 Naval Research Laboratory                          phone: (1) 202 767 5947
 Washington DC 20375, USA                             fax: (1) 202 767 1697

 NRL Synchrotron Radiation Consortium (NRL-SRC)
 Beamlines X11a, X11b, X23b, X24c, U4b
 National Synchrotron Light Source
 Brookhaven National Laboratory, Upton, NY 11973

 My homepage:    http://feff.phys.washington.edu/~ravel 
 EXAFS software: http://feff.phys.washington.edu/~ravel/software/exafs/

More information about the Ifeffit mailing list