≡ Menu

Installing VPFIT

If you want to install VPFIT on Ubuntu 11.04, doing the following I have a 50% success rate.

mkdir vpfitInstall
cd vpfitInstall
tar -xvzf ../vpfit10.tar.gz # Or whatever version you have

I would like to thank Martin Sparre for sending me an additional flag to add to the makefile to let VPFIT compile on more recent versions of Ubuntu.

For VPFIT version 10, the documentation is in the docs folder. There is also a README file named 00README which is worth taking a look at.

sudo apt-get install libcfitsio3 libcfitsio3-dev -y
sudo apt-get install libx11-dev -y
sudo apt-get install libxext-dev libxext6-dbg -y
sudo apt-get install libpng12-dev -y
sudo apt-get install pgplot5 -y
sudo apt-get install gfortran -y

Change in makefile:

cfitsx = /usr/lib/libcfitsio.a
pgpltx = /usr/lib/libpgplot.a

add flags “-lpng -lpthread” in makefile like so:

vpflx: vpgti.o $(vpobj)
  $(LINK.f) -o vpfit vpgti.o $(vpobj) \
  $(pgpltx) $(cfitsx) \
  -L/usr/X11R6/lib -lX11 -lXext \
  -L/usr/lib -ldl -lm -lnsl -lpng -lpthread

rdglx: rd_gen.o $(rdobj)
  $(LINK.f) -o rdgen rd_gen.o $(rdobj) \
  $(cfitsx) $(pgpltx) \
  -L/usr/X11R6/lib -lX11 -lXext \
  -L/usr/lib -ldl -lm -lnsl -lpng -lpthread

2014-04-22 Edit: Pasquier Noterdaeme notes that the following changes let him compile vpfit 10 on Ubuntu 14.04 64

cfitsx = /usr/lib/x86_64-linux-gnu/libcfitsio.a
pgpltx = /usr/lib/libpgplot.a

also changed /X11R6/lib to /usr/lib/x86_64-linux-gnu then added “-lz” at the end of the commands:

vpflu: vpgti.o $(vpobj)
    $(LINK.f) -o vpfit vpgti.o $(vpobj) \
    $(pgpltx)   $(cfitsx) \
    -L/usr/lib/x86_64-linux-gnu -lX11 -lXext \
    -L/usr/lib -ldl -lm -lnsl -lpng -lpthread -lz

rdglu: rd_gen.o $(rdobj)
    $(LINK.f) -o rdgen rd_gen.o $(rdobj) \
    $(cfitsx) $(pgpltx) \
        -L/usr/lib/x86_64-linux-gnu -lX11 -lXext \
        -L/usr/lib -ldl -lm -lnsl -lpng -lpthread -lz
make vpflx
make rdglx

The following is how I move the directory into place.

VPVAR=/usr/local/vpfit-10.0-2011-05-05
 
sudo mkdir $VPVAR # Make directory for vpfit
sudo cp vpfit $VPVAR
sudo cp rdgen $VPVAR
sudo cp rd_prhelp.dat $VPVAR
sudo mkdir $VPVAR/Setup
sudo cp vp_setup.dat $VPVAR/Setup
sudo cp atom.dat $VPVAR/Setup

Then I add a symbolic link from the executable to /usr/local/bin/vpfit and add the relevant shell variables.