This is a guide for advanced bearded users. If you don’t have a beard, don’t try this at home.
I wrote previously about how to do this on Ubuntu 10.04. Today I’d like to be more explicit so that OSX users can understand how to download and build the latest code. I’m going to make an assumption that your OSX system has Macports. To start us out, here are the packages that you are going to need on your OSX system.
sudo apt-get install libtool git-core subversion cmake xz
If you are using OSX 10.7 Lion: You’ll need to also manually install the OSX 10.5 SDK. This is required for building against ISIS since they currently only have a 10.5 version of their binary. This also provides a more stable compiler in my opinion.
Another tricky part is that you need to compile your own copy of GNU Coreutils. This is required since Binary Builder was written with Linux systems in mind and not the weird FreeBSD like things in OSX. We don’t use macports for this step because their scripts tend to install a ‘g’ prefix on every executable. Building GNU Coreutils would look something like the following:
xz –d coreutils-8.16.tar.xz
tar xf coreutils-8.16.tar.xz
./configure --prefix $PWD/build
make install -j 15
Since building against ISIS requires recreating their development environment, we provided a fancy script to do this for you. It’s called Binary Builder and it’s available on Github. This script currently supports Ubuntu, OSX, OpenSUSE, and Fedora. Someday I’ll figure out why Debian tanks. Anyways, here’s how to get BB working so that it creates a development environment for building VW and ASP against ISIS.
git clone https://github.com/NeoGeographyToolkit/BinaryBuilder.git
./build.py --dev-env --coreutils ~/packages/coreutils-8.16/build/bin
To those of you comparing that command to my previous article, you’ll see that we have used one new argument. The ‘coreutils’ option tells BB where to find GNU versions of cp, echo, mv, and the like.
'All Done!' screen from Binary Builder
When you see an ‘All done!’, you’ll then have a completed build from Binary Builder. It’s good to package this build up so that it can be reused later.
./make-dist.py --include all --set-name BaseSystem last-completed-run/install
This tarball will house all the headers, libraries, and a copy of ISIS that you need to proceed. You can also share this tarball with our users who have similar systems. Now it’s time to deploy this BaseSystem tarball into a position where your copy of Vision Workbench and Stereo Pipeline can use it.
./deploy-base.py BaseSystem-*.tar.gz ~/projects/base_system
Installing Vision Workbench
You’re ready for step 2. This is pretty straight forward. You should notice that the deploy-base script produced config.options for both Vision Workbench and Stereo Pipeline. A config.options script is just another way to feed the arguments to ./configure. When we install Vision Workbench, the base options in config.options.vw should be fine for us.
git clone https://github.com/visionworkbench/visionworkbench.git
cp ~/projects/base_system/config.options.vw config.options
./autogen && ./configure
make -j <N Processors>
make check -j <N Processors>
All unit tests should pass at this point.
Installing Ames Stereo Pipeline
git clone https://github.com/NeoGeographyToolkit/StereoPipeline.git
cp ~/projects/base_system/config.options.asp config.options
We’re going to take a moment to deviate here. At this point you will need to make some modifications to your copy of ‘config.options’ for Ames Stereo Pipeline. You need to modify the variable ‘VW’ to be equal to the install (prefix) path that you used. In this example, it should be set to ‘~/projects/visionworkbench/build’. You can also take this time to flip other bits that you find interesting. For example, there’s a ENABLE_MODULE_CONTROLNETTK variable that you can set equal to ‘yes’ which would enable prototype utilities to manipulate control networks. Once you’re done playing around, finish your build of ASP.
./autogen && ./configure
make -j <N processors>
You can also run ‘make check’, you just need to have your ISIS3DATA set up. You can fall back to your own install of ISIS and everything should work fine. If it wasn’t clear before, you’ll find the executables in “~/projects/visionworkbench/build/bin” and “~/projects/StereoPipeline/build/bin”.