Compiling external packages of IRAF on a 64bit machine 
I have been struggling with this for ages, but I would really give my experience to other people what I found out to get some external packages running on a Fedora Core 6 machine, which is 64bit. For this, I downloaded the standard Redhat binaries (note, 32bit!) from iraf.net. When you want to compile the package that has *no* Redhat binaries for it, you can create them by making the following changes. They are quite general. I've tried them for ifocas and local (the local packages we run here). The recipe is the same for all (read below for pkg the package directory name, or the package name, whatever is appropriate):

Add in pkg/lib/mkpkg.inc to every *FLAGS line the following: -m32, so it should look like:
$set XFLAGS = "$(XFLAGS) -p ifocas -m32"
$set XVFLAGS = "$(XVFLAGS) -p ifocas -m32"
$set LFLAGS = "$(LFLAGS) -p ifocas -m32"

(Ifocas is the used package in this example, but you catch my drift.)

Then in both pkg/src/mkpkg and pkg/mkpkg you add -m32 to each line starting with $link, i.e.:
$link x_focas.o libpkg.a -lc -o xx_focas.e -m32

(so, that's two files to be changed!!)

Finally, if it does not exist, create pkg/bin.redhat

Fix up the $hlib/external.pkg as usual...

Then as iraf user go into cl and type:
cd pkg$
mkpkg -p pkg

And it should compile.

If you have a normal makefile, i.e. you need to type something like make or make ALL, just add -m32 to all *FLAGS and it should compile.

Hope this helps all desperate people out there with 64bit machines. Make sure, of course, that you have always the 32bit libraries installed of everything ;)