Blog

Custom Subversion Build on Mac OS X

A few weeks back I found myself having to build subversion from scratch on Mac OS X. I think the version that comes shipped on the mac is a few revs back and if I recall we were having trouble with unfuddle, and their recommendation at the time (though they subsequently fixed the issue) was to upgrade your subversion client to the latest version. As of this writing that was v1.6.6

There was a serious "gotcha" that I ran across when trying to build the subversion libraries (I was getting an obscure "symbol not found: _ne_set_connect_timeout" error), and it had to do with the LDFLAGS environment variable that the auto-generated Makefile created. Here are my notes on what I had to do in order to get this working. Note: this assumes that you have all of the Mac Developer tools already installed. There are lots of posts on the interwebs on how to do that. First, you need to download and build from source the latest neon package - which is Subversion's HTTP Library. This is a pretty standard install (I typically do all of these as root):

wget http://www.webdav.org/neon/neon-0.29.0.tar.gz
tar xzf neon-0.29.0.tar.gz
cd neon-0.29.0
./configure --with-ssl
make
make install

Note in the previous the –with-ssl is important if you plan on connecting to secure subversion repositories (such as what we use at unfuddle).

Now here's where it gets a little tricky. First you downloand and configure like you typically would the subversion binaries:

wget http://subversion.tigris.org/downloads/subversion-1.6.6.tar.gz
tar xzf subversion-1.6.6.tar.gz
cd subversion-1.6.6

./configure --with-ssl --with-neon=/usr/local

But before you go ahead and issue the command make you need to edit the Makefile directly. This post ultimately helped a lot.

Search for the line that has the LDFLAGS variable assignment and change this to:

LDFLAGS =     -L/usr/local/lib -L/usr/lib $(EXTRA_LDFLAGS)

Now continue on as you normally would:

make
make install

And now you should be able to issue svn commands without a dreaded

dyld: lazy symbol binding failed: Symbol not found: _ne_set_connect_timeout

Error.