View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

install

jhall wrote on Feb 17, 2007

I have installed IRAF and all looks right, but when I type cl, I get the following error

INTERNAL ERROR: parser gagged
cl ()
cl ()
Error while reading login.cl file - may need to rebuild with mkiraf
Fatal startup error. CL dies.

I had no problems installing IRAF, or performong the mkiraf. I tried a new mkiraf, and the login.cl file is the same as my login.cl.OLD file. How do I fix this problem?

Mike Fitzpatrick wrote on Feb 17, 2007

Did you edit the hlib$extern.pkg file or create a local loginuser.cl file? These are both read during the login process and an error in one of them could explain it. You can try typing 'cl' from a directory without a login.cl (e.g. /tmp) to rule out any problems there. Otherwise, what OS and IRAF version is this?

-Mike

jhall wrote on Feb 17, 2007

I have a Mac OSX 10.4.8 and am using IRAF version 2.12.2.
I tried a mkiraf in /tmp, with no problems, but the cl command there gives the same "parser gagged" result. Here is my loginuser.cl file, but I don't think that is the problem.
# customize IRAF login

# force the graphics buffer to be very large
set cmbuflen = 256000
gflush
# some useful routines outside of IRAF - declare a foreign task
# task $mongo = "$foreign"

# load some packages at startup time
imred
ccdred
tables # hubble image proceses
stsdas # hubble image proceses

# define pixel directory
# set imdir=/tmp3/jbarnes/pixels/

# add other commands here but before keep
# Make the delete key work properly in XGterm
!stty erase ^H

# for the FITSUTIL package
#reset fitsutil = /local/fitsutil/
#task fitsutil.pkg = fitsutil$fitsutil.cl
#printf ("reset helpdb=%s,fitsutil$lib/helpdb.mip\nkeep\n",
# envget("helpdb")) | cl
#flpr

keep

Also, in hlib$extern.pkg, I only modified it to uncomment the tables & stsdas packages.

Mike Fitzpatrick wrote on Feb 17, 2007

Try putting a 'd_trace' as the first line of your login.cl file. This may help pinpoint where the problem is, post the last screenfull of text if you don't spot it yourself.

-Mike

jhall wrote on Feb 17, 2007

I get the same message.

[JHALL:~] jhall% cd iraf
[JHALL:~/iraf] jhall% cl
INTERNAL ERROR: parser gagged
cl ()
cl ()
Error while reading login.cl file - may need to rebuild with mkiraf
Fatal startup error. CL dies.
[JHALL:~/iraf] jhall%

Mike Fitzpatrick wrote on Feb 17, 2007

What happens if you 1) try the 'cl' command in a directory with NO login.cl file, and 2) try executing the /iraf/iraf/bin.macosx/cl.e command directly? If d_trace was the first line of your login.cl then it should have printed something, however the hlib$clpackage.cl and hlib$extern.pkg files are read first. Are you sure there isn't something like a ^H or other control char in the extern.pkg file? Does temporarily removing that file fix anything?

-Mike

jhall wrote on Feb 17, 2007

If I try the 'cl' command in a directory without a login.cl file I get the following:

[JHALL:/tmp] jhall% cl
Warning: no login.cl found in login directory
INTERNAL ERROR: parser gagged
cl ()
cl ()
Error while reading login.cl file - may need to rebuild with mkiraf
Fatal startup error. CL dies.
[JHALL:/tmp] jhall%

If I remove extern.pkg, I get the following error:

[JHALL:~/iraf] jhall% cl
ERROR: cannot open `hlib$extern.pkg' for reading
cl ()
cl ()
Error while reading login.cl file - may need to rebuild with mkiraf
Fatal startup error. CL dies.
[JHALL:~/iraf] jhall%

How do I directly execute the /iraf/iraf/bin.macosx/cl.e command ? If I go into the /iraf/iraf/bin.macosx/ directory and type cl, I get the same error:
[JHALL:iraf/iraf/bin.macosx] jhall% cl
Warning: no login.cl found in login directory
INTERNAL ERROR: parser gagged
cl ()
cl ()
Error while reading login.cl file - may need to rebuild with mkiraf
Fatal startup error. CL dies.

Here is my extern.pkg file:

# External (non core-system) packages. To install a new package, add the
# two statements to define the package root directory and package task,
# then add the package helpdb to the `helpdb' list.

reset noao = iraf$noao/
task noao.pkg = noao$noao.cl

reset tables = /iraf/extern/tables/
task tables.pkg = tables$tables.cl

reset stsdas = /iraf/extern/stsdas/
task stsdas.pkg = stsdas$stsdas.cl
task apropos = stsdas$apropos.cl

#reset guiapps = /iraf/extern/guiapps/
#task guiapps.pkg = guiapps$guiapps.cl

#reset rvsao = /iraf/extern/rvsao/
#task rvsao.pkg = rvsao$rvsao.cl

#reset color = /iraf/extern/color/
#reset color.pkg = color$color.cl

#reset fitsutil = /iraf/extern/fitsutil/
#task fitsutil.pkg = fitsutil$fitsutil.cl

reset helpdb = "lib$helpdb.mip\
,noao$lib/helpdb.mip\
,tables$lib/helpdb.mip\
,stsdas$lib/helpdb.mip\
# ,fitsutil$lib/helpdb.mip\
# ,guiapps$lib/helpdb.mip\
# ,rvsao$lib/helpdb.mip\
# ,color$lib/helpdb.mip\
"

keep

Mike Fitzpatrick wrote on Feb 17, 2007

f I try the 'cl' command in a directory without a login.cl file I get the following:

[JHALL:/tmp] jhall% cl
Warning: no login.cl found in login directory
INTERNAL ERROR: parser gagged


This again points to a bad extern.pkg file.

If I remove extern.pkg, I get the following error:

[JHALL:~/iraf] jhall% cl
ERROR: cannot open `hlib$extern.pkg' for reading


Don't remove the file entirely, simply replace it with an empty file (make a backup of your original first)

How do I directly execute the /iraf/iraf/bin.macosx/cl.e command ?


Just execute that command at the unix prompt. I'm beginning to think you have a Scisoft installation so the path may be different but something like "$iraf/bin.macosx/cl.e" should work if you have $iraf defined as a unix environment variable. The extern.pkg looks okay btu a cut-n-paste might have hidden a control char. If you used emacs to edit the file then it's possible the file could have been written witout a needed newline on the last line (see http://iraf.net/phpBB2/viewtopic.php?t=85989 for a similar problem).

-Mike

jhall wrote on Feb 17, 2007

When I use an empty extern.pkg, I get the following(here are just the last few lines):
----- exec builtin task -----
73+2: end
----- task cl -----
55+4: call task
59+9: pushconst `$(less -Cqm $*)'
68+3: absargset $pg
71+2: exec
----- exec builtin task -----
73+2: end
----- task cl -----
55+10: pushconst `home$loginuser.cl'
65+5: pushconst 1
70+4: intrinsic access
74+3: biff +17
77+3: call cl
80+10: pushconst `home$loginuser.cl'
90+2: redirin
92+2: exec
----- exec cl -----
----- task cl -----
96+2: end
----- task cl -----
96+4: call imred
ERROR: task `imred' not found
cl ()
cl ()
cl ()
cl ()
Error while reading login.cl file - may need to rebuild with mkiraf
Fatal startup error. CL dies.

I did use bbedit to modify extern.pkg, but it is set to use Unix breaks by default. From the link to the similar problem, I added the code to automatically set emacs to include the \n character. I opened extern.pkg, saved it and still get the same parser gagged message.

I installed IRAF using a package installer from macsingularity.org and the path to bin.macosx/cl.e is the same as yours. Iraf worked fine until I tried to install the futsutil package. The installation was interrupted and failed. I removed all the fitsutil files and now have this problem. Do you think it whould be easier to just re-install IRAF using the same package. It was pretty simple and quick.

Mike Fitzpatrick wrote on Feb 17, 2007

The output looks normal. The NOAO package is defined in the extern.pkg file, but if that is empty an error about loading imred is expected. Before reinstalling everything, it may be simplest to just recreate the extern.pkg file. There is an 'extern.pkg.DEF' file in hlib you can start with. The installer may have done something to the current file when it failed (I don't know exactly what it does). Th e unix command

 % od -c $hlib/extern.pkg


can reveal any hidden control chars/nulls in the file and verify that there is indeed a \n on the last line.

-Mike

jhall wrote on Feb 17, 2007

There is not a \n after 'keep'. How do I add it?

Mike Fitzpatrick wrote on Feb 17, 2007

You can either fix the emacs properties per the earlier message, or else just use 'vi' to open the file, add a blank line at the end, and the 'ZZ' to quit.

-Mike

jhall wrote on Feb 17, 2007

Thank you very much for your help. The problem is fixed and IRAF loads. I appreciate your patience.

Last post on Feb 17, 2007