Wednesday, October 14, 2009

Updating to Subversion 1.6.5

I recently attempted to install version 1.6.5 of Subversion on my Solaris 10 server. Everything would have gone very smoothly, but one of my synapses misfired and took me on an unwelcome detour for a couple hours. When it was over, I was embarrassed, but instead of hiding my head in the screen, I put my (brief) story out here so you can learn from my mistake. The other reason is because the particular error I had to diagnose was almost non-existent in Internet searches.

Here was my situation: I had been using Subversion 1.4.5 for about a year or so, but it was growing long in the tooth and some of my development tool updates were looking for a more current version to work with. After doing a little research, I decided to plunge into the latest release of Subversion and get all my Subversion-aware tools updated.

My server ran Solaris 10, so I searched a favorite site, sunfreeware.com, to see if I could get a binary Subversion package and avoid the tedium of compiling it myself. I found it there and proceeded to check its dependencies on other packages. It required the latest, greatest Apache server 2.2.14. No big deal, I thought. OK, in addition to an Apache update, there were about ten other packages I had to replace first. I did that. So far, so good. Now grab Apache.

I was already running version 2.2.6, so I didn't need to change anything...well maybe a few things. I needed to make a backup of my customized files so I didn't overwrite anything. I tarred up my conf, htdocs, icons, lib, modules, and smf (Solaris service management facility files) directories and saved them to a place that wouldn't get lost. Now I downloaded the Apache 2.2.14 package and installed it. Everything was going smooth as silk. Now restore my customized files and install Subversion 1.6.5. Great. Fire it up.

Oops. Mistake! The new Apache came with a whole lot of new libraries and modules recompiled for the update. When I restored my customizations, I clobbered most of the new libraries and modules. When I attempted to start Apache, I was getting what I thought was a Subversion error. I had to dig into the startup log, in my case /var/svc/log/network-http:apache2.log. I found this message:


[ Oct 14 20:06:24 Executing start method ("/lib/svc/method/http-apache2 start") ]

httpd: Syntax error on line 526 of /usr/local/apache2/conf/httpd.conf: Syntax error on line 6 of /usr/local/www/conf/extra/httpd-subversion.conf: Cannot load /usr/local/www/modules/mod_dav_svn.so into server: ld.so.1: httpd: fatal: relocation error: file /usr/local/lib/libsvn_subr-1.so.0: symbol apr_memcache_getp: referenced symbol not found

[ Oct 14 20:06:24 Method "start" exited with status 1 ]



Really confusing, because the dynamic libraries it was complaining about were already installed. So why couldn't it find the missing symbol. I hunted through the Apache and Subversion web sites and found out the latest Apache also used the latest (within days) Apache Portable Runtime libraries. But they were supposed to be bundled with Apache. What was wrong?

"PEBCAK!" was my answer. When I restored my customizations I overwrote the new libraries with the ones I had from Apache 2.2.6, obliterating the functions required by the new Subversion (and eventually, Apache). Reinstalling the Apache 2.2.14 package and selectively restoring only my conf and htdocs directories fixed the error.

Just shows how casual thinking - Oh, look! A simple update! - can get you into trouble. If you found this post useful and it saved you some time, drop me a comment. I'd like to know my self-inflicted aggravation spared someone else's.

Some days it is best just to sit back, take a deep breath, and just laugh at yourself!

No comments:

Post a Comment