Nico du Plessis

Building SVN 1.7 on Mac OS X Lion

I use Zennaware’s Cornerstone app for most of my svn source control tasks, and it’s great. One of the perks is that Cornerstone bundles its own svn libs, so it’s a nice and clean solution and they keep up with the latest releases, unlike Mac OS X.

Since Cornerstone allows you to choose which version of svn you want to use when you’re doing a check out, it can be an issue if you want to use a version newer than the binary that ships with Mac OS X. If you ever want to make use of the command line tool, you’ll need to choose an svn version that corresponds to the bundled binary. To work around this issue, I just downloaded and installed the latest version of svn from source.

Note: This article assumes that you have Xcode installed on your Mac OS X installation. You will need the developer tools to compile the svn source.

Open Terminal and execute the following:

Download and extract the source

1
2
3
4
5
mkdir ~/Desktop/svn
cd ~/Desktop/svn
curl http://apache.is.co.za/subversion/subversion-1.7.4.tar.bz2 > ./subversion-1.7.4.tar.bz2
tar -zxvf subversion-1.7.4.tar.bz2
cd subversion-1.7.4

Let’s build and install the binary

1
2
3
./configure --prefix=/usr/local
make
sudo make install

Test the installation

1
/usr/local/bin/svn --version

You should now see

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
svn, version 1.7.4 (r1295709)
   compiled May  6 2012, 20:53:23

Copyright (C) 2012 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme