My IRAF install has a directory /iraf/iraf/extern. I make a directory "mirror" in here and untar a copy of the entire SPARC package here to get started.
On an intel based system, the question is whether to build 32 or 64 bit packages. To work with 32 bit, define the IRAFARCH environment variable to be "linux". To work 64 bit, define it to be linux64. I will do my development 32 bit.
Now an important note. IRAF development using anything other than the csh is completely broken. I have had nothing but misery including crazy recursive bash loops that hung my system requiring a reboot. So forget using bash. I created a fictitious user with the csh as a login shell just to do IRAF development, and that improved my life.
The next thing is to set a bunch of environment variables. I simply made a .cshrc for that user that looks like this:
setenv iraf /iraf/iraf/ setenv IRAFARCH linux setenv mirror /iraf/iraf/extern/mirror/ source /iraf/iraf/unix/hlib/irafuser.cshA significant part of the problem (other than nasty bugs in the bash scripts provided with the current IRAF release) is that the IRAF development system (such that it is) makes heavy use of aliases, which do not propogate to child processes in the nice way that enviroment variables do. Consider this (if you care):
$ which mkpkg /usr/local/bin/mkpkg $ ls -l /usr/local/bin/mkpkg lrwxrwxrwx 1 root root 35 Jan 4 16:10 /usr/local/bin/mkpkg -> /iraf/iraf/unix/bin.linux64/mkpkg.e $ source /iraf/iraf/unix/hlib/irafuser.sh $ which mkpkg alias mkpkg='/iraf/iraf/unix/bin.linux/mkpkg.e' /iraf/iraf/unix/bin.linux/mkpkg.eI tried using the BASH_ENV variable to specify a file with all the baloney that is necessary, but then ugly things began to happen and I went back to using the csh.
Before I got involved in the nasty recursive bash things that hung my system, I was having issues where mkpkg would build a 64 bit xx.o file, then try to link it against 32 bit libraries. This was related to the lack of alias propogation to child processes. The whole intensive use of aliases in the build system is a bad idea, and clearly only works properly with the csh.
dnf install glibc.i686 dnf install glibc-devel.i686 dnf install ncurses-compat-libs.i686When I try to run mkpkg, I get this:
$ mkpkg -p mirror linux bash: /iraf/iraf/unix/bin.linux/mkpkg.e: No such file or directoryBut in fact, the file mkpkg.e exists and is executable. What is going on? This is a highly misleading error message. What is actually going on is that certain 32 bit libraries are missing. (namely glibc.i686 from the list above).
cd /iraf/iraf/extern/mirror mkpkg -p mirror linux mkpkg -p mirror >& spool mkpkg -p mirror summaryThe game is to look at "spool" to make sure there are no errors.