PSRCHIVE BUILD NOTES
This file is also located /usr/share/astro/psrhome/PsarchiveBuildNotes.txt
Yuping Huang
02/25/2016
psrchive is built under 64bit and with gfortran as the fortran compiler. Note that they require a 64bit gfortran compiled pgplot. I will start by building psrchive since it well build its dependencies automatically.
—–PSRCHIVE—————
Set $PSRHOME to /usr/share/astro/psrhome/ this is the directory for all the softwares.
Add $PSRHOME/bin to your $PATH variable
$ cd $PSRHOME
Unzip psrcat in the directory (psrcat available at http://www.atnf.csiro.au/people/pulsar/psrcat/download.html). Then add in .cshrc setenv PSRCAT_FILE $PSRHOME/psrcat/psrcat.db
$ mkdir src && cd src
$ git clone git://git.code.sf.net/p/psrchive/code psrchive
$ cd psrchive
$ ./bootstrap
$ ./configure –prefix=$PSRHOME F77=gfortran
Then psrchive will complain about not having required packages. It generetes csh scripts under packages for installation and we will use those
$ cd packages
$./pgplot.csh
Remember to add to .cshrc $PGPLOT_DIR and $PGPLOT_FONTS as the script suggests. In my case it is
setenv PGPLOT_DIR $PSRHOME/pgplot/
setenv PGPLOT_FONTS $PGPLOT_DIR/grfont.dat
You should also add $PGPLOT_DIR to your LD_LIBRARY_PATH in .cshrc.
$./fftw.csh
$./cfitsio.csh
$PSRHOME/x86_64-linux/src/cfitsioTake notes of where the cfitsio source is located. We will need it later. In my case it is under $PSRHOME/src/cfitsio
$source ~/.cshrc
this step validates the changes made to the environmental variables.
$./tempo2.csh
This will install tempo2 but likely pgplot will not be linked and henceforth this is not yet a fully functional tempo2. But it does have the components
that psrchive needs. The tempo2 linked with pgplot will be built seperately later.
You should set your $TEMPO2 variable to the tempo2 runtime directory. In my case it is $PSRHOME/tempo2
$ cd ..
This should bring you back to the psrchive folder where configure is located. Now rerun ./configure. It should not complain about fftw, cfitsio, tempo2 or pgplot
./configure –prefix=$PSRHOME F77=gfortran –with-cfitsio-dir=$PSRHOME/src/cfitsio
If you are still having trouble, look at http://psrchive.sourceforge.net/third/packages.shtml. When I did it it can find everything but cfitsio so I fed in the
–with-cfitsio-dir directory. Now we are ready to build it.
$ make
$ make check
$ make isntall
Done! the binaries should locate in $PSRHOME/bin . You should add it to your $PATH variable.