Difference between revisions of "Install ISIS on Mac"
(updated for macOS 11.6 "Big Sur" and added section about stellar isisscripts) |
|||
Line 1: | Line 1: | ||
− | This instruction is intended for Mac OS X | + | This instruction is intended for Mac OS X 11.6 (big sur) users to "completely" install ISIS including the modules for: gsl, xfig, isisscripts. It was tested on an Intel machine - no ARM. |
− | Assuming a fresh Mac OS X | + | Assuming a fresh Mac OS X 11.6 installation (alternatively make sure that /usr/local/ or the prefix path of the installation is empty). |
== 1. Install Xcode (latest version) and Xquartz == | == 1. Install Xcode (latest version) and Xquartz == | ||
Line 28: | Line 28: | ||
<pre> | <pre> | ||
− | sudo port install | + | sudo port install gcc11 |
− | sudo port install gsl | + | sudo port install gsl |
− | sudo port install | + | sudo port install fig2dev |
</pre> | </pre> | ||
Line 36: | Line 36: | ||
== 4. Install HEADAS == | == 4. Install HEADAS == | ||
+ | This is not necessary if only the "stellar_isisscripts" will be used. | ||
* Download the latest version of [https://heasarc.gsfc.nasa.gov/lheasoft/download.html HEASOFT (source)] | * Download the latest version of [https://heasarc.gsfc.nasa.gov/lheasoft/download.html HEASOFT (source)] | ||
* Up until HEASOFT 6.15, XSPEC did not work properly on Mac OS X in 64bit mode. As of HEASOFT 6.16 this is no longer the case and the recommendation is to install everything in 64bit. You don't need to set anything to do that, but if you have old compiler flags set to "-m32", remove them! | * Up until HEASOFT 6.15, XSPEC did not work properly on Mac OS X in 64bit mode. As of HEASOFT 6.16 this is no longer the case and the recommendation is to install everything in 64bit. You don't need to set anything to do that, but if you have old compiler flags set to "-m32", remove them! | ||
<pre> | <pre> | ||
− | export GCC="/ | + | export GCC="/opt/local/bin/gcc-mp-11" |
− | export CC="/ | + | export CC="/opt/local/bin/gcc-mp-11" |
− | export CXX="/ | + | export CXX="/opt/local/bin/g++-mp-11" |
− | export FC="/opt/local/bin/gfortran-mp- | + | export FC="/opt/local/bin/gfortran-mp-11" # mac ports gfortran compiler |
</pre> | </pre> | ||
* create a directory in your $HOME called Software | * create a directory in your $HOME called Software | ||
Line 51: | Line 52: | ||
sudo make install | sudo make install | ||
</pre> | </pre> | ||
− | * Add the following to your . | + | * Add the following to your ~/.bash_profile (change this according to your terminal type and username) |
<pre> | <pre> | ||
export HEADAS="/Users/username/path/to/heasoft/" | export HEADAS="/Users/username/path/to/heasoft/" | ||
Line 62: | Line 63: | ||
</pre> | </pre> | ||
* apply the new settings to your terminal by either closing the current terminal windows and open a new terminal or by writing | * apply the new settings to your terminal by either closing the current terminal windows and open a new terminal or by writing | ||
− | <code>source ~/. | + | <code>source ~/.bash_profile</code> in your command line |
== 5. Install slang / slang modules / isis / isisscripts == | == 5. Install slang / slang modules / isis / isisscripts == | ||
− | First get the latest versions of slang / jed/ slgsl / slxfig / isis / isisscripts. I recommend using the git repositories. Go to the Software directory in your terminal and clone the repositories: | + | First get the latest versions of slang / jed/ slgsl / slxfig / slirp / isis / isisscripts. I recommend using the git repositories. Go to the Software directory in your terminal and clone the repositories: |
<pre> | <pre> | ||
− | git clone | + | git clone https://github.com/houckj/isis |
git clone git://git.jedsoft.org/git/slang.git | 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/slxfig.git | ||
git clone git://git.jedsoft.org/git/slgsl.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/jed.git | ||
+ | git clone git://git.jedsoft.org/git/slirp.git | ||
git clone http://www.sternwarte.uni-erlangen.de/git.public/isisscripts | git clone http://www.sternwarte.uni-erlangen.de/git.public/isisscripts | ||
</pre> | </pre> | ||
Line 85: | Line 87: | ||
<pre> | <pre> | ||
./configure --with-headas=$HEADAS | ./configure --with-headas=$HEADAS | ||
+ | make | ||
+ | sudo make install | ||
+ | </pre> | ||
+ | If your aim is to install the "stellar_isisscripts", you don't need HEADAS and you can instead do: | ||
+ | <pre> | ||
+ | sudo port install wget | ||
+ | sudo port install pgplot | ||
+ | sudo port install cfitsio | ||
+ | ./configure --with-pgplot=/opt/local/ --with-cfitsio=/opt/local/ --with-x=/opt/X11/ | ||
make | make | ||
sudo make install | sudo make install | ||
Line 112: | Line 123: | ||
</pre> | </pre> | ||
− | Install the isisscripts. | + | Install slirp. Go to the slirp directory |
+ | <pre> | ||
+ | ./configure | ||
+ | make | ||
+ | sudo make install | ||
+ | </pre> | ||
+ | |||
+ | Before building the isisscripts, install the "SLURP" perl module. | ||
+ | <pre> | ||
+ | perl -MCPAN -e shell | ||
+ | install File::Slurp | ||
+ | </pre> | ||
+ | |||
+ | Then go to the isisscripts directory and | ||
<pre> | <pre> | ||
make | make | ||
Line 120: | Line 144: | ||
<pre> | <pre> | ||
add_to_isis_load_path("/Path/To/isisscripts/share/"); | add_to_isis_load_path("/Path/To/isisscripts/share/"); | ||
+ | define ris() { require("isisscripts"); }; | ||
</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. | ||
− | == 6. Possible problems with other software == | + | == (6. Install stellar_isisscripts) == |
+ | |||
+ | Get the newest version of the stellar_isisscripts from git or ask Matti Dorsch. | ||
+ | <pre> | ||
+ | cd stellar_isisscripts | ||
+ | make | ||
+ | </pre> | ||
+ | |||
+ | Now compile some necessary C functions: | ||
+ | <pre> | ||
+ | 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 | ||
+ | </pre> | ||
+ | |||
+ | In the Makefile, change these two lines: | ||
+ | <pre> | ||
+ | SLANGINC = -I/usr/local/include -I/opt/local/include | ||
+ | SLANGLIB = -L/usr/local/lib -L/opt/local/lib -lslang | ||
+ | </pre> | ||
+ | |||
+ | Then: | ||
+ | <pre> | ||
+ | make | ||
+ | make test | ||
+ | rm c_functions-test.sl ; rm c_functions.o ; rm c_functions_glue.o ; rm c_functions_glue.c ; rm Makefile ; rm *~ | ||
+ | </pre> | ||
+ | |||
+ | Create modify the [[ISIS auto start (.isisrc)|.isisrc]] file in your <tt>$HOME</tt> directory and add the following line | ||
+ | <pre> | ||
+ | add_to_isis_load_path("/Path/To/stellar_isisscripts/share/"); | ||
+ | define rmy() { require("stellar_isisscripts"); }; | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | == 7. Possible problems with other software == | ||
=== XMM SAS === | === XMM SAS === | ||
The XMM SAS resets part of your $PATH variable and uses its some of its own libraries. This might break some programs of HEASOFT when the SAS is loaded. As our <tt>xmmscripts</tt> rely on the <tt>ftools</tt>, this behavior is highly inconvenient. | The XMM SAS resets part of your $PATH variable and uses its some of its own libraries. This might break some programs of HEASOFT when the SAS is loaded. As our <tt>xmmscripts</tt> rely on the <tt>ftools</tt>, this behavior is highly inconvenient. |
Revision as of 17:54, 19 November 2021
This instruction is intended for Mac OS X 11.6 (big sur) users to "completely" install ISIS including the modules for: gsl, xfig, isisscripts. It was tested on an Intel machine - no ARM.
Assuming a fresh Mac OS X 11.6 installation (alternatively make sure that /usr/local/ or the prefix path of the installation is empty).
1. Install Xcode (latest version) and Xquartz
To check whether Xcode is installed execute: \\
xcode-select -p
on command line
If you see /Applications/Xcode.app/Contents/Developer
it should be installed.
Use the App Store to update or install Xcode
Execute xcode-select --install
on command line to install the Xcode command line tools
Xquartz / X11 is no longer included in the latest versions of Mac OS X and need to be installed separately. X11 is also no longer available from Apple directly, but has to be obtained from the web. Download X11 and install it. Note: if this link is out of date, search the Web for "OS X Xquartz".
After installation the X11 libraries should now be available in /opt/X11/
2. Install Mac Ports
Fink could also work, the differences should be some package names and the location of some libraries which should be /opt/local/
for Mac Ports or /sw/local/
for Fink.
This instruction assumes that Mac Ports will be installed.
3. Install packages with Mac Ports
There are several packages including their dependencies to be installed. I recommend installing everything with the universal flag set (which includes 32bit and 64bit versions)
sudo port install gcc11 sudo port install gsl sudo port install fig2dev
These packages install a necessary gfortran compiler as well as necessary libraries to build the slgsl / slxfig module for slang / isis.
4. Install HEADAS
This is not necessary if only the "stellar_isisscripts" will be used.
- Download the latest version of HEASOFT (source)
- Up until HEASOFT 6.15, XSPEC did not work properly on Mac OS X in 64bit mode. As of HEASOFT 6.16 this is no longer the case and the recommendation is to install everything in 64bit. You don't need to set anything to do that, but if you have old compiler flags set to "-m32", remove them!
export GCC="/opt/local/bin/gcc-mp-11" export CC="/opt/local/bin/gcc-mp-11" export CXX="/opt/local/bin/g++-mp-11" export FC="/opt/local/bin/gfortran-mp-11" # mac ports gfortran compiler
- create a directory in your $HOME called Software
- unpack the HEADAS tar file in this directory
- Install HEASOFT from source but use the following configurations
./configure --x-libraries=/opt/X11/lib --x-includes=/opt/X11/include make sudo make install
- Add the following to your ~/.bash_profile (change this according to your terminal type and username)
export HEADAS="/Users/username/path/to/heasoft/" alias heainit="source $HEADAS/headas-init.sh heainit
The HEADAS path could/should look something like this:
$HEADAS=/Users/chgross/Software/heasoft-6.16/x86-apple-darwin14.1.0/
- apply the new settings to your terminal by either closing the current terminal windows and open a new terminal or by writing
source ~/.bash_profile
in your command line
5. Install slang / slang modules / isis / isisscripts
First get the latest versions of slang / jed/ slgsl / slxfig / slirp / isis / isisscripts. 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
Install slang. Go to the slang directory.
./configure --with-png=/opt/local/ make sudo make install
Install isis. Go to the isis directory
./configure --with-headas=$HEADAS make sudo make install
If your aim is to install the "stellar_isisscripts", you don't need HEADAS and you can instead do:
sudo port install wget sudo port install pgplot sudo port install cfitsio ./configure --with-pgplot=/opt/local/ --with-cfitsio=/opt/local/ --with-x=/opt/X11/ make sudo make install
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
./configure --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib make sudo make install
Install slgsl. Go to the slgsl directory
./configure --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib --with-gsl=/opt/local/ make sudo make install
Install slxfig. Go to the slxfig directory
./configure --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib make sudo make install
Install slirp. Go to the slirp directory
./configure make sudo make install
Before building the isisscripts, install the "SLURP" perl module.
perl -MCPAN -e shell install File::Slurp
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"); };
This allows the easy access to require("isisscripts") in isis.
(6. Install stellar_isisscripts)
Get the newest version of the stellar_isisscripts from git or ask Matti Dorsch.
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
In the Makefile, change these two lines:
SLANGINC = -I/usr/local/include -I/opt/local/include SLANGLIB = -L/usr/local/lib -L/opt/local/lib -lslang
Then:
make make test rm c_functions-test.sl ; rm c_functions.o ; rm c_functions_glue.o ; rm c_functions_glue.c ; rm Makefile ; rm *~
Create 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"); };
7. Possible problems with other software
XMM SAS
The XMM SAS resets part of your $PATH variable and uses its some of its own libraries. This might break some programs of HEASOFT when the SAS is loaded. As our xmmscripts rely on the ftools, this behavior is highly inconvenient. As a workaround install the HEASOFT wrapper by following the instructions here.
This will create a new directory with the executables of HEASOFT. Add this directory to your $PATH variable (in front of the rest of $PATH)!