View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

Broken symbolic links (moved topic)

Jason Quinn wrote on Feb 23, 2011

I'm starting a new thread for the discussion that rj started in "Possible critical regression in 2.15.1 patch". He writes:

rj

I installed IRAF 2.15.1a from scratch and extern packages "mscred" and "stsdas". In "fitsutil" folder, in the subfolder "lib" there are two unresolved links "libcfitsio.a" and "libmef.a", because the "bin" points to "bin.generic" and not to "bin.linux" (where the targets are). In "mscred" folder the "bin" point to "bin.generic" as well, not to "bin.linux" (the same for "stsdas" and "tables").
For "/iraf/iraf/unix" there is also void link "bin" to "bin.generic" which does not exist. The same to void link "as". The effect of this is that in "hlib" we have unresolved links "libboot.a, libboot_p.a, libos.a, libos_p.a" ("libboot.a" is in both "bin.linux, ...64" and the same "libos.a" but there are no "*_p.a" there).
Back to the "extern" packages. There is no "bin.linux" link to "bin.redhat" in "stsdas" and "tables". Because the "bin" link in both cases point to "bin.generic" we have many unresolved "lib*" links; there is also unresolved link "tables_v313".
Now in "/iraf/iraf/" I do "make check" and I can see the installed packages "is current" message. "make update" gives for all packages: "is not installed" and there is no data in the folders "fitsutil, mscred, stsdas, tables" - all contents removed.


rj

Similar situation with 2.15.1a and the same "externs" exists on the iMac.


Over the years, I have also wondered about the various broken links that appear in the IRAF tree. I was thinking about them just the other day so I'm glad rj brought the topic up.

Running this bash command that finds broken symbolic links

for i in `find /iraf/iraf.2.15.1a -type l`; do [ -e $i ] || ls -l $i; done


I get the following output:

