2
$\begingroup$

Recently I asked this question on IRAF like software that can be run in a window but it seems it is not possible. So I installed window subsystem for linux. I followed these steps to install IRAF.

Everything works very well till the step ./install. The following are the code I'm seeing on my screen:

young_kindaichi@LAPTOP-K91A53NB:~$ sudo -i

[sudo] password for young_kindaichi:

root@LAPTOP-K91A53NB:~# ls

iraf-2.16.1-2018.11.01  v2.16.1+2018.11.01.tar.gz

root@LAPTOP-K91A53NB:~# cd iraf-2.16.1-2018.11.01

root@LAPTOP-K91A53NB:~/iraf-2.16.1-2018.11.01# ls

COPYRIGHT   Makefile         README.md   dev  extern   install  local  mkpkg  pkg  test  util

INSTALL.md  README.contents  RELEASE.md  doc  include  lib      math   noao   sys  unix  vendor

root@LAPTOP-K91A53NB:~/iraf-2.16.1-2018.11.01# ./install  

which leads me to:

enter image description here

As per the guide, It says

The script will prompt you for the path to the default image directory, the cache directory and the binary files directory. Usually, you can everywhere use the default settings when asked from the install script. You will need to include the binary files directory in your PATH before proceeding to the step. In BASH this can be done with the command:

I do not understand this, And I don't what to do now. Please consider that It's the first time I'm using Linux and I don't have any basic knowledge. So please help me.


On a suggestion, I downloaded the package at /home/young_kindaichi.

After ./install

As given in the manual that is "The script will prompt you for the path to the default image directory, the cache directory, and the binary files directory. Usually, you can everywhere use the default settings when asked from the install script".

I used the following code:


Default root image storage directory (/home/young_kindaichi/.iraf/imdir): <CD>

*** The definition of imdir cannot be the same as the iraf

*** root, please choose a different directory. Ideally this

*** should be some large data area on your system or a user

*** data area such as /home, /users, /u1, etc.

Default root image storage directory (/home/young_kindaichi/.iraf/imdir): 

The problem is as I can understood it's not taking default settings.

$\endgroup$
9
  • 2
    $\begingroup$ I know nothing about IRAF. But it seems to me that what you are doing is just installing the C++ package (i.e. compile the binaries from source). After ./install, could you try to see if there is any makefiles generated, and a simple make should do the trick. $\endgroup$
    – WDC
    Apr 10 at 9:23
  • 2
    $\begingroup$ Don't run the install script as root. You only need to use sudo to copy the files to system directories. But you don't need this for a local install. So don't use sudo. and try using all default settings to see if it works. $\endgroup$
    – James K
    Apr 10 at 9:25
  • $\begingroup$ @WDC I'm not too familiar with this code. I don't understand what you mean by makefiles but there is a directory Makefile. I do not understand what is made. If you tell me to step by step what I have to see and what I have to try then I can do it. Please help me. $\endgroup$ Apr 10 at 10:46
  • $\begingroup$ @JamesK Alright I downloaded the package in /home/young_kindaichi and unpacked it. Again I do the same. It says to hit <CR> to accept the default value. But when I did so : Default root image storage directory (/home/young_kindaichi/.iraf/imdir): <CR> *** The definition of imdir cannot be the same as the iraf *** root, please choose a different directory. Ideally this *** should be some large data area on your system or a user *** data area such as /home, /users, /u1, etc. $\endgroup$ Apr 10 at 10:49
  • $\begingroup$ I don't know what to do @JamesK , Please help me fixing this. $\endgroup$ Apr 10 at 10:49
4
$\begingroup$

I am on Ubuntu 18.04, and just compiled IRAF successfully. Let me elaborate on my comments.

First, you need to understand how to install C++ packages, such as IRAF your interest here. To install a C++ package, there are two ways:

  1. Install binaries directly. In palin words, download an .exe for your platform version (e.g. Windows 10) and double-click the .exe to install (basically, the computer will copy-paste all the pre-built libraries and header files to your target directory) and everything should work. Similar things happen on Ubuntu Linux that the binary version might just be a .deb package.
  2. Compile from source. This usually requires you have a basic understanding for how to compile a C++ project, and you will usually need to install other C++ packages as dependences for this purpose. This is the situation of your question here.

