Difference between revisions of "Install ISIS on Linux"
(39 intermediate revisions by 2 users not shown) | |||
Line 15: | Line 15: | ||
sudo apt-get -y install libcurl4-gnutls-dev | sudo apt-get -y install libcurl4-gnutls-dev | ||
sudo apt-get -y install libncurses5-dev | sudo apt-get -y install libncurses5-dev | ||
− | |||
sudo apt-get -y install xorg-dev | sudo apt-get -y install xorg-dev | ||
sudo apt-get -y install gcc g++ gfortran | sudo apt-get -y install gcc g++ gfortran | ||
sudo apt-get -y install perl-modules-5* | sudo apt-get -y install perl-modules-5* | ||
+ | sudo apt-get -y install libfile-slurp-perl | ||
sudo apt-get -y install python3-dev | sudo apt-get -y install python3-dev | ||
sudo apt-get -y install fig2dev | sudo apt-get -y install fig2dev | ||
Line 25: | Line 25: | ||
sudo apt-get -y install libpcre3-dev | sudo apt-get -y install libpcre3-dev | ||
sudo apt-get -y install libonig-dev | sudo apt-get -y install libonig-dev | ||
+ | sudo apt-get -y install libgsl-dev | ||
sudo apt-get -y install pgplot5 | sudo apt-get -y install pgplot5 | ||
+ | sudo apt-get -y install libcfitsio-dev | ||
+ | sudo apt-get -y install libx11-dev | ||
sudo apt-get -y install wget | sudo apt-get -y install wget | ||
sudo apt-get -y install git | sudo apt-get -y install git | ||
+ | sudo apt-get -y install make | ||
+ | sudo apt-get -y install curl | ||
+ | sudo apt-get -y install texlive | ||
+ | sudo apt-get -y install texlive-latex-extra | ||
</pre> | </pre> | ||
+ | |||
+ | or on Arch linux | ||
+ | |||
+ | <pre> | ||
+ | sudo pacman -S --noconfirm readline | ||
+ | sudo pacman -S --noconfirm curl | ||
+ | sudo pacman -S --noconfirm curl-gnutls | ||
+ | sudo pacman -S --noconfirm ncurses | ||
+ | sudo pacman -S --noconfirm libx11 | ||
+ | sudo pacman -S --noconfirm gcc | ||
+ | sudo pacman -S --noconfirm gcc-fortran | ||
+ | sudo pacman -S --noconfirm perl | ||
+ | sudo pacman -S --noconfirm python | ||
+ | sudo pacman -S --noconfirm fig2dev | ||
+ | sudo pacman -S --noconfirm libpng | ||
+ | sudo pacman -S --noconfirm zlib | ||
+ | sudo pacman -S --noconfirm pcre | ||
+ | sudo pacman -S --noconfirm oniguruma | ||
+ | sudo pacman -S --noconfirm gsl | ||
+ | sudo pacman -S --noconfirm pgplot | ||
+ | sudo pacman -S --noconfirm cfitsio | ||
+ | sudo pacman -S --noconfirm wget | ||
+ | sudo pacman -S --noconfirm git | ||
+ | sudo pacman -S --noconfirm texlive-most | ||
+ | sudo pacman -S --noconfirm texlive-latexextra | ||
+ | </pre> | ||
+ | |||
+ | If pgplot5 fails to install, you may have to install it manually: | ||
+ | |||
+ | https://guaix.fis.ucm.es/~ncl/howto/howto-pgplot | ||
You have to define some things in your ~/.bashrc: | You have to define some things in your ~/.bashrc: | ||
Line 38: | Line 75: | ||
export PERL=/usr/bin/perl | export PERL=/usr/bin/perl | ||
export PYTHON=/usr/bin/python3 | export PYTHON=/usr/bin/python3 | ||
+ | # if installing in linux using su | ||
+ | # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/slang/v2/modules/ | ||
</pre> | </pre> | ||
Line 73: | Line 112: | ||
find .. -name 'headas-init.sh' | xargs chmod +x | find .. -name 'headas-init.sh' | xargs chmod +x | ||
</pre> | </pre> | ||
+ | |||
+ | On HPCs without root access, configure may fail to find some libaries. In case they are not installed, you should install them from source, and then link them. Examples may be "ncurses", "cfitsio", "pgplot", "gsl". Add to your ~/.bashrc: | ||
+ | |||
+ | <pre> | ||
+ | export LDFLAGS=-L/path/to/installation/folder/lib/ | ||
+ | export CPPFLAGS=-I/path/to/installation/folder/include/ | ||
+ | </pre> | ||
+ | |||
+ | If no X window is available and you can not install it, use the "--disable-x" configure flag. | ||
Finally, you need to define $HEASOFT. For me, this meant editing ~/.bashrc to | Finally, you need to define $HEASOFT. For me, this meant editing ~/.bashrc to | ||
Line 116: | Line 164: | ||
git clone http://www.sternwarte.uni-erlangen.de/git.public/isisscripts | git clone http://www.sternwarte.uni-erlangen.de/git.public/isisscripts | ||
</pre> | </pre> | ||
+ | |||
+ | As of July 2023, there are some issues with slang 2.3.4 and isis; you may get this error when running isis: | ||
+ | |||
+ | ***Warning: Executable compiled against S-Lang 20303 but linked to 20304 | ||
+ | |||
+ | In that case you should use slang 2.3.3 instead: | ||
+ | |||
+ | https://www.jedsoft.org/releases/slang/ | ||
+ | |||
+ | If you download slang as an archive, you may have to apply the correct permissions: | ||
+ | <pre> | ||
+ | find . -name '*.sh' | xargs chmod +x | ||
+ | </pre> | ||
The following will assume you want to use root access. If that is not the case, you can use use the option | The following will assume you want to use root access. If that is not the case, you can use use the option | ||
Line 123: | Line 184: | ||
</pre> | </pre> | ||
− | With the ./configure | + | With the ./configure commands. It seems to work to install all of them to the same "--prefix". See also "./configure --help". |
Install slang. Go to the slang directory. | Install slang. Go to the slang directory. | ||
<pre> | <pre> | ||
− | + | bash ./configure | |
make | make | ||
sudo make install | sudo make install | ||
+ | make clean | ||
</pre> | </pre> | ||
− | Make sure that all necessary standard modules are installed, including "png" | + | Make sure that all necessary standard modules are installed, including "png". This requires "libpng16" to be installed. |
− | If "libpng16" is not installed yet, you can easily build it from source: | + | If "libpng16" is not installed yet (try <tt> find /usr/lib/ -name "*libpng*"</tt>), you can easily build it from source: |
https://sourceforge.net/projects/libpng/files/ | https://sourceforge.net/projects/libpng/files/ | ||
Line 140: | Line 202: | ||
Install isis. Go to the isis directory, here with HEADAS: | Install isis. Go to the isis directory, here with HEADAS: | ||
<pre> | <pre> | ||
− | + | bash ./configure --with-headas=$HEADAS | |
make | make | ||
+ | make check | ||
sudo make install | sudo make install | ||
+ | make clean | ||
</pre> | </pre> | ||
+ | |||
If your aim is to install the "stellar_isisscripts", you don't need HEADAS, but may have to install fitsio: | If your aim is to install the "stellar_isisscripts", you don't need HEADAS, but may have to install fitsio: | ||
Line 151: | Line 216: | ||
<pre> | <pre> | ||
− | + | bash ./configure | |
make | make | ||
sudo make install | sudo make install | ||
+ | make clean | ||
</pre> | </pre> | ||
+ | If "make" has an issue with pgplot, try setting using <tt>./configure --with-pgplot=/usr/</tt>, or wherever pgplot is installed. | ||
Add <tt>'''--with-slang=/path/to/slang'''</tt> to the following configuration set ups in case you installed slang in a different path other than <tt>/usr/local/</tt> | Add <tt>'''--with-slang=/path/to/slang'''</tt> to the following configuration set ups in case you installed slang in a different path other than <tt>/usr/local/</tt> | ||
Install jed. Go to the jed directory | Install jed. Go to the jed directory | ||
<pre> | <pre> | ||
− | + | bash ./configure | |
make | make | ||
make xjed | make xjed | ||
sudo make install | sudo make install | ||
+ | make clean | ||
</pre> | </pre> | ||
Install slgsl. Go to the slgsl directory | Install slgsl. Go to the slgsl directory | ||
<pre> | <pre> | ||
− | + | bash ./configure | |
make | make | ||
sudo make install | sudo make install | ||
+ | make clean | ||
</pre> | </pre> | ||
Install slxfig. Go to the slxfig directory | Install slxfig. Go to the slxfig directory | ||
<pre> | <pre> | ||
− | + | bash ./configure | |
make | make | ||
sudo make install | sudo make install | ||
+ | make clean | ||
</pre> | </pre> | ||
Install slirp. Go to the slirp directory | Install slirp. Go to the slirp directory | ||
<pre> | <pre> | ||
− | + | bash ./configure | |
make | make | ||
− | sudo make install | + | sudo make install |
+ | make clean | ||
</pre> | </pre> | ||
− | Before building the isisscripts, install the "SLURP" perl module. | + | Before building the isisscripts, install the "SLURP" perl module. This is not necessary if "libfile-slurp-perl" was already installed with apt. |
<pre> | <pre> | ||
sudo perl -MCPAN -e shell | sudo perl -MCPAN -e shell | ||
Line 205: | Line 276: | ||
add_to_isis_load_path("/Path/To/isisscripts/share/"); | add_to_isis_load_path("/Path/To/isisscripts/share/"); | ||
define ris() { require("isisscripts"); }; | define ris() { require("isisscripts"); }; | ||
+ | % if s-lang is not in your $PATH | ||
+ | % add_to_isis_load_path("/usr/local/share/slsh/local-packages:/usr/local/share/slsh"); | ||
</pre> | </pre> | ||
This allows the easy access to <tt>require("isisscripts")</tt> in isis. | This allows the easy access to <tt>require("isisscripts")</tt> in isis. | ||
Line 238: | Line 311: | ||
make | make | ||
make test | make test | ||
− | rm c_functions-test.sl | + | rm c_functions-test.sl c_functions.o c_functions_glue.o c_functions_glue.c Makefile |
</pre> | </pre> | ||
− | Create modify the [[ISIS auto start (.isisrc)|.isisrc]] file in your <tt>$HOME</tt> directory and add the following line | + | Create or modify the [[ISIS auto start (.isisrc)|.isisrc]] file in your <tt>$HOME</tt> directory and add the following line |
<pre> | <pre> | ||
add_to_isis_load_path("/Path/To/stellar_isisscripts/share/"); | add_to_isis_load_path("/Path/To/stellar_isisscripts/share/"); | ||
Line 274: | Line 347: | ||
exit; | exit; | ||
</pre> | </pre> | ||
+ | |||
+ | |||
+ | Known issues: | ||
+ | 1) On Ubuntu 22, xfig/fig2dev 3.2.8b are the standard. This contains a bug that will prevent correct labels. Fix this by compiling xfig/fig2dev 3.2.9 from source. |
Latest revision as of 23:30, 19 September 2024
These instructions were tested for Debian 10, Ubuntu 20.04, and openSUSE 15.3. They should help you to install both the X-ray isisscripts as well as the "stellar_isisscripts", but will focus on the latter. It also assumes that you use the bash shell. Using the csh requires minor changes.
If you prefer an easy way to run the X-ray isisscripts (without the "stellar_isisscripts"), you can use the singularity container:
https://www.sternwarte.uni-erlangen.de/wiki/index.php/Isis_tutorial_installing
1. Install basic dependencies and general things
If you don't have root access, you might have to build some things from source, e.g. pgplot, cfitsio, or libpng. However, it might be easier to rely on HEASOFT in this case.
sudo apt-get -y install libreadline-dev sudo apt-get -y install libcurl4 sudo apt-get -y install libcurl4-gnutls-dev sudo apt-get -y install libncurses5-dev sudo apt-get -y install xorg-dev sudo apt-get -y install gcc g++ gfortran sudo apt-get -y install perl-modules-5* sudo apt-get -y install libfile-slurp-perl sudo apt-get -y install python3-dev sudo apt-get -y install fig2dev sudo apt-get -y install libpng-dev sudo apt-get -y install zlib1g-dev sudo apt-get -y install libpcre3-dev sudo apt-get -y install libonig-dev sudo apt-get -y install libgsl-dev sudo apt-get -y install pgplot5 sudo apt-get -y install libcfitsio-dev sudo apt-get -y install libx11-dev sudo apt-get -y install wget sudo apt-get -y install git sudo apt-get -y install make sudo apt-get -y install curl sudo apt-get -y install texlive sudo apt-get -y install texlive-latex-extra
or on Arch linux
sudo pacman -S --noconfirm readline sudo pacman -S --noconfirm curl sudo pacman -S --noconfirm curl-gnutls sudo pacman -S --noconfirm ncurses sudo pacman -S --noconfirm libx11 sudo pacman -S --noconfirm gcc sudo pacman -S --noconfirm gcc-fortran sudo pacman -S --noconfirm perl sudo pacman -S --noconfirm python sudo pacman -S --noconfirm fig2dev sudo pacman -S --noconfirm libpng sudo pacman -S --noconfirm zlib sudo pacman -S --noconfirm pcre sudo pacman -S --noconfirm oniguruma sudo pacman -S --noconfirm gsl sudo pacman -S --noconfirm pgplot sudo pacman -S --noconfirm cfitsio sudo pacman -S --noconfirm wget sudo pacman -S --noconfirm git sudo pacman -S --noconfirm texlive-most sudo pacman -S --noconfirm texlive-latexextra
If pgplot5 fails to install, you may have to install it manually:
https://guaix.fis.ucm.es/~ncl/howto/howto-pgplot
You have to define some things in your ~/.bashrc:
export CC=/usr/bin/gcc export CXX=/usr/bin/g++ export FC=/usr/bin/gfortran export PERL=/usr/bin/perl export PYTHON=/usr/bin/python3 # if installing in linux using su # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/slang/v2/modules/
Then do
source ~/.bashrc
2. Install HEASOFT
This is not required for the "stellar_isisscripts" and can be skipped if you only want to install these. That is, unless you have no other way to install pgplot and cfitsio. HEASOFT seems to be required to run the X-ray isisscripts properly. To download HEASOFT, go to:
https://heasarc.gsfc.nasa.gov/lheasoft/download.html
unpack the download, and then:
cd heasoft-6.29/BUILD_DIR
Before I could run the configure script I had to make many files executable, so it seems easiest to make all of them executable (this is not good practice):
find .. -name '*' | xargs chmod +x
Building HEASOFT will take a while (~>30min). If you don't want to use root, set a different installation location by using ./configure with --prefix=/path/to/installation/folder/.
./configure make sudo make install find .. -name 'headas-init.sh' | xargs chmod +x
On HPCs without root access, configure may fail to find some libaries. In case they are not installed, you should install them from source, and then link them. Examples may be "ncurses", "cfitsio", "pgplot", "gsl". Add to your ~/.bashrc:
export LDFLAGS=-L/path/to/installation/folder/lib/ export CPPFLAGS=-I/path/to/installation/folder/include/
If no X window is available and you can not install it, use the "--disable-x" configure flag.
Finally, you need to define $HEASOFT. For me, this meant editing ~/.bashrc to include the two following lines. You need to adjust the path of course:
export HEADAS=/home/matti/programs/heasoft-6.29/x86_64-pc-linux-gnu-libc2.31 . $HEADAS/headas-init.sh # or # . $HEADAS/headas-init.sh
for csh, use instead:
setenv HEADAS /home/volans/mdorsch/isis/heasoft/installation/x86_64-pc-linux-gnu-libc2.31 . $HEADAS/headas-init.csh
Then, in the terminal:
source ~/.bashrc # or source ~/.cshrc
3. Install slang / slang modules / isis / isisscripts
First get the latest versions of slang / jed/ slgsl / slxfig / slirp / isis / isisscripts. A scripted installation of slang and isis is possible, following the MIT guide:
https://space.mit.edu/cxc/isis/install.html#XI
However, I recommend using the git repositories. Go to the Software directory in your terminal and clone the repositories:
git clone https://github.com/houckj/isis git clone git://git.jedsoft.org/git/slang.git git clone git://git.jedsoft.org/git/slxfig.git git clone git://git.jedsoft.org/git/slgsl.git git clone git://git.jedsoft.org/git/jed.git git clone git://git.jedsoft.org/git/slirp.git git clone http://www.sternwarte.uni-erlangen.de/git.public/isisscripts
As of July 2023, there are some issues with slang 2.3.4 and isis; you may get this error when running isis:
- Warning: Executable compiled against S-Lang 20303 but linked to 20304
In that case you should use slang 2.3.3 instead:
https://www.jedsoft.org/releases/slang/
If you download slang as an archive, you may have to apply the correct permissions:
find . -name '*.sh' | xargs chmod +x
The following will assume you want to use root access. If that is not the case, you can use use the option
--prefix=/path/to/installation/folder/
With the ./configure commands. It seems to work to install all of them to the same "--prefix". See also "./configure --help".
Install slang. Go to the slang directory.
bash ./configure make sudo make install make clean
Make sure that all necessary standard modules are installed, including "png". This requires "libpng16" to be installed. If "libpng16" is not installed yet (try find /usr/lib/ -name "*libpng*"), you can easily build it from source:
https://sourceforge.net/projects/libpng/files/
and then add its installation folder to $PATH.
Install isis. Go to the isis directory, here with HEADAS:
bash ./configure --with-headas=$HEADAS make make check sudo make install make clean
If your aim is to install the "stellar_isisscripts", you don't need HEADAS, but may have to install fitsio:
https://heasarc.gsfc.nasa.gov/fitsio/
Then go to the isis directory and:
bash ./configure make sudo make install make clean
If "make" has an issue with pgplot, try setting using ./configure --with-pgplot=/usr/, or wherever pgplot is installed. Add --with-slang=/path/to/slang to the following configuration set ups in case you installed slang in a different path other than /usr/local/
Install jed. Go to the jed directory
bash ./configure make make xjed sudo make install make clean
Install slgsl. Go to the slgsl directory
bash ./configure make sudo make install make clean
Install slxfig. Go to the slxfig directory
bash ./configure make sudo make install make clean
Install slirp. Go to the slirp directory
bash ./configure make sudo make install make clean
Before building the isisscripts, install the "SLURP" perl module. This is not necessary if "libfile-slurp-perl" was already installed with apt.
sudo perl -MCPAN -e shell install CPAN reload cpan install File::Slurp quit
Then go to the isisscripts directory and
make
Create / modify the .isisrc file in your $HOME directory and add the following line
add_to_isis_load_path("/Path/To/isisscripts/share/"); define ris() { require("isisscripts"); }; % if s-lang is not in your $PATH % add_to_isis_load_path("/usr/local/share/slsh/local-packages:/usr/local/share/slsh");
This allows the easy access to require("isisscripts") in isis.
4. Install stellar_isisscripts
Get the newest version of the stellar_isisscripts from git. If you have a Remeis/gitlab account and are at the Remeis observatory, do:
git clone git@serpens.sternwarte.uni-erlangen.de:irrgang/stellar.git mv stellar stellar_isisscripts
If you have a Remeis/gitlab account and are not at the Remeis observatory, do:
git clone http://www.sternwarte.uni-erlangen.de/gitlab/irrgang/stellar.git mv stellar stellar_isisscripts
Otherwise ask Matti Dorsch. Then:
cd stellar_isisscripts make
Now compile some necessary C functions:
cd stellar_isisscripts/slirp slirp -make -lm -lgsl -lgslcblas -lpthread c_functions.h c_functions.o sed -i -e 's/^CFLAGS[[:space:]]*= -g -O2/CFLAGS = -g -Ofast -Wall -Wextra/g' Makefile
Then:
make make test rm c_functions-test.sl c_functions.o c_functions_glue.o c_functions_glue.c Makefile
Create or modify the .isisrc file in your $HOME directory and add the following line
add_to_isis_load_path("/Path/To/stellar_isisscripts/share/"); define rmy() { require("stellar_isisscripts"); };
To use all functions, you need the stilts tool, which is related to TOPCAT. You can install it as a package:
sudo apt-get install stilts
Only if this does not work:
mkdir stilts; cd stilts wget http://www.star.bris.ac.uk/~mbt/stilts/stilts.jar wget 'http://www.star.bris.ac.uk/~mbt/stilts/stilts' chmod +x stilts sudo cp * /usr/bin/
Without root, you can add the folder that contains stilts to your $PATH in ~/.bashrc or ~/.cshrc.
To test if the scripts work, try for example:
isis rmy; s = query_photometry ("HZ44"); s.print(); help query_photometry q exit;
Known issues:
1) On Ubuntu 22, xfig/fig2dev 3.2.8b are the standard. This contains a bug that will prevent correct labels. Fix this by compiling xfig/fig2dev 3.2.9 from source.