fsidoli |
05/29/2008 11:06AM (Read 4559 times)
|
|
|
Status: offline
Registered: 10/18/2007
Posts: 5
|
Hi there,I'm trying to run a program in/outside of IRAF that use the portable IRAF compile/link utility, 'xc'. I can see that I have the xc.e installed on my system under '/iraf/iraf/unix/bin.redhat/xc.e' and that it seems to be listed under the softools package. However, when I try to run xc in iraf I simply get the error message 'xc: Command not found.'. Can you tell me if there is anything obvious I am forgetting to do? Do I need to set a path variable?Many thanks,
Fab
|
|
|
|
fitz |
05/29/2008 11:06AM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
XC is declared as a foreign task in the CL, meaning that it is executed with a shell spawned to run the command. That shell is not a normal login shell and so the environment typically comes from the .cshrc file and not the .login file, this means that the $path defined in .cshrc must include the directory where you've installed the local iraf commands.One way to check whether your paths are setup correctly is with a simple shell escape, e.g.[code:1:ae8d88e33a]cl> !which xc[/code:1:ae8d88e33a]should return the path if it is found, or a 'command not found' otherwise.Cheers,
-Mike
|
|
|
|
fsidoli |
05/29/2008 11:06AM
|
|
|
Status: offline
Registered: 10/18/2007
Posts: 5
|
Hi Mike,The result of doing [code:1:54033cd89e]>cl !which xc[/code:1:54033cd89e] returns [code:1:54033cd89e]/usr/local/bin/xc[/code:1:54033cd89e] which is softlinked to [code:1:54033cd89e]/iraf/iraf/unix/bin.redhat/xc.e [/code:1:54033cd89e]However, typing 'xc' still yields a 'command not found' error. Cheers,
Fab
|
|
|
|
fitz |
05/29/2008 11:06AM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
If you try running the 'xc' command outside of the CL does it work? If you run it as "cl> !!which cl" (i.e. with two exlamation marks) does it work? In this second case, the '!!' forces the command to be executed in a Bourne shell, in the first case this should be the same shell as when you execute a foreign command. In either case, 'command not found' is a shell message indicating a path problem.You might also try "cl> !env" to dump the full environment -- look for the 'path' or 'PATH' variable to be sure it has /usr/local/bin, also check the SHELL variable to see which shell is being used. This will tell you whether you need to edit your .cshrc file or .bashrc.Cheers,
-Mike
|
|
|
|
fsidoli |
05/29/2008 11:06AM
|
|
|
Status: offline
Registered: 10/18/2007
Posts: 5
|
Hi Mike,Running 'xc' outside of the CL results in the same error message. I'm running a tcsh by default. Under bash (both inside and outside of the CL) I get the error message: '/bin/sh: /usr/local/bin/xc:4?: bad ELF interpreter: No such file or directory'.Doing a "cl> !env" shows me that I am using a tcsh shell "/usr/local/bin/tcsh" and that my PATH includes "/usr/local/bin".I hope this helps to narrow down the problem.Many thanks,
Fab
|
|
|
|
fitz |
05/29/2008 11:06AM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
The clue here is the 'bad ELF interpreter', which implies that the bin.redhat version of XC isn't gonna run on your machine. What OS are you using? The 'redhat' arch is appropriate for RedHat/Fedora/CentOS and many other linuxes but if XC won't run at the host level it won't work from IRAF either. Also, which version of IRAF are we talking about?-Mike
|
|
|
|
fsidoli |
05/29/2008 11:06AM
|
|
|
Status: offline
Registered: 10/18/2007
Posts: 5
|
Hi Mike,I'm running Scientific Linux SL release 4.6 and IRAF v2.12.2a.
I believe that the redhat 'arch' should be OK for this OS. Fab
|
|
|
|