Skip to content

Compiling Subversion with SSL Support

June 1, 2006

A project I’m working on has finally gotten to the point of needing a source code repository (w00t! finally some coding!), and it seemed like a good time to give Subversion a spin. I downloaded the source, checked out the configuration options, and built it with Apache APXS support just for kicks. It was a piece of cake.

Afterwards, I realized that we’ll need to talk to an offsite repository over HTTPS, which Subversion doesn’t support by default, according to svnadmin status. No problem, I think- I’ll just add the –with-ssl flag and we’re off. WRONG. It Seems Subversion relies on something called Neon- Subversion’s HTTP library- and the configure stage would always barf on some missing SSL libraries:

checking for library containing RSA_new... not found
configure: error: could not find library containing RSA_new
configure failed for neon

The SSL libraries are in my LD_LIBRARY_PATH, and nothing’s ever complained about it in the past. :-/ No amount of configuration flag tweaking with –with-libs and –includedir helped. There was a reference about SSL support troubles in the INSTALL doc, but it only applied to RedHat. Some searching around suggested limited success by setting a bunch of other environment variables (sorry, I can’t find the source again that might have pointed me towards this winning combination), so I thought it was worth a shot setting them *all*:

setenv CC "gcc -I/usr/local/ssl/include -L/usr/local/ssl/lib"
setenv CFLAGS "-O2 -g -I/usr/local/ssl/include"
setenv LDFLAGS "-L/usr/local/ssl/lib"
setenv CPP "gcc -E -I/usr/local/ssl/include"
./configure --prefix=/usr/local/subversion --with-apxs=/usr/local/apache2/bin/apxs --with-ssl --with-libs=/usr/local/ssl/lib --includedir=/usr/local/ssl/include

Finally success! Neon found its precious RSA_new method and all was good. A quick compilation and another svn –version showed the HTTPS scheme was now supported, and I successfully checked out a repository over a secured connection.

I know- this stuff isn’t sexy. But I wanted to get this out there for the search engines. Seems there are lots of others who’ve had this problem in the past…
If you just want the prebuild Sparc binaries, I’ve made them available on Mediacast. You’ll need the following packages, all available from gdbm, libiconv, expat, libgcc, openssl. I’ll have to build a Solaris x86 version at some point- if there’s interest in making the precompiled version available, just drop a comment here…


From → Misc

  1. If you’re on Solaris 10, you can use the Solaris 10 SSL libs which are in /usr/sfw/ and don’t need to set LD_LIBRARY_PATH or something like this.

  2. icfantv permalink

    I’m running Ubuntu and had this problem and it turns out I didn’t have the openssl-dev package installed. apt-get installing fixed the issue.

  3. chrome permalink

    The solaris 10 Openssl libraries are too old to use with the latest version of Subversion.

Leave a Reply

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

You are commenting using your 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

%d bloggers like this: