Skip to content
This repository has been archived by the owner on May 29, 2022. It is now read-only.

Custom Build Environments

Bryan Masamitsu Parsons edited this page Sep 25, 2018 · 1 revision

This page discusses some details about building the GPSTk under environments that don't just provide all the dependencies.

The real 'trick' is in building the python bindings. Basically the first python executable found in the $PATH is used to determine what to build the bindings against.

OS X with minimal macports

This uses the Apple compiler and system default python.

compiler install

Install Xcode and Command Line Tools from either the Apple app store or a download. It used to be that the Xcode app had to be run at least once to accept the license. All other use of those tools will be from the command line.

macports install

Download and install macports installer

$ sudo port selfupdate
$ sudo port install cmake

swig

Download the tarball for the 2.0.12 version of swig from sourceforge. Note that later versions won't build the bindings correctly (yet).

$ tar -zxf swig-2.0.12.tar.gz
$ cd swig-2.0.12
$ ./configure; make; sudo make install

building gpstk

At this point the gpstk should build and pass all tests. This builds and installs to the users ~/.local directory.

cd ~/git/gpstk
./build.sh -tveu

Note that OS X pythons will not automagically look in the ~/.local/lib... location that the gpstk python bindings are installed. One way around this is to set PYTHONPATH=~/.local/lib/python2.7/site-packages

OS X with macports python

$ sudo port install cmake python27
$ sudo port select --set python python27

Install swig as above. Make sure that /opt/local/bin appears in the PATH before /usr/bin. Then build as above.

OS X with anaconda python

Install swig as above. Make sure that ~/anaconda appears in the PATH before /usr/bin or /opt/local/bin. Then build as above. As of April 2016, that is still giving an error when I try to load the bindings...