Welcome to iraf.net Thursday, April 18 2024 @ 02:49 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 IRAF v2.16 fails at startup in mac os x 2.8 (mountain lion)
   
jlowenthal
 09/05/2012 02:12PM (Read 10991 times)  
+----
Newbie

Status: offline


Registered: 08/03/2007
Posts: 5
On a new imac with 2.8 GHz Intel Core i7 running os x 10.8.1, I've tried installing IRAF several ways, especially: (1) using the scisoft distribution, and (2) using the binaries in iraf-macosx.tar.gz downloaded from iraf.net. The install script returned "OK" to everything and said "Installation Completed With No Errors".I ran mkiraf to initialize the uparm and login.cl.But when I start up terminal or XQuartz (was x11), call up an xgterm, and try to start IRAF, I get this error message:bash-3.2$ ecl
** Syntax error
**: if (!defvar("helpdb")) {
^
**: }
^
ERROR: syntax error
called as: `cl ()'
called as: `cl ()'
Error while reading login.cl file - may need to rebuild with mkiraf
Fatal startup error. CL dies.
bash-3.2$ I've tried rebuilding login.cl and also copying one over from another computer; same error. Thanks for any help!James Lowenthal
Smith College

 
Profile Email Website
 Quote
fitz
 09/05/2012 02:12PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
The "if (!defvar("helpdb"))' line isn't part of any of the core IRAF startup scripts, neither is it in anything in SciSoft from what I can tell, so I'm guessing this is either a local loginuser.cl file or some modification to the login.cl file that you've made.The syntax error is probably coming from a known CL quirk where an if-statement sometimes needs to be terminated by a semicolon to avoid an ambiguity in determining whether an 'else' is expected. That is, the code might need to be something like[code:1:76ddf1f555]
if (!defvar ("helpdb")) {
....some stuff
}
;
[/code:1:76ddf1f555]If you still have problems and have a loginuser.cl file feel free to post it (or try moving it temporarily to verify that fixes the problem).

 
Profile Email
 Quote
tfish13
 09/05/2012 02:12PM  
+----
Newbie

Status: offline


Registered: 07/28/2010
Posts: 4
I too am having problems at startup, with near identical set up as James (instead using a 2.6 GHz MacBook Pro) where starting IRAF results with:bash-3.2$ cl
/iraf/irafbin.macintel/vocl.e not found
/iraf/irafbin.macintel/vocl.e: Command not found.Many of these forums show that 'Command not found' means that the path is incorrect, which I would guess makes sense as I assume there should be another '/' between the second iraf and bin.macintel? Trying to use the new path results in:bash-3.2$ /iraf/iraf/bin.macintel/cl.e
task 'cl' has no param file
Fatal startup error. CL dies.SAD! Is there somewhere where I am incorrectly setting a path that could easily fix this?

 
Profile Email
 Quote
fitz
 09/05/2012 02:12PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
In this case it sounds more like a value of $iraf is being set without the trailing '/', e.g. in your .cshrc you have something likesetenv iraf /iraf/irafinstead ofsetenv iraf /iraf/iraf/Even though you explicitly give a path to a CL binary, the $iraf value is used in constructing other paths in the system, and when those are incorrect you see the 'has no param file' message. Note that if you don't define $iraf in your .login or .cshrc, it might be defined in e.g. a scisoft 'Setup.csh' that's loaded in there. If it isn't defined at all, look at the /usr/include/iraf.h to see how it is set there, if its missing the '/' then you should rerun the install script to specify the path *with* a trailing '/'.

 
Profile Email
 Quote
tfish13
 09/05/2012 02:12PM  
+----
Newbie

Status: offline


Registered: 07/28/2010
Posts: 4
This turned out to be true. The reason I was getting hung up is that I had set export iraf=/iraf/iraf/ in the root directory while setting it without the final '/' in the home directory. Embarassing. Thanks for the help!

 
Profile Email
 Quote
jlowenthal
 09/05/2012 02:12PM  
+----
Newbie

Status: offline


Registered: 08/03/2007
Posts: 5
Still stuck on... ** Syntax error
**: if (!defvar("helpdb")) { ...problem. Thanks, fitz, for your suggestions, but: no, there is no loginuser.cl, and the login.cl file has no such line. I rebuilt login.cl with mkiraf too, but no change.Another user emailed me another suggestion that didn't work: he said he'd found and commented out some lines of code including the offending
**: if (!defvar("helpdb")) {
in the file hlib$extern.pkg, and that IRAF then started up fine. But my extern.pkg does not have that line either.In fact I did a global whole-computer search on the string "defvar" using the imac spotlight, and didn't come up with anything obviously relevant.

 
Profile Email Website
 Quote
fitz
 09/05/2012 02:12PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Try adding the line "d_trace" to the top of your login.cl file to see whether that reveals where the line if coming from. If not, then do the same to hlib$clpackage.cl which is called earlier and does things like the extern.pkg file. Like I said, this isn't in the core system scripts so is likely either from an external package or some local modification in scisoft.

 
Profile Email
 Quote
fitz
 09/05/2012 02:12PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
I found out recently this 'defvar' is coming from a script called 'install_helper' in some STScI distribution of STSDAS/TABLES/STCECF. The syntax is actually invalid and should be replaced with[code:1:00c3fce35e]
if (defvar("helpdb") == no) {
:
[/code:1:00c3fce35e]Either make the change in the hlib$extern.pkg file or the template used by install_helper in stsci_iraf_x/release_tools/extern.pkg.protoIf you're using v2.15 or later the dynamic package installation will do just as well to install STSDAS.

 
Profile Email
 Quote
fitz
 09/05/2012 02:12PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
[color=darkred:0ddfeb11e8][Moderator Note: posted on behalf of mrawls@nmsu.edu][/color:0ddfeb11e8]I had the very same problem with the 'defvar' syntax error when I tried to install IRAF v2.16 on OSX Mountain Lion on my Retina Macbook Pro. I had to dig quite a bit to find the proper extern.pkg file to edit. For me, the offending file was located in the directory/usr/local/scisoft/packages/iraf/iraf/unix/hlibOnce I cd-ed there and edited extern.pkg as directed, I redid mkiraf in my xgterm, typed cl, and was on my way! What an obnoxious little bug. It was particularly frustrating because I have two other instances of extern.pkg on my machine (one called extern.pkg and the other called extern.pkg.proto, both in similarly buried scisoft-related directories) which I found first and edited to no avail.

 
Profile Email
 Quote
raybutler
 09/05/2012 02:12PM  
+----
Newbie

Status: offline


Registered: 06/24/2008
Posts: 7
I just had the exact same problem (Scisoft on a new MacMini, OSX Mountain Lion). I followed the instructions in the last two posts [the code change by fitz, in the file pointed out by mrawls via fitz], and that fixed it. Big GrinMany thanks guys!!

Dr. Ray Butler School of Physics (Lecturer) | Centre for Astronomy National University of Ireland - Galway, Ireland
 
Profile Email Website
 Quote
paulartcoelho
 01/29/2015 05:12PM  
++---
Junior
happy

Status: offline


Registered: 03/09/2006
Posts: 18
Just to point out that as of today, Jan 29th 2015, with Scisoft 2013.6.1 installed yesterday, this fix still holds. Thanks Mike!

 
Profile Email
 Quote
   
Content generated in: 0.40 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login