wiki:ASAPFedoraInstall

Version 39 (modified by Malte Marquarding, 14 years ago) ( diff )

--

Fedora Core

The following system packages are needed:

yum -y install cfitsio libstdc++ libgfortran boost python-matplotlib-tk  atlas lapack blas ipython wget wcslib

Binary packages

For standard fedora core 12 as an example (replace fedora-12 part with fedora-n if other binaries are available)

wget http://www.atnf.csiro.au/pub/software/asap/current/asap-3.0.0-fedora-12-x86_64.tar.bz2
tar jxf asap-3.0.0-fedora-12-x86_64.tar.bz2
cd asap-3.0.0-fedora-12-x86_64
su
./install -p /usr/local -m /usr/local/lib64/python2.6/site-packages

Notes

If you something like following error:

Loading ASAP...
------------------------------------------------------------
Traceback (most recent call last):
  File "<string>", line 1, in ?
  File "/usr/lib/python2.5/site-packages/asap/__init__.py", line 314, in ?
    from asap._asap import Log as _asaplog
ImportError: /usr/lib/python2.5/site-packages/asap/_asap.so: cannot
restore segment prot after reloc: Permission denied

Fedora is using SElinux, which makes life hell for the user. Kinda like Windows Vista, protect the system by not allowing the user to use anything

To recitfy the problem as root or sudo execute

chcon -t texrel_shlib_t  /usr/local/lib64/python2.6/site-packages/asap/_asap.so

Alternative: From source

You need to install the corresponding "-devel" packages.

As root

yum -y install gcc-gfortran gcc-c++ flex bison boost-devel python-devel atlas-devel cfitsio-devel python-matplotlib-tk ipython wget make wcslib-devel 

Install rpfits

Note for 64bit you need to go to linux64 and also add -fPIC to CFLAGS and FFLAGS.

wget ftp://ftp.atnf.csiro.au/pub/software/rpfits/rpfits.tar.gz
tar zxf rpfits.tar.gz
cd rpfits/linux
# edit GNUMakefile to use gfortran
perl -pi.bak -e 's/^FC.*$//; s/^FFLAGS.*$//; s/# (FC.*)$/\1/;s/# (FFLAGS.*)$/\1/;s/(LDFLAGS\s+:=).*$/\1 -lgfortran/' GNUmakefile
su
make install
exit
cd -

Install casacore

wget http://casacore.googlecode.com/files/casacore-1.0.1.tar.bz2
tar jxf casacore-1.0.1.tar.bz2
cd casacore-1.0.1
scons --cfitsio-incdir=/usr/include/cfitsio
su
scons install
exit
cd -

Install asap

wget ftp://ftp.atnf.csiro.au/pub/software/asap/current/asap-3.0.1-src.tar.bz2
tar zxf asap-3.0.1-src.tar.bz2
cd asap-3.0.1
scons lapacklibdir=/usr/lib/atlas cfitsioincdir=/usr/include/cfitsio
su # or sudo
scons lapacklibdir=/usr/lib/atlas cfitsioincdir=/usr/include/cfitsio prefix=/usr/local moduledir=/usr/local/lib/python2.6/site-packages install
#or 64bit
#scons lapacklibdir=/usr/lib/atlas cfitsioincdir=/usr/include/cfitsio prefix=/usr/local moduledir=/usr/local/lib64/python2.6/site-packages install
exit

To help out other users please also create a binary package and replace the version fc12 in the following with your version:

scons makedist=fedora-12 lapacklibdir=/usr/lib/atlas cfitsioincdir=/usr/include/cfitsio

Then send a notification to mailto:malte.marquarding@… so I can add it to the ftp area.

Note: See TracWiki for help on using the wiki.