Since you are installing IRAF using the 2nd approach, let me give you some basic background on how that should work. To compile a C++ project, you need:

  • A C++ compiler. For example, GCC, Visual Studio, CLang, ...
  • A makefile (or many sub-makefiles) to orginize all the source and header files. It could be a Makefile file, or a CMakeLists.txt. The makefile could be either written by hand, or generated automatically using some scripts.

The way to compile IRAF, from its readme, is:

  • Generate a makefile using ./install. After this step you should see a Makefile generated.

  • Run make linux64 to compile if you are on Linux64. Then, run make sysgen 2>&1 | tee build.log to build. If this step is successful, you will see binary files generated as outputs. In IRAF, these files would be generated in the directory of ./bin and ./bin.linux64. In my case, these files are:

WDC:~/Downloads/iraf-2.16.1-2018.11.01/bin$ ls
bin.linux64  libc.a        libds.a       libimc.a       liblapack.a  libnlfit.a   libsys.a       x_color.e    x_mkttydata.e  x_proto.e     x_tv.e
cl.e         libcfitsio.a  libex.a       libimd.a       libllsq.a    libsgi.a     libtbtables.a  x_dataio.e   x_ncar.e       x_sgikern.e   x_utilities.e
ecl.e        libcur.a      libfftpack.a  libimfort.a    libmain.o    libslalib.a  libvops.a      x_images.e   x_nttools.e    x_softools.e  x_vol.e
irafks.e     libcurfit.a   libgks.a      libiminterp.a  libmemdbg.a  libstg.a     libVOTable.a   x_imdkern.e  x_obsolete.e   x_stdgraph.e
libbev.a     libdeboor.a   libgsurfit.a  libinterp.a    libncar.a    libsurfit.a  libxtools.a    x_lists.e    x_plot.e       x_system.e

Now you have finished compilation. You may run a test to see if it is all set. According to readme, you need to run:

./test/run_tests

My outputs are:

WDC:~/Downloads/iraf-2.16.1-2018.11.01$ ./test/run_tests 
ecl.e: files.md ......
ecl.e: images.imcoords.md ...........
ecl.e: images.imfilter.md ..............
ecl.e: images.imfit.md ...
ecl.e: images.imgeom.md ........
ecl.e: images.immatch.md ..
ecl.e: lists.md .......
ecl.e: noao.astutil.md ........
ecl.e: noao.digiphot.photcal.md .
ecl.e: numerical-recipes.md ..........
ecl.e: programming.md ............
ecl.e: README.md 
ecl.e: testproc.md .........................
ecl.e: test-syntax.md ...xsa
ecl.e: utilities.nttools.md ..............
Test summary:     124 passed
      2 skipped
      1 xfailed

Hope above text is clear for you to proceed.

$\endgroup$
9
  • $\begingroup$ Oh, Great thanks to you. While reading your comment I found what a dumb I was. I was typing <CR> while I have click on enter. Now I'm seeing the following on my window. $\endgroup$ Apr 10 at 12:04
  • $\begingroup$ Please find drive.google.com/drive/folders/… this. This is what I'm seeing right now. As per the instructions I have to add binary files my path. What step should I take? As per your answer. $\endgroup$ Apr 10 at 12:14
  • $\begingroup$ @YoungKindaichi OK. Could you type make linux64 and then make sysgen 2>&1 | tee build.log and see what happen? $\endgroup$
    – WDC
    Apr 10 at 12:16
  • $\begingroup$ Okay Right now I'm in young_kindaichi@LAPTOP-K91A53NB:~/iraf-2.16.1-2018.11.01$ $\endgroup$ Apr 10 at 12:18
  • $\begingroup$ It shows : (util/mkarch linux64) util/mkarch: 17: export: Files/WindowsApps/CanonicalGroupLimited.UbuntuonWindows_2004.2021.222.0_x64__79rhkp1fndgsc:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program: bad variable name make: *** [Makefile:109: linux64] Error 2 $\endgroup$ Apr 10 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.