Mili on Mac

Mili 1.11.1 is a pain to build on Mac. I will eventually edit build_visit to do it right but this will record what I've done for now. The build_visit script has 2 problems on Mac with respect to Mili:

  1. Mili's configure script fails on Mac because it won't locate gmake
  2. Several compilation errors in the sources break the build

To correct build_visit on Mac we'll need to:

  1. Skip Mili's configure step
  2. Apply some more patches to the sources

Untar the mili sources and cd mili/src and then run the following script from that location:

#!/bin/sh

VISITDIR="/Users/whitlock2/Development/thirdparty_shared"
VISITARCH="i386-apple-darwin10_gcc-4.2"
MILI_VERSION="1.11.1"
MILI_COMPATIBILITY_VERSION="1.11.1"
INSTALLNAMEPATH="$VISITDIR/mili/${MILI_VERSION}/$VISITARCH/lib"

gcc -O2 -D_LARGEFILE64_SOURCE \
     mili.c dep.c direc.c eprtf.c gahl.c io_mem.c mesh_u.c mr_funcs.c param.c \
     partition.c read_db.c sarray.c srec.c svar.c taurus_db.c taurus_mesh_u.c \
     taurus_srec.c taurus_svars.c taurus_util.c ti.c tidirc.c util.c wrap_c.c \
     write_db.c\
     -dynamiclib -o libmili.dylib  \
     -Wl,-headerpad_max_install_names \
     -Wl,-install_name,$INSTALLNAMEPATH/libmili.dylib \
     -Wl,-compatibility_version,$MILI_COMPATIBILITY_VERSION \
     -Wl,-current_version,$MILI_VERSION
  • You'll have to edit mesh_u.c and comment out the inclusion of values.h
  • You'll also need to edit mili_private.h and add extern in front of several variables declared in that header file