Biboroku

Installing SExtractor on Mac OS X Snow Leopard

Written by Taro Sato on . Tagged: astro sysadmin OS X

(November 25, 2010) I screwed up SExtractor installation for no reason and in an attempt to fix it, I’ve found a few things.  After wasting a few hours again, I think this installation note can work for most people who can actually build software from source… I think the usefulness of this note will be limited though, as a new release of SExtractor appears imminent.

Installing from Fink

Fink has a version of SExtractor. I can install this via the command fink install.

$ fink install sextractor

If Fink is already installed, this may be the most trouble free way of installing SExtractor.

Installing from Source

IMPORTANT: I need FFTW and ATLAS installed already, and assume that FFTW was installed at /usr/local/fftw, and ATLAS at /usr/local/atlas following the source install procedures described in those notes. Make sure that you build both double and single precision versions of FFTW by going through the make procedure twice to install both. Build both of them from source, and do not use the libraries from, say, Fink; otherwise dependency hell might arise. So, if I have Fink or Scisoft installed, put them away during the installation to avoid path problems. For example, temporarily rename /sw to /sw.tmp to put Fink away, /usr/local/scisoft to /usr/local/scisoft.tmp to put Scisoft away. (Or alternatively I can “comment out” from your start up shell script those lines that set up Fink and Scisoft, so that environment variables won’t include paths to these things.) Then restart the computer, and start the whole installation process (that is, including FFTW and ATLAS).

Download the SExtractor source into a temporary directory:

$ mkdir tmp
$ cd tmp
... download sextractor-2.8.6.tar.gz
$ tar -xvzf sex*.tar.gz
$ cd sextractor-2.8.6
$ ./configure --prefix=/usr/local/sextractor-2.8.6 \
    --with-atlas=/usr/local/atlas/lib --with-atlas-incdir=/usr/local/atlas/include \
    --with-fftw=/usr/local/fftw/lib --with-fftw-incdir=/usr/local/fftw/include \
    --enable-threads
$ make
$ sudo make install
$ ln -s /usr/local/sextractor-2.8.6 /usr/local/sextractor
$ sudo cp -rp config /usr/local/sextractor

This will install SExtractor at /usr/local/sextractor-2.8.6 (which is aliased by /usr/local/sextractor) and an executable command sex will be located at /usr/local/sextractor/bin/sex. Make a simlink to that binary /usr/local/bin to make it available system-wide. I might also want to make a simlink to /usr/local/sextractor/bin/ldactoasc, which is a utility command that might be useful.  The last line copies the SExtractor configuration files and convolution masks to /usr/local/sextractor/config. The default convolution masks are often used so it may be a good idea to keep them under the same installation directory.

Hope this is it!

What if Make Stops with an Error?

There may be a bug in ./configure script that makes the --with-fftw-incdir option to be not honored. If the make stops with errors complaining as in error: fftw3.h: No such file or directory despite that I have installed FFTW properly, copy /usr/local/fftw/include/fftw3.h to the sextractor-2.8.6/src directory before doing make. It will compile fine then.

Update History

November 25, 2010 — Made the procedure description a bit more elaborate where things may fail.

comments powered by Disqus