Building Starlink on OS X

Dependencies

This is the list of dependencies that must be installed on a totally new OS X build before you can build Starlink. These were derived from a yosemite install upgraded from a clean Snow Leopard install in April 2015

You will need to ensure that your path contains all of these; in most cases this will be set-up by the normal software installation procedure.

Running the Install

The basic Starlink install consists of running the following commands after setting up the appropriate environment:

./bootstrap
make configure-deps
./configure -C
make world
cd thirdparty/perlsys/perlmods
./build-modules.sh

However, setting up the correct build environemnt

Here is an example sh script. It was adapated from Graham Bell's Jenkins config git repo, and a version of this currently was used to produce the star-2015A release.

#! /usr/env bash

# Set the location of produced Starlink build
export STARLINK_DIR=/stardev 

# Set the location for cpan logs/building.
export PERL_CPANM_HOME=~/cpanm


# Unset some variables that can cause trouble.
unset STARLINK
unset INSTALL
unset CFLAGS
unset CXXFLAGS
unset FFLAGS


# Set up compiler flags.
export LC_ALL=C
export FC=gfortran
export F77=gfortran
export CC=gcc
export CXX=g++


# build for  multiple versions of mac osx
export LDFLAGS="-mmacosx-version-min=10.6"
export CFLAGS="-mmacosx-version-min=10.6"
export CXXFLAGS="-mmacosx-version-min=10.6"

export STARCONF_DEFAULT_STARLINK=${STARLINK_DIR}
export STARCONF_DEFAULT_PREFIX=${STARLINK_DIR}


export PATH=${STARCONF_DEFAULT_PREFIX}/buildsupport/bin:${STARCONF_DEFAULT_PREFIX}/bin:${PATH}
export DYLD_LIBRARY_PATH=$STARCONF_DEFAULT_STARLINK/lib

# Print out lines to screen
set -x

# Remove whole directory as we would get a failure with manifests/* if it were empty.
rm -rf ${STARCONF_DEFAULT_STARLINK}/manifests

# Ensure submodules don't have anything in them.
git submodule foreach git clean -fdx
git submodule foreach git reset --hard HEAD

# BOOTSTRAP -- 1st stage of build!
./bootstrap

# Remove symbolic link which can cause problems on MacOS if it still exists
rm -f ${STARCONF_DEFAULT_PREFIX}/lib/iwidgets

# BUILD stages 2 & 3!
make configure-deps
./configure -C

# Remove more symbolic links which are troublesome on MacOS
rm -f ${STARCONF_DEFAULT_PREFIX}/include/vtk

# BUILD STAGE 4!
make world

# BUILD STAGE 5!
cd thirdparty/perlsys/perlmods
./build-modules.sh

Starlink: BuildingStarlinkOnOSX (last edited 2015-04-10 23:47:34 by SarahGraves)