Welcome to iraf.net Friday, March 29 2024 @ 11:23 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 IRAF Version 2.16.1 installation error
   
rjvo
 10/22/2013 07:27PM (Read 6468 times)  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
I downloaded the "iraf.lnux.x86.tar.gz" file and unpacked it in a folder. Then I entered inside and did:
PHP Formatted Code
./install
and I got:
PHP Formatted Code
./install: 310: ./install: NEWLINE: not found
./install: 311: ./install: BOLD_ON: not found
./install: 312: ./install: ECHO: not found
./install: 313: ./install: ECHO: not found
./install: 314: ./install: ECHO: not found
./install: 315: ./install: BOLD_OFF: not found
./install: 316: ./install: NEWLINE: not found
./install: 318: ./install: ECHO: not found
./install: 319: ./install: ECHO: not found
./install: 320: ./install: ECHO: not found
./install: 323: ./install: NEWLINE: not found
./install: 324: ./install: ECHO: not found
./install: 325: ./install: BOLD_ON: not found
./install: 325: ./install: ECHO: not found
./install: 325: ./install: BOLD_OFF: not found
./install: 326: ./install: ECHO: not found
./install: 327: ./install: BOLD_ON: not found
./install: 327: ./install: ECHO: not found
./install: 327: ./install: BOLD_OFF: not found
./install: 328: ./install: ECHO: not found
./install: 330: ./install: ECHO: not found
./install: 331: ./install: BOLD_ON: not found
./install: 331: ./install: ECHO: not found
./install: 331: ./install: BOLD_OFF: not found
./install: 332: ./install: ECHO: not found
./install: 333: ./install: BOLD_ON: not found
./install: 333: ./install: ECHO: not found
./install: 333: ./install: BOLD_OFF: not found
./install: 334: ./install: ECHO: not found
./install: 335: ./install: NEWLINE: not found
./install: 336: ./install: NEWLINE: not found
./install: 344: ./install: NEWLINE: not found
./install: 345: ./install: BOLD_ON: not found
./install: 346: ./install: ECHO: not found
./install: 347: ./install: ECHO: not found
./install: 348: ./install: ECHO: not found
./install: 349: ./install: BOLD_OFF: not found
./install: 350: ./install: NEWLINE: not found
./install: 378: ./install: Syntax error: "(" unexpected (expecting "fi")
 


 
Profile Email
 Quote
fitz
 10/22/2013 07:47PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040

Be sure that you downloaded in binary mode and got the full file (i.e. the size should be 206643200 bytes, the 'sum' command returns "46741 201800") and it unpacked correctly. The install script sources the $iraf/unix/hlib/util.sh script to define things like 'BOLD_ON', for some reason it appears this isn't being found on your machine. I just downloaded that distro file to a scratch area and it installed fine.

Note that if you have $iraf already defined in your environment it may be overriding a new directory, in that case try "unsetenv iraf" before running the install script.

 
Profile Email
 Quote
rjvo
 10/22/2013 08:14PM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
The download site is: "ftp://iraf.noao.edu/iraf/v216/PCIX/"
and I have:
PHP Formatted Code
13972c65e4e45abb70eeb324b2941ef4  iraf.lnux.x86.tar.gz
$ sum iraf.lnux.x86.tar.gz
46741 201800

I run "bash" and the error repeats. The OS is Debian7.

 
Profile Email
 Quote
rjvo
 10/22/2013 08:16PM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
To unpack the binaries I use:
PHP Formatted Code
tar -xzvf /D/iraf.lnux.x86.tar.gz

 
Profile Email
 Quote
rjvo
 10/22/2013 08:20PM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
I have in "install" file (line 243) some strange paths:
PHP Formatted Code
/usr/ucb/whoami


 
Profile Email
 Quote
rjvo
 10/22/2013 08:28PM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
Stepping the script "install" I can see:
PHP Formatted Code
./install: 43: ./install: source: not found

 
Profile Email
 Quote
