top bar

Difference between revisions of "Build on MacOS X"

(Getting dependencies)
(Configuring and building)
Line 43: Line 43:
   ./configure --help
   ./configure --help
If you use Java 6 (from Apple), use the following for the ./configure line:
If you use Java 6 ("Java for OS X" from Apple), use the following for the ./configure line:
If you use Java 6 (from Apple), use the following for the ./configure line:
<div style="width:625px"><pre>./configure --enable-imagej-plugin=/path/to/ImageJ \
<div style="width:625px"><pre>./configure --enable-imagej-plugin=/path/to/ImageJ \

Latest revision as of 15:54, 12 February 2015

This page is up to date for SVN r13224.

Getting the required tools

It is recommended that you use OS X 10.7 or later to build Micro-Manager, although earlier versions may work without too much trouble.

Get Xcode from Apple's App Store. Although we will only be using the command-line compilers and tools, make sure to start Xcode once and allow it to install the Command Line Tools.

A number of command-line tools are required to build Micro-Manager. The easiest way to obtain them is to use Homebrew:

 brew install autoconf automake libtool pkg-config swig subversion ant

Getting dependencies

Boost C++ Libraries are required to build Micro-Manager. It is easiest to install it using Homebrew:

 brew install boost

To build the Micro-Manager application, you also need the Java Development Kit. JDK 7 from Oracle is easiest to set up but is 64-bit only. (Micro-Manager Java source code is written in Java 6. You can also use Apple JDK 6 ("Java for OS X"), but you will need to pass some complicated flags to ./configure.) You will also need a copy of ImageJ 1.48 (it is best to use a clean copy, at least the first time you are building Micro-Manager). Extract this to any desired location.

If you want to build the Python wrapper (MMCorePy), you will need Python 2.7 or 3.x and NumPy. These can be installed from binary distributions or using Homebrew (Python 2 is also preinstalled in OS X).

Getting Micro-Manager source code

Check out Micro-Manager Source Code using Subversion. Place the main source tree (from micromanager2) and the 3rdpartypublic directory in the same parent directory.

Configuring and building

See doc/ for generic build instructions.

The most common way to build and install Micro-Manager is to run the following, in the root of the micromanager source tree:

 ./configure --enable-imagej-plugin=/path/to/ImageJ
 make fetchdeps   # Required since SVN r14001-r14016
 make install

The last step will print instructions for how to run the installed Micro-Manager.

To get help with ./configure options, type

 ./configure --help

If you use Java 6 ("Java for OS X" from Apple), use the following for the ./configure line:

./configure --enable-imagej-plugin=/path/to/ImageJ \
JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home \
JNI_CPPFLAGS=-I/Applications/ \
JAVACFLAGS="-Xlint:all,-serial -source 1.6 -target 1.6"

Device adapter dependencies

Some device adapters require extra dependencies. Most of these can be installed using Homebrew.

 # To build USBManager
 brew install libusb-compat
 # To build HIDManager
 brew install hidapi
 # To build dc1394 and IIDC
 brew install libdc1394
 # To build GPhoto2
 brew install libgphoto2 freeimage
 # To build OpenCVgrabber
 brew install opencv

See also: output of

 ./DeviceAdapters/configure --help


 ./configure --help=recursive

Any vendor frameworks (mostly camera SDKs) will be automatically detected if installed in the default location.

© Micro-Manager : Vale Lab, UCSF 2006-2011 | All Rights Reserved | Contact