lrwxrwxrwx 1 iraf iraf 17 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libnlfit.a -> ../bin/libnlfit.a
lrwxrwxrwx 1 iraf iraf 15 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libgks.a -> ../bin/libgks.a
lrwxrwxrwx 1 iraf iraf 18 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libinterp.a -> ../bin/libinterp.a
lrwxrwxrwx 1 iraf iraf 18 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libxtools.a -> ../bin/libxtools.a
lrwxrwxrwx 1 iraf iraf 14 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libds.a -> ../bin/libds.a
lrwxrwxrwx 1 iraf iraf 16 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libvops.a -> ../bin/libvops.a
lrwxrwxrwx 1 iraf iraf 18 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libmemdbg.a -> ../bin/libmemdbg.a
lrwxrwxrwx 1 iraf iraf 20 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libtbtables.a -> ../bin/libtbtables.a
lrwxrwxrwx 1 iraf iraf 15 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libcur.a -> ../bin/libcur.a
lrwxrwxrwx 1 iraf iraf 16 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libncar.a -> ../bin/libncar.a
lrwxrwxrwx 1 iraf iraf 15 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libsgi.a -> ../bin/libsgi.a
lrwxrwxrwx 1 iraf iraf 18 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libcurfit.a -> ../bin/libcurfit.a
lrwxrwxrwx 1 iraf iraf 15 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libsys.a -> ../bin/libsys.a
lrwxrwxrwx 1 iraf iraf 13 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libc.a -> ../bin/libc.a
lrwxrwxrwx 1 iraf iraf 18 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libslalib.a -> ../bin/libslalib.a
lrwxrwxrwx 1 iraf iraf 18 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libimfort.a -> ../bin/libimfort.a
lrwxrwxrwx 1 iraf iraf 19 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libgsurfit.a -> ../bin/libgsurfit.a
lrwxrwxrwx 1 iraf iraf 14 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libex.a -> ../bin/libex.a
lrwxrwxrwx 1 iraf iraf 20 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libiminterp.a -> ../bin/libiminterp.a
lrwxrwxrwx 1 iraf iraf 15 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libstg.a -> ../bin/libstg.a
lrwxrwxrwx 1 iraf iraf 16 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libllsq.a -> ../bin/libllsq.a
lrwxrwxrwx 1 iraf iraf 15 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libbev.a -> ../bin/libbev.a
lrwxrwxrwx 1 iraf iraf 15 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libimd.a -> ../bin/libimd.a
lrwxrwxrwx 1 iraf iraf 18 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libsurfit.a -> ../bin/libsurfit.a
lrwxrwxrwx 1 iraf iraf 18 2011-02-22 11:51 /iraf/iraf.2.15.1a/lib/libdeboor.a -> ../bin/libdeboor.a
lrwxrwxrwx 1 iraf iraf 11 2011-02-22 11:51 /iraf/iraf.2.15.1a/unix/bin -> bin.generic
lrwxrwxrwx 1 iraf iraf 10 2011-02-22 11:51 /iraf/iraf.2.15.1a/unix/as -> as.generic
lrwxrwxrwx 1 iraf iraf 16 2011-02-22 11:51 /iraf/iraf.2.15.1a/unix/hlib/libos_p.a -> ../bin/libos_p.a
lrwxrwxrwx 1 iraf iraf 16 2011-02-22 11:51 /iraf/iraf.2.15.1a/unix/hlib/libboot.a -> ../bin/libboot.a
lrwxrwxrwx 1 iraf iraf 18 2011-02-22 11:51 /iraf/iraf.2.15.1a/unix/hlib/libboot_p.a -> ../bin/libboot_p.a
lrwxrwxrwx 1 iraf iraf 14 2011-02-22 11:51 /iraf/iraf.2.15.1a/unix/hlib/libos.a -> ../bin/libos.a
lrwxrwxrwx 1 iraf iraf 15 2011-02-22 11:51 /iraf/iraf.2.15.1a/noao/lib/libsmw.a -> ../bin/libsmw.a
lrwxrwxrwx 1 iraf iraf 20 2011-02-22 11:51 /iraf/iraf.2.15.1a/noao/lib/libasttools.a -> ../bin/libasttools.a
lrwxrwxrwx 1 iraf iraf 9 2011-02-22 11:51 /iraf/iraf.2.15.1a/extern/mscred/bin.redhat -> bin.linux
lrwxrwxrwx 1 iraf iraf 9 2011-02-22 11:51 /iraf/iraf.2.15.1a/extern/mscred/bin -> bin.linux
lrwxrwxrwx 1 iraf iraf 15 2011-02-22 11:51 /iraf/iraf.2.15.1a/extern/fitsutil/lib/libmef.a -> ../bin/libmef.a
lrwxrwxrwx 1 iraf iraf 19 2011-02-22 11:51 /iraf/iraf.2.15.1a/extern/fitsutil/lib/libcfitsio.a -> ../bin/libcfitsio.a
lrwxrwxrwx 1 iraf iraf 17 2011-02-22 11:51 /iraf/iraf.2.15.1a/extern/tables/lib/libgflib.a -> ../bin/libgflib.a
lrwxrwxrwx 1 iraf iraf 20 2011-02-22 11:51 /iraf/iraf.2.15.1a/extern/tables/lib/libtbtables.a -> ../bin/libtbtables.a
lrwxrwxrwx 1 iraf iraf 20 2011-02-22 11:51 /iraf/iraf.2.15.1a/extern/tables/lib/libstxtools.a -> ../bin/libstxtools.a
lrwxrwxrwx 1 iraf iraf 19 2011-02-22 11:51 /iraf/iraf.2.15.1a/extern/tables/lib/libdisplay.a -> ../bin/libdisplay.a
lrwxrwxrwx 1 iraf iraf 20 2011-02-22 11:51 /iraf/iraf.2.15.1a/extern/tables/lib/libuttables.a -> ../bin/libuttables.a
lrwxrwxrwx 1 iraf iraf 17 2011-02-22 11:51 /iraf/iraf.2.15.1a/extern/tables/lib/libgilib.a -> ../bin/libgilib.a
lrwxrwxrwx 1 iraf iraf 11 2011-02-22 11:51 /iraf/iraf.2.15.1a/extern/tables/tables_v313 -> tables_v313
lrwxrwxrwx 1 iraf iraf 14 2011-02-22 11:52 /iraf/iraf.2.15.1a/extern/rvsao/lib/librv.a -> ../bin/librv.a
lrwxrwxrwx 1 iraf iraf 13 2011-02-22 11:52 /iraf/iraf.2.15.1a/extern/rvsao/Util/Old/shdr.h -> ../lib/shdr.h
lrwxrwxrwx 1 iraf iraf 19 2011-02-22 11:52 /iraf/iraf.2.15.1a/extern/stsdas/lib/libf77util.a -> ../bin/libf77util.a
lrwxrwxrwx 1 iraf iraf 18 2011-02-22 11:52 /iraf/iraf.2.15.1a/extern/stsdas/lib/libapplib.a -> ../bin/libapplib.a
lrwxrwxrwx 1 iraf iraf 19 2011-02-22 11:52 /iraf/iraf.2.15.1a/extern/stsdas/lib/libsynphot.a -> ../bin/libsynphot.a
lrwxrwxrwx 1 iraf iraf 18 2011-02-22 11:52 /iraf/iraf.2.15.1a/extern/stsdas/lib/libiraf77.a -> ../bin/libiraf77.a
lrwxrwxrwx 1 iraf iraf 16 2011-02-22 11:52 /iraf/iraf.2.15.1a/extern/stsdas/lib/libcvos.a -> ../bin/libcvos.a
lrwxrwxrwx 1 iraf iraf 17 2011-02-22 11:52 /iraf/iraf.2.15.1a/extern/stsdas/lib/libhstio.a -> ../bin/libhstio.a
lrwxrwxrwx 1 iraf iraf 31 2011-02-22 11:52 /iraf/iraf.2.15.1a/extern/stsdas/python/axesim -> ../pkg/analysis/slitless/axesim


