COMPILING QSVN ON OS X LEOPARD

QSvn is an excellent GUI Subversion client that runs on Linux, UNIX, Mac OS X, and Windows. Unlike a lot of other free options, QSvn is a real client and not a GUI wrapper for the command line. However, getting it to compile in Mac OS X 10.5.8 was a bit problematic. I thought I’d post the process in case anyone else needs assistance.

INSTALLATION REQUIREMENTS:

The current release of QSvn requires SVN 1.6.x. This is where OS X Leopard (10.5.8 or less) runs in problems when compiling. Leopard shipped with SVN 1.4.4. Even if you’ve done all your system updates, this version apparently does not get updated. To remedy this, you’ll want to pull down the Universal binaries from collab.net and install them. This updated version will install the SVN application file in /opt/subversion/bin. In contrast, the old 1.4.4 version resides in /usr/bin. (By the way, Snow Leopard ships with SVN 1.6.5 and should be fine for compiling QSvn though I haven’t test this yet.)

You’ll want to verify that your install went correctly. To do this, open up Terminal (>Applications->Utilities->Terminal>) and type the command below:

bash-3.2$ svn –version

Press “return” and you should see something like the following output:

svn, version 1.6.6 (r40053)
compiled Oct 22 2009, 14:13:09

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

Now that we have the correct version of Subversion installed, we need to add it to our path so it can be called from any directory and thus look to the correct library for compiling the application. To do this, ‘cd’ into your home directory:

bash-3.2$ cd ~

Next we are going to create a new file. (If this opens an existing file, that is okay. Just append this next step at the bottom.)

bash-3.2$ nano .bash_profile

Add this line:

bash-3.2$ export PATH=/opt/subversion/bin/:$PATH

ctrl+x and press ‘y‘ to save and exit. Then execute the following command to load our bash_profile:

bash-3.2$ . .bash_profile

Download the latest build of QSvn here if you haven’t already done so. You’ll want the tar.gz file.

From the directory where you saved the QSvn binaries execute the command below to extract it (or extract it from Finder.)

bash-3.2$ tar zxfv qsvn-0.8.3-tar.gz

Next, change directories in you newly created qsvn-0.8.3 folder.

bash-3.2$ cd qsvn-0.8.3

Now create a new directory called “build” and change into that directory.

bash-3.2$ mkdir build
bash-3.2$ cd build/

You’ll want to either modify the script file ../scripts or simply run the following from within the build folder. This differs from the release.sh file located in the scripts folder in that it specifically points to the Subversion install path /opt/subversion instead of default /usr/bin

bash-3.2$ cmake -G “Unix Makefiles” -D CMAKE_BUILD_TYPE=”Release” -D SUBVERSION_INSTALL_PATH=”/opt/subversion/” /full_path_to/qsvn-0.8.3/src/

If you didn’t receive any errors, you should be ready to compile. Enter the following and you’ll be prompted for your administrator (root) password:

bash-3.2$ sudo make install

Enter your password when prompted:

Password:

If all goes well you should end up seeing something like below.

Scanning dependencies of target svnqt … [100%] Built target simpletest2 Install the project… — Install configuration: “Release” — Installing: /usr/local/bin/qsvn — Installing: /usr/local/lib/libsvnqt.6.0.0.dylib …

Now that it’s compiled and installed it’s time to test it out.

bash-3.2$ qsvn &

Thanks to Andreas Richter for developing this great application and for his assistance. Also thanks to Dale Blount for his assistance as well.

Leave a Reply

Your email address will not be published. Required fields are marked *