fitz
 10/22/2013 09:36PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040

Try changing the first line of the install script to read "#!/bin/bash" instead of /bin/sh. It sounds as if /bin/sh on your machine isn't actually Bash but probably 'dash'. If that fixes it then you can either make the same mods in other scripts in the $iraf/unix/hlib directory (e.g. cl.sh and mkiraf.sh) or else change your /bin/sh to be a symlink to /bin/bash.

 
Profile Email
 Quote
rjvo
 10/23/2013 12:47PM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
Quote by: fitz


Try changing the first line of the install script to read "#!/bin/bash" instead of /bin/sh. It sounds as if /bin/sh on your machine isn't actually Bash but probably 'dash'. If that fixes it then you can either make the same mods in other scripts in the $iraf/unix/hlib directory (e.g. cl.sh and mkiraf.sh) or else change your /bin/sh to be a symlink to /bin/bash.



Unfortunately this does not work as well. The problem is more general. Look at:

http://unix.stackexchange.com/questions/1496/why-doesnt-my-bash-script-recognize-aliases

When I put to "irafarch.sh", "mkiraf.sh" and "install" the code:
PHP Formatted Code
source unix/hlib/util.sh

I am able to install, but "Verifying System Settings" has "Architecture = Unable", "Initializing Login Files" gets "[ FAIL ]". So I can not arrive to secure post-install stage. Anyway I can see
PHP Formatted Code
Installation Completed With No Errors

 
Profile Email
 Quote
rjvo
 10/23/2013 12:54PM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
Sorry! I did a mistake in what should be written to the shell files. It should be:

PHP Formatted Code
shopt -s expand_aliases


Anyway the "FAIL" remains.

 
Profile Email
 Quote
fitz
 10/23/2013 01:46PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
I'll try to find a machine with a shell that reproduces the problem. In the meantime, the original C-shell install script is still available in the $iraf/unix/hlib/install.csh, it will likewise install the old C-shell command scripts.

 
Profile Email
 Quote
rjvo
 10/23/2013 02:13PM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
Here is a small example with the bash alias problems:
PHP Formatted Code
#!/bin/bash
shopt -s expand_aliases
alias als="ls -l"
als
echo "OK"
if [ TRUE ]; then
        alias bls="ls -l"
        bls
        echo "Problem"
fi

Aliasing within compound commands does not work ("bls: command not found").
Without the 2nd line (shopt) we get two errors.

 
Profile Email
 Quote
fitz
 10/23/2013 11:26PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040

I found a machine that uses the same 'alias' behavior in Bash and modified the utility script to work properly. The distribution files have been updated as well so new installs will get the change. To install the patched scripts manually, get the file

ftp://iraf.noao.edu/iraf/v216/PCIX/REPO/util-universal.tar.gz

and unpack in the $iraf directory. It's also possible that commands like "make latest" or "make self_update" will work from the $iraf directory, however since these rely on other scripts that source the hlib$util.sh they might fail in the same way so manually installing the fixed scripts is best.

Once that is done, the "./install" should work on your machine.

 
Profile Email
 Quote
rjvo
 10/24/2013 09:52AM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
I downloaded the new "iraf.lnux.x86.tar.gz" today and I tried to install: "./install" and I got:
PHP Formatted Code
...
Architecture  = Unable                HSI arch      =
 

so I stopped and went to edit the "unix/hlib/irafarch.sh". In line 122 I switched $MNAME to $UNAME and in line 151 put the quotes around $IRAFARCH to have:
PHP Formatted Code

...
case "$UNAME" in
...
if [ -n "$IRAFARCH" ]; then
...
 

Then I "./install" and got:
PHP Formatted Code
...
Architecture  = linux                 HSI arch      = linux
 

Almost everything was OK but
PHP Formatted Code

Creating global login.cl and uparm directory ....              [ FAIL ]
 

so I defined the $iraf by "export iraf=/..." and edited the "mkiraf.sh" lines 28-30:
PHP Formatted Code

#$iraf="/iraf/iraf/"           
imdir="$iraf/imdirs/"
cachedir="$iraf/cache/"
 

and finished "mkiraf.sh" manually. In the "setup.sh" the iraf path was wrong, so I corrected it.
I finally arrived to "NOAO/IRAF PC-IRAF Revision 2.16.1 EXPORT Mon Oct 14 21:40:13 MST 2013"
with plenty of errors: "Cannot open file (uparm$update)" ... "Error while reading login.cl file".

 
Profile Email
 Quote
rjvo
 10/24/2013 10:13AM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
I corrected the "login.cl" manually and there was still the error. In the "uparm" I did:
PHP Formatted Code
touch update

and I got the iraf running.

 
Profile Email
 Quote
rjvo
 10/24/2013 02:07PM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
In any workspace where there was uparm it is necessary to remove it, otherwise errors return because of the update file.

 
Profile Email
 Quote
rjvo
 10/25/2013 07:52AM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
I downloaded today new linux binaries and there are still errors:
PHP Formatted Code
Creating global login.cl and uparm directory ....              [ FAIL ]

in "mkiraf.sh" there are bad paths:
PHP Formatted Code
iraf="/iraf/iraf/"             
imdir="/iraf/imdirs/"
cachedir="/iraf/cache/"

I reinstalled and there was a new error:
PHP Formatted Code
bash: /iraf/iraf//unix/hlib/irafarch.sh: No such file or directory

so I corrected the "~/.iraf/setup.sh":
PHP Formatted Code
iraf=....

and was not able to start because of problems with "irafuser.sh"
This script brakes because of:
PHP Formatted Code
Unable to determine platform architecture for ($MNAME).


Bash crashes so the situation can be difficult for users!!!

So I changed the "irafarch.sh" line 126 for $UNAME - there was no error but the IRAFARCH=. So I changed line 155 to have:
PHP Formatted Code
if [ $IRAFARCH ]; then

and finally I got the IRAFARCH=linux. Then "cl" started without problems.

 
Profile Email
 Quote
rjvo
 10/25/2013 07:53AM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
I downloaded today new linux binaries and there are still errors:
PHP Formatted Code
Creating global login.cl and uparm directory ....              [ FAIL ]

in "mkiraf.sh" there are bad paths:
PHP Formatted Code
iraf="/iraf/iraf/"             
imdir="/iraf/imdirs/"
cachedir="/iraf/cache/"

I reinstalled and there was a new error:
PHP Formatted Code
bash: /iraf/iraf//unix/hlib/irafarch.sh: No such file or directory

so I corrected the "~/.iraf/setup.sh":
PHP Formatted Code
iraf=....

and was not able to start because of problems with "irafuser.sh"
This script brakes because of:
PHP Formatted Code
Unable to determine platform architecture for ($MNAME).


Bash crashes so the situation can be difficult for users!!!

So I changed the "irafarch.sh" line 126 for $UNAME - there was no error but the IRAFARCH=. So I changed line 155 to have:
PHP Formatted Code
if [ $IRAFARCH ]; then

and finally I got the IRAFARCH=linux. Then "cl" started without problems.

 
Profile Email
 Quote
fitz
 10/25/2013 08:51AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
I appreciate your patience as we roll out these new versions of the scripts, I think we are close to a final solution. I found several instances where the Bash syntax was being abused by no quoting environment variables where needed, and where some environment was assumed to be defined (e.g. using a C-shell for login but not having anything like a .bashrc file that loads the setup.sh to use). I've fixed these and issued a new set of distro files.

If you have an existing v2.16.1 install what you should do is download

ftp://iraf.noao.edu/iraf/v216/REPO/util-universal.tar.gz

and unpack it in your $iraf directory. This will replace the install and support scripts with the patched versions. Then, rerun the install script and hopefully you won't see any other errors from the bash scripts. Please let me know if you have problems.

-Mike

 
Profile Email
 Quote
rjvo
 10/25/2013 10:46AM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
No, the new scripts does NOT work. I have bad iraf, imdir, cachedir setup in "mkiraf.sh" lines 28-30, in "setup.sh" line 5 and in uparm I need to "touch update" to be able to run "iraf". Sorry, but there is a bug.

 
Profile Email
 Quote
fitz
 10/25/2013 10:03PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Try doing a "make latest" from the $iraf directory to install the patched CHKUPDATE task as well as the scripts.

 
Profile Email
 Quote
rjvo
 10/26/2013 07:55AM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
Sorry, but the new bineries I downloaded just now (European Time) still have a bug:
PHP Formatted Code
Creating global login.cl and uparm directory ....              [ FAIL ]

and there is no "~/.iraf/setup.sh" at all. "mkiraf.sh" has bad paths:
PHP Formatted Code
                                # Paths edited by the install script.
iraf="/iraf/iraf/"             
imdir="/iraf/imdirs/"
cachedir="/iraf/cache/"

When I change them to the real ones, I am able to install. But the "setup.sh" has still bad iraf path - I know that I repeat the same, but the bugs still exist.

 
Profile Email
 Quote
rjvo
 10/29/2013 10:06AM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
Some progress with binaries of today, but in "mkiraf.sh" lines 28-30 we have:
PHP Formatted Code
iraf=/XXX/iraf/"               
imdir=/home/XXX/.iraf/imdir//"

cachedir=/home/XXX/.iraf/cache//"

so there is quote-sign problem.

 
Profile Email
 Quote
fitz
 10/30/2013 06:37AM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040

Please try one more time (e.g. a "make latest" should do it). I found several errors related to how the script was translated that explain what you are seeing. I was NOT seeing it because /iraf/iraf was still a valid path on my machine even though I was installing an iraf in another directory, the MKIRAF wasn't actually editing the path but the default still worked and masked the problem. Distros and patches have been updated.

 
Profile Email
 Quote
rjvo
 10/30/2013 10:37AM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
I was able to install from today's binaries but was not able to run it because there are bad links in ~/.iraf/bin.
My distribution is Linux and the ism_wcspix.e, xgterm, ximtool point to .../vendor/x11iraf/bin.macintel/ximtool. I corrected the links manually but was not able to run unil to "touch update" in uparm$ folder. I am able to run iraf only from ".iraf" folder. I was able to install extern packages this time. Anyway it seems, some problems are still present.

 
Profile Email
 Quote
fitz
 10/30/2013 05:01PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Quote by: rjvo

I was able to install from today's binaries but was not able to run it because there are bad links in ~/.iraf/bin.
My distribution is Linux and the ism_wcspix.e, xgterm, ximtool point to .../vendor/x11iraf/bin.macintel/ximtool.



That's what I get for trying to be clever after midnight, should be fixed now.

I corrected the links manually but was not able to run unil to "touch update" in uparm$ folder. I am able to run iraf only from ".iraf" folder.[/p]


What is the error message that you get when you run outside of the .iraf folder? Also, are you simply typing 'cl' to start or (since you mentioned xgterm problems) something like "xgterm -e cl" to bring up a window? You would see a "no login.cl found" message if your $HOME/.iraf couldn't be resolved (e.g. because of a space in the path). If you're using the xgterm command try adding a "-ls" flag to ensure you run a login shell and the setup file is sourced correctly. Again, I appreciate your patience.

 
Profile Email
 Quote
rjvo
 10/30/2013 06:29PM  
+++++
Active Member

Status: offline


Registered: 04/21/2007
Posts: 134
I installed with no problem from the new binaries. Trying "iraf" - it crashed because of "ERROR: Cannot open file (uparm$update)", so I did "touch uparm/update" in .iraf and then there is no problem to run "iraf" from any place. I installed the extern packages without any problem as well. Thank you.

 
Profile Email
 Quote
fitz
 10/30/2013 06:38PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040

Thanks again, I'll double-check the uparm$update fix for the third time to be sure it really is in the binaries.

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