May 31, 2019

Grinder - IRAF install

We have a linux machine, recently upgraded to Debian 9. But, we gave up on that, repartitioned the system drive and installed Fedora 30. The Debian system had a variety of weird IRAF installs done by who knows who back in 2015 or so. First I had headaches trying to build our mirror package from source in one of these installs, then trying to run the mirror package gave pointer errors (while it ran fine under Fedora).

First, some packages

It turns out you must have a csh on your system to merely run IRAF, no matter what lies people may tell you, so do this before doing anything else:
su
dnf install tcsh
The "ncurses" library will be needed, as well as "xpa", especially if you want to use DS9.
Installing the libXmu library is recommended.
The 64 bit flavor was already installed.
The 32 bit flavor did need to be installed and pulled in
a load of other 32 bit packages, most X11 related.

su
dnf install ncurses xpa
#dnf install libXmu
dnf install libXmu.i686
Nonetheless, I keep getting this error, trying to start the cl after the install below.
/iraf/iraf/bin.linux64/vocl.e: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
On a system where everything works, this is provided by:
/usr/lib/libncurses.so.5
/usr/lib/libncurses.so.5.9
/usr/lib64/libncurses.so.5
/usr/lib64/libncurses.so.5.9
We can use rpm -qf on that system to find out what package provides these:
rpm -qf /usr/lib/libncurses.so.5.9
ncurses-compat-libs-6.1-10.20180923.fc30.i686
rpm -qf /usr/lib64/libncurses.so.5.9
ncurses-compat-libs-6.1-10.20180923.fc30.x86_64
So, do this:
dnf install ncurses-compat-libs
dnf install ncurses-compat-libs.i686
The second (the "i686" flavor) pulls in some other 32 bit libraries (such as glibc, libgcc, and libstdc++), some of which will almost certainly be important.

Now for IRAF itself

We will put IRAF on the /u1 disk where there is lots of space:
su
cd /u1
mkdir iraf
cd iraf
cp /xxx/iraf-linux.tar.gz .
mkdir iraf_2.16.1
cd /u1
chown -R tom:tom iraf
exit
It is sort of tacky that the distribution tarball does not include the version number as part of the filename. We do the above as root, then the rest as a normal user (namely myself). We ignore the suggestion to create a user named "iraf". Then as myself:
cd /u1/iraf/iraf_2.16.1
tar xf ../iraf_2.16.1.tar.gz
We could have done all this as root, then changed permissions afterwards.

Then as root, do the following:

su
cd /
mkdir iraf
cd iraf
ln -s /u1/iraf/iraf_2.16.1 iraf
cd /iraf/iraf
./install --system
This creates /iraf/cache and /iraf/imdirs -- no telling what they are used for, or if they are truly needed at all. It seems really tacky to have world writeable directories owned by anyone, or by root in this case. But the install script makes them.

The install script also makes a bunch of very important links in /usr/local/bin - which is a good thing, so that once you put /usr/local/bin on your path, you can type "cl" and start up IRAF; along with other things.

What it does not do, which it really should, is make the following links, so I do so myself:

su
cd /usr/local/bin
ln -s /iraf/iraf/vendor/x11iraf/bin.linux/xgterm
ln -s /iraf/iraf/vendor/x11iraf/bin.linux/ximtool
ln -s /iraf/iraf/vendor/x11iraf/bin.linux/ism_wcspix.e
At this point, you are done! At least I am done. Each user should verify that /usr/local/bin is on their path, then:
cd
mkdir iraf
cd iraf
mkiraf


Have any comments? Questions? Drop me a line!

Tom's home page / [email protected]