[daip] Error message on running LOGIN.CSH

R. Craig Walker cwalker at nrao.edu
Sat Dec 3 22:09:49 EST 2022


On my Mac Pro, I have been getting an error message every time I create a
new X11 session (X11 etc - even just saying tcsh in my xterm), even when
not running AIPS.  My .tcshrc is being invoked which in turn sets up aips.
 I just installed aips on my new Mac Studio and it works - at least it
passes the 2+2 test.  But I am getting the same error message so I decided
to look into this a bit and I think I've found the problem.

The error message is:
DYLD_LIBRARY_PATH: Undefined variable.

I ran grep for DYLD on the setup files in /Users/aips and found it in two
places in AIPSPATH.CSH.  The two lines are in the following segment:

#                                       LIBRARY_PATH: sync'd systems
   if (-f $SYSLOCAL/RSYNC.ME || -f $SYSLOCAL/RSYNC.MASTER) then
      if ("$ARCH" == "MACINT" || $ARCH == "MACARM") then
         set TPATH = `echo $DYLD_LIBRARY_PATH | sed 's/^://' | sed 's/:$//'`
      else if ("$ARCH" == "LINUX" || $ARCH == "LNX64") then
         set TPATH = `echo $LD_LIBRARY_PATH | sed 's/^://' | sed 's/:$//'`
      endif
      set local = "${AIPS_VERSION}/${ARCH}/LIBR/INTELCMP"
      set tempath = ""
      foreach d (`echo $TPATH | sed 's/:/ /g'`)
         switch ($d)
            case "$local":
               breaksw
            default:
               set tempath = "${tempath}${d}:"
               breaksw
         endsw
      end
      set tempath = "${tempath}${local}"
      if ("$ARCH" == "MACINT" || $ARCH == "MACARM") then
         setenv DYLD_LIBRARY_PATH `echo $tempath | sed 's/:$//'`
      else if ("$ARCH" == "LINUX" || $ARCH == "LNX64") then
         setenv LD_LIBRARY_PATH `echo $tempath | sed 's/:$//'`
      endif
   endif

It looks to me like DYLD_LIBRARY_PATH is used before it is defined.
I tried moving the definition to before the setting of TPATH, but ran
into trouble with tempath which is now the undefined item.

So it looks like the script uses DYLD_LIBRARY_PATH to set TPATH.
Then it uses TPATH to set tempath.
Then it uses tempath to set DYLD_LIBRARY_PATH.

So it's chasing its tail.  I don't feel comfortable at this point
trying to fix it, but I doubt it is very hard.  One symptom that makes
sense is that, if you run the LOGIN twice, you don't get the error the
second time, presumably because the DYLD_LIBRARY_PATH is previously
defined.

Cheers,
Craig




-------------------------------------------
    R. Craig Walker
    1305 Vista Dr.
    Socorro NM  87801  USA
    cwalker at nrao.edu
    Phone  575 835 3972
       Retired with emeritus position
       National Radio Astronomy Observatory
       P. O. Box O, Socorro, NM 87801 USA
-------------------------------------------




More information about the Daip mailing list