Welcome to iraf.net Friday, March 29 2024 @ 07:46 AM GMT


 Forum Index > Help Desk > Systems New Topic Post Reply
 Problem logging into IRAF
   
Anonymous: Guest
 01/20/2006 12:29AM (Read 8195 times)  



Hello,I'm having trouble getting IRAF to work. It work last week, but when I
close the xgterm, and reopen one and tried running cl I got the following
error:
Badly placed ()'s.I've tried logging in from a SUN machine, and two linux boxes and I still
get this message. I've ran mkiraf, and I still get this error.Also, I still get this error when I tried going into a directory without a
LOGIN.CL file.I'm not sure if the problem is with my LOGIN.CL file or perhaps my shell.I've seen this error when I source AIPS, but that was fixed by switching
my shell to bash and sourcing the corresponding AIPS file.FYI: I tried typing cl in both csh, tcsh, and bash.Thank you
- Chun Ly

 
 Quote
fitz
 01/20/2006 12:29AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
The message is coming from the C-shell, and since the 'cl' command is actually a C-shell startup script, and given your other symptoms, the problem is most likely in your .cshrc file. The simplest way to find the problem line is with csh -x ~/.cshrcto trace the script. Once you find the error and fix it you should be okay, be
sure to also check any files that your .cshrc might source.-Mike

 
Profile Email
 Quote
chunly
 01/20/2006 12:29AM  
+----
Newbie

Status: offline


Registered: 01/25/2006
Posts: 3
Dear Mike. I've tried what you suggested, and it isn't my .cshrc fileI believe it has to do with IRAF source files:
I reran cl: csh -x /usr/local/bin/cl and got the following:
[chun@seyfert ~]$ csh -x /usr/local/bin/cl
setenv iraf /usr/local/pkg/iraf/iraf/
setenv host /usr/local/pkg/iraf/iraf//unix/
setenv hlib /usr/local/pkg/iraf/iraf//unix/hlib/
setenv hbin /usr/local/pkg/iraf/iraf//unix/bin/
source /usr/local/pkg/iraf/iraf//unix/hlib/irafuser.csh
if ( -f /etc/redhat-release ) then
if ( `uname -m` == ppc ) then
uname -m
setenv MACH redhat
endif
else if ( -f /etc/SuSE-release ) then
if ( redhat == darwin ) then
setenv hostid unix
setenv host /usr/local/pkg/iraf/iraf/unix/
setenv hlib /usr/local/pkg/iraf/iraf/unix/hlib/
setenv hbin /usr/local/pkg/iraf/iraf/unix/bin.redhat/
setenv tmp /tmp/
setenv CC gcc
setenv F77 /usr/local/pkg/iraf/iraf/unix/hlib//f77.sh
setenv F2C /usr/local/pkg/iraf/iraf/unix/bin.redhat//f2c.e
setenv RANLIB ranlib
Badly placed ()'s.I've also turn on verbose to see what happen:
[chun@seyfert ~]$ csh -v /usr/local/bin/clsetenv iraf /usr/local/pkg/iraf/iraf/
setenv host $iraf/unix/
setenv hlib $iraf/unix/hlib/
setenv hbin $iraf/unix/bin/
source $iraf/unix/hlib/irafuser.cshif ( -f /etc/redhat-release ) then
if ( `uname -m` == "ppc" ) thensetenv MACH redhat
endif
else if ( -f /etc/SuSE-release ) thenif ( $MACH == "darwin" ) thensetenv hostid unix
setenv host ${iraf}unix/
setenv hlib ${iraf}unix/hlib/
setenv hbin ${iraf}unix/bin.$MACH/
setenv tmp /tmp/
setenv CC gcc
setenv F77 $hlib/f77.sh
setenv F2C $hbin/f2c.e
setenv RANLIB ranlibswitch ( $MACH )
Badly placed ()'s.I don't know much about IRAF's structure. I never encountered this problem before with IRAF. Any ideas?

 
Profile Email
 Quote
fitz
 01/20/2006 12:29AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
