Saturday, May 1, 2010

RATRAN on Mac OS X

Mac OS X doesn't like the defaults built in to RATRAN. It died unhappily with errors like:

ld_classic: can't locate file for: -lcrt0.o
and
ld: warning: in /usr/local/lib//libcfitsio.a, file is not of required architecture


In order to get it to run, I had to do the following:
  1. Install CFITSIO with CFLAGS="-arch x86_64 -arch i386 -g -O2" to /usr/local/lib
  2. Edit the sky/Makefile OPT variable (line 23) to read:
    OPT = -I. -O2 -fno-automatic -arch x86_64
Also, you need to set up system variables:

export RATRAN=/path/to/Ratran
export RATRANRUN=/path/to/Ratran/run

No comments: