Building Varnish Cache 3.0.3 from source in Mountain Lion, OSX 10.8.2

If you want to install Varnish Cache in OSX, I highly recommend using Homebrew’s recipe for installing Varnish. Easy!

But if you want to build and run Varnish Cache from github, here is a little step-by-step checklist for you.

A shopping list of applications you’ll need for your Mountain Lion:

  • Homebrew 0.9.3
  • Xcode 4.5.2, via Appstore
  • Command Line Tool for Mountain Lion – November 1st 2012

You’ll need the following dependencies via Homebrew

  • automake, note that this has to be version 1.12. I have tested it with 1.13 and you will run into obsolete AM_CONFIG_HEADER. 
  • libtool
  • pcre
  • pkg-config

You’ll need docutils for rst2man

Run the following steps:

  1. brew install the above dependencies
  2. for automake, you will need to switch it to 1.12. See below
  3. install docutils
  4. git checkout 3.0.3 branch of Varnish Cache
  5. run ./autogen.sh
  6. run ./configure
  7. make install

To install another version of automake with Homebrew:

  1. Unlink the existing 1.13 version – brew unlink automake
  2. Get the list of versions available for automake – brew versions automake
  3. Copy the 1.12 information from git checkout…, for example git checkout 1e5eb62 /usr/local/Library/Formula/automake.rb
  4. cd into /usr/local/, or where ever else you have Homebrew storing your formula
  5. Paste the copied git information and this will check out the appropriate version of automake for you
  6. Install 1.12 – brew install automake
  7. Voila! You now have 1.12 version and you can switch between 1.13 or 1.12 by simply doing brew switch automake 1.13
Advertisements

One thought on “Building Varnish Cache 3.0.3 from source in Mountain Lion, OSX 10.8.2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s