[quote:0730eb37b6]setenv hostid unix
setenv host /usr/local/pkg/iraf/iraf/unix/
setenv hlib /usr/local/pkg/iraf/iraf/unix/hlib/
setenv hbin /usr/local/pkg/iraf/iraf/unix/bin.redhat/
setenv tmp /tmp/
setenv CC gcc
setenv F77 /usr/local/pkg/iraf/iraf/unix/hlib//f77.sh
setenv F2C /usr/local/pkg/iraf/iraf/unix/bin.redhat//f2c.e
setenv RANLIB ranlib [/quote:0730eb37b6] You've apparently got some sort of modified cl.csh script, none of this (and some other output) is in the script that comes with the standard system. The MACH variable is getting set but the error is in the switch statement someplace. Please post the entire script if you can't figure it out. Any idea how the script was modified and by whom?-Mike

 
Profile Email
 Quote
chunly
 01/20/2006 12:29AM  
+----
Newbie

Status: offline


Registered: 01/25/2006
Posts: 3
IRAF was installed by the system admin. I hope we can find out what the problem is so I can tell them how to fix it.Here's the script, /usr/local/pkg/iraf/iraf/unix/hlib/irafuser.csh:
# IRAF definitions for the UNIX/csh user. The additional variables iraf$ and
# home$ should be defined in the user's .login file.if (-f /etc/redhat-release) then
if (`uname -m` == "ppc") then
setenv MACH linuxppc
else
setenv MACH redhat
endif
else if (-f /etc/SuSE-release) then
setenv MACH suse
else
setenv MACH `uname -s | tr '[A-Z]' '[a-z]'`
endifif ($MACH == "darwin") then
setenv MACH macosx
endifsetenv hostid unix
setenv host ${iraf}unix/
setenv hlib ${iraf}unix/hlib/
setenv hbin ${iraf}unix/bin.$MACH/
setenv tmp /tmp/# Default to GCC for compilation.
setenv CC gcc
setenv F77 $hlib/f77.sh
setenv F2C $hbin/f2c.e
setenv RANLIB ranlibswitch ($MACH)
case freebsd:
setenv HSI_CF "-O -DBSD -w -Wunused"
setenv HSI_XF "-Inolibc -/DBSD -w -/Wunused"
setenv HSI_FF "-O"
setenv HSI_LF "-static"
setenv HSI_F77LIBS ""
setenv HSI_LFLAGS ""
setenv HSI_OSLIBS "-lcompat"
set mkzflags = "'lflags=-z' -/static"
breakswcase macosx:
setenv CC cc
setenv CC_f2c cc
setenv F2C $hbin/f2c.e setenv HSI_CF "-O -DMACOSX -w -Wunused"
setenv HSI_XF "-Inolibc -/DMACOSX -w -/Wunused"
setenv HSI_FF "-O"
setenv HSI_LF ""
setenv HSI_F77LIBS ""
setenv HSI_LFLAGS ""
setenv HSI_OSLIBS ""
set mkzflags = "'lflags=-z'"
breakswcase linux:
setenv HSI_CF "-O -DLINUX -DPOSIX -DSYSV -w -Wunused"
setenv HSI_XF "-Inolibc -w -/Wunused"
setenv HSI_FF "-O"
setenv HSI_LF "-Wl,-Bstatic"
setenv HSI_F77LIBS ""
setenv HSI_LFLAGS ""
setenv HSI_OSLIBS ""
set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'"
breakswcase redhat:
setenv HSI_CF "-O -DLINUX -DREDHAT -DPOSIX -DSYSV -w -Wunused"
setenv HSI_XF "-Inolibc -w -/Wunused"
setenv HSI_FF "-O"
setenv HSI_LF "-Wl,-Bstatic"
setenv HSI_F77LIBS ""
setenv HSI_LFLAGS ""
setenv HSI_OSLIBS ""
set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'"
breakswcase suse:
setenv HSI_CF "-O -DSUSE -DLINUX -DPOSIX -DSYSV -w -Wunused"
setenv HSI_XF "-Inolibc -w -/Wunused"
setenv HSI_FF "-O"
setenv HSI_LF "-Wl,-Bstatic -specs=/iraf/iraf//unix/bin.suse/gcc-specs"
setenv HSI_F77LIBS ""
setenv HSI_LFLAGS ""
setenv HSI_OSLIBS ""
set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'"
breakswcase sunos:
setenv HSI_CF "-O -DSOLARIS -DX86 -DPOSIX -DSYSV -w -Wunused"
setenv HSI_XF "-Inolibc -w -/Wunused"
setenv HSI_FF "-O"
#setenv HSI_LF "-t -Wl,-Bstatic"
#setenv HSI_LFLAGS "-t -Wl,-Bstatic"
#setenv HSI_OSLIBS \
# "-lsocket -lnsl -lintl -Wl,-Bdynamic -ldl -Wl,-Bstatic -lelf"
setenv HSI_LF "-t"
setenv HSI_F77LIBS ""
setenv HSI_LFLAGS "-t"
setenv HSI_OSLIBS "-lsocket -lnsl -lintl -ldl -lelf"
set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'"
breakswcase linuxppc:
setenv HSI_CF "-O -DLINUX -DREDHAT -DLINUXPPC -DPOSIX -DSYSV -w -Wunused"
setenv HSI_XF "-Inolibc -w -/Wunused"
setenv HSI_FF "-O"
setenv HSI_LF "-Wl,-Bstatic"
setenv HSI_F77LIBS ""
setenv HSI_LFLAGS ""
setenv HSI_OSLIBS ""
set mkzflags = "'lflags=-Nxz -/Wl,-Bstatic'"
breakswdefault:
echo 'Warning in hlib$irafuser.csh: unknown platform '"$MACH"
exit 1
breaksw
endsw# The following determines whether or not the VOS is used for filename mapping.
if (-f ${iraf}lib/libsys.a) then
setenv HSI_LIBS\
"${hlib}libboot.a ${iraf}lib/libsys.a ${iraf}lib/libvops.a ${hlib}libos.a"
else
setenv HSI_CF "$HSI_CF -DNOVOS"
setenv HSI_LIBS "${hlib}libboot.a ${hlib}libos.a"
endifsetenv HSI_LIBS "$HSI_LIBS $HSI_OSLIBS"alias mkiraf ${hlib}mkiraf.csh
alias mkmlist ${hlib}mkmlist.csh
alias mkz ${hbin}mkpkg.e "$mkzflags"alias edsym ${hbin}edsym.e
alias generic ${hbin}generic.e
alias mkpkg ${hbin}mkpkg.e
alias rmbin ${hbin}rmbin.e
alias rmfiles ${hbin}rmfiles.e
alias rtar ${hbin}rtar.e
alias wtar ${hbin}wtar.e
alias xc ${hbin}xc.e
alias xyacc ${hbin}xyacc.e

 
Profile Email
 Quote
fitz
 01/20/2006 12:29AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
The cl.csh and irafuser.csh scripts are two different things: /usr/local/bin/cl should be a symlink to the cl.csh that is actually used to start iraf, the irafuser.csh is an environment definition file that you normally 'source' in your .cshrc file along with other definitions such as setenv iraf /iraf/iraf/
setenv IRAFARCH redhat
source $iraf/unix/hlib/irafuser.cshDoes your /usr/local/bin/cl actually point to irafuser.csh, if so it should be changed. The cl.csh script is run with the '-f' flag so your .cshrc shouldn't
be read, although I'm still not sure why executing irafuser.csh would create the error, I'd expect it to simply return to the prompt.
In any case, re-running the install script should fix the links.-Mike

 
Profile Email
 Quote
chunly
 01/20/2006 12:29AM  
+----
Newbie

Status: offline


Registered: 01/25/2006
Posts: 3
Thanks for your help Mike.The system admin and I debug what the problem is. You're initial hunch with my .cshrc file was right. I had an alias called "switch" intended to switch the
caps_lock and ctrl_lock keys.Problem is now fix.Thanks.
Chun

 
Profile Email
 Quote
   
Content generated in: 0.20 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