Installing and Packaging Circos on OS X 10.8

Circos is a software package for visualizing data and information. It visualizes data in a circular layout — this makes Circos ideal for exploring relationships between objects or positions. There are other reasons why a circular layout is advantageous, not the least being the fact that it is attractive.

What is less immediately apparent until you start digging into the documentation is that actually making Circos run is a bit of a trick. I needed it not only running, but packaged for InstaDMG and Casper distribution. The documentation links to a variety of sources that are a confusing mash of helpful, slightly outdated, now-wrong and missing. To keep myself sane, I decided to document my own process, thus this post.

Easily the best starting point is Paulo Nuin’s excellent and clearly-written install procedure. Unfortunately, even at 10 months old, it’s slipping slightly out of date, and packages available from MacPorts enable skipping a few steps. Here’s how I did things.. A general familiarity with the command line is assumed.

Gather Your Materials

Other instructions provide direct links to files. Those links go stale quickly, so I’ve linked to source directories where possible.

  • Circos (currently at 0.63-4)
  • MacPorts
  • GD perl module (I have elected to use 2.49 rather than the current version, for reasons I shall explain shortly)
  • Xcode
  • JAMF Composer (or packaging tool of your choice, but I highly recommend something capable of snapshot comparisons…I won’t cover packaging this manually, as the tree just becomes needlessly complex)

Set Up Your Environment

Standard packaging rules: Clean system with no other apps running. I set mine up in a Mountain Lion VM and it worked a treat.

  • Install MacPorts
  • Install Xcode
    • Launch Xcode and accept the license agreement and device support install
    • Open Preferences > Downloads and install the Command Line Tools
    • Quit Xcode
  • Configure and update cpan
    • Open Terminal and issue the following commands (accepting the defaults as prompted)
    • sudo cpan
    • install CPAN <- Case sensitive
    • reload cpan

Take Your Snapshot

At this point you’re ready to start installing the modules required to run Circos, so take your starting snapshot. This will be a simple, standard package.

Install and Test Circos

Decompress the Circos download, and put the resulting directory where ever you want to run Circos for simplicity’s sake, I followed Paulo’s suggestion and placed it at /Applications/circos-0.63-4/. Circos comes with its own module tester, so let’s use it. Open Terminal, and

cd /Applications/circos-0.63-4/

This should return a list of installed and missing modules needed to run Circos. On a vanilla 10.8 install, that’ll look about like this:

ok Carp
ok Clone
fail Config::General is not usable (it or a sub-module is missing)
ok Cwd
ok Data::Dumper
ok Digest::MD5
ok File::Basename
ok File::Spec::Functions
ok File::Temp
ok FindBin
fail Font::TTF::Font is not usable (it or a sub-module is missing)
fail GD is not usable (it or a sub-module is missing)
fail GD::Image is not usable (it or a sub-module is missing)
fail GD::Polyline is not usable (it or a sub-module is missing)
ok Getopt::Long
ok IO::File
ok List::MoreUtils
ok List::Util
fail Math::Bezier is not usable (it or a sub-module is missing)
ok Math::BigFloat
ok Math::Round
fail Math::VecStat is not usable (it or a sub-module is missing)
ok Memoize
ok Params::Validate
ok Pod::Usage
fail Readonly is not usable (it or a sub-module is missing)
ok Regexp::Common
fail Set::IntSpan is not usable (it or a sub-module is missing)
ok Storable
ok Sys::Hostname
ok Text::Balanced
fail Text::Format is not usable (it or a sub-module is missing)
ok Time::HiRes

Install items required by Circos

It’s those “fail” entries we’re concerned with, of course. So at a bare minimum, we need to install:


We’ll do this using a mix of CPAN, build from source, and MacPorts. Since GD2 is available via MacPorts, let’s start there. The trick to know is that as of the 2.0.35 build of GD2, letting MacPorts install the fontconfig dependency seems to hard-hang the process. So:

sudo port install fontconfig
sudo port install gd2

Now, crank up CPAN, and let’s get started on the perl modules. Note that CPAN commands are case sensitive.

sudo cpan
install Config::General
install Font::TTF::Font
install Math::Bezier
install Math::VecStat
install Readonly
install Set::IntSpan
install Text::Format

If you run the test.module script at this point, everything should pass but the GD modules. Let’s take care of that. (A word about versions: There is a newer version of GD available from the BitBucket repo Paulo mentions, but they’ve changed compilation methods and I can’t for the life of me get it to build. If you can, I’d appreciate a how-to!) In the Finder, locate your GD-2.49 download and decompress it. In Terminal, move to the GD-2.49 directory you just decompressed, and issue the following commands:

perl Makefile.PL
sudo make install

When that’s done, cd back to Circos’ bin directory and re-run test.modules. Everything should now register okay. Then:

sudo ln -s /usr/bin/env /bin/env

This symlinks env to /bin. Circos is picky about finding it there. You could also add it to your path. At this point, Circos should be ready to rock.

cd /Applications/circos-0.63-4/example
ls  -lah

You should see circos.png and circos.svg with a creation date/time of…well, now.

Take your finished snapshot

All that remains is to finish your snapshot and package Circos! Use your standard procedure…no tweaking of permissions is required. But be sure to remove the extraneous junk that CPAN, et. al. leave strewn around your home directory!

CrashPlan PROe versus Java on OS X

We’ve recently begun changing our clients from local backup drives to CrashPlan PROe for backups. This is good. At the same time, Apple have dropped direct support for Java (which CrashPlan requires), and turned responsibility for development over to Oracle. Broadly, I think this is also good.

Since new Macs no longer ship with Java, users wanting the latest and greatest can simply download and install the SE 7 package from Oracle. CrashPlan, as of v3.3, wants SE 6. This is double-plus ungood, because once you have SE 7 installed, the Apple-provided SE 6 package will refuse to install, citing the presence of a newer version. Adding to the confusion is the fact that users with SE 6 who upgrade to SE 7 will have no problem, since installing 7 leaves 6 untouched. So the takeaways here are as follows.

  1. If a user has SE 6 installed, and upgrades to SE 7, CrashPlan will see and use the older version just fine.
  2. If a user has SE 7 installed and installs CrashPlan, the client will not operate. Resolve this by downgrading to SE 6. Open /Library/Java/JavaVirtualMachines, and remove the clearly-labeled 1.7 VM. Download the 1.6 installer from Apple (as of this writing, it’s 1.6.0_35), and install it. If the user needs or wants 1.7, you may subsequently install Oracle’s 1.7 package without repercussion. Then launch (or install) CrashPlan.

The long-term fix, of course, is for Code42 to update their client to recognize the 1.7 VM.

Note: This applies to OS X 10.7 and 10.8.

UPDATE: Code 42 has finally given me a formal response.

We still do not have a work-around for the issue of needing Java 6 for the CrashPlan PROe client. Our engineering team is working on getting this sorted, but, as this will require a change in code, nothing will be available until at least the the next patch release.”

Given the frequency of Java patches, I’m not sanguine about this not becoming an ongoing problem now that Oracle is providing OS X Java. We shall, I suppose, see.