In particular, the "lib" directory has a large number of broken links.

Are these links all used or can some of them be housecleaned?

I've started trying to understand a little bit about the global structure of IRAF but it's really difficult.

Jason

PS I've noticed that the "local" directory seems to be containing the new notes files like notes.v215 whereas the doc directory houses the older notes files. Also the "news" task in IRAF is still pointing to notes on v2.12.

Mike Fitzpatrick wrote on Feb 23, 2011

Over the years, I have also wondered about the various broken links that appear in the IRAF tree. I was thinking about them just the other day so I'm glad rj brought the topic up.


'Broken' is a bit harsh given the explanation: When the system is configured for a particular architecture (e.g. "mkpkg macintel" in $iraf) the $iraf/bin link (which normally points to the empty bin.generic directory) is reset to point to the bin.macintel directory. At that point a $iraf/lib/libsys.a symlink is no longer 'broken' and when compiling the system libs can be checked in/out of the $iraf/lib directory without requiring each mkpkg file in the system to refer to the architecture. Things can be built when the system is configured generically because XC constructs a path to the library based on the environment defs, it is just building the library itself that relies on the links.

You can remove them locally if you like, however the next time you compile the system (e.g. to modify one patched file to fix a bug) you'll end up recompiling the entire system.

PS I've noticed that the "local" directory seems to be containing the new notes files like notes.v215 whereas the doc directory houses the older notes files. Also the "news" task in IRAF is still pointing to notes on v2.12


To fix this just copy the $iraf/local/notes.v215 file to doc$newsfile, I'm not sure most users are even aware of this command.

Robert Janusz wrote on Feb 23, 2011

With broken links the tasks, of external package set as well, do not work properly, of course.

Mike Fitzpatrick wrote on Feb 23, 2011

See the other posting about package installation to make sure the packages are really installed. The links don't matter, but if you're still having problems please post a specific error message.

Last post on Feb 23, 2011