logo

Installing Subversion Bindings for Warehouse App

logo

warehouse

A number of months ago ActiveReload came on the scene with a new application called “Warehouse” which makes for a really aesthetic and functional way of managing repositories in Subversion.

The app requires you to install the Ruby Subversion Bindings, and while it may seem quick in the instructions, it wasn’t like that for me installing on RHEL 5. (I’m following through the instructions listed here).

Be warned – you may want to go grab a cup of java and get comfortable, because this is a long one …

First of all I have a problem extracting and installing swig.

1
2
3
4
5
6
7
8
9
10
$ tar xzvf swig-1.3.31.tar.gz
swig-1.3.31/
swig-1.3.31/Doc/
...
swig-1.3.31/Doc/Manual/SWIGDocumentation.pdf

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now

I don’t know why it happened and why the file couldn’t extract so instead I went straight to the main sourceforge page (http://sourceforge.net/projects/swig/), download the latest build, and uploaded it to my server. Then follow the instructions using the new filename (for me it was “swig-1.3.32-rc1.tar.gz”).

1
2
3
4
5
$ tar xzvf swig-1.3.32-rc1.tar.gz
$ cd ./swig-1.3.32-rc1
$ sudo ./configure
$ sudo make
$ sudo make install

This got me through the ./configure, but during the make I received an error that pointed to a missing “g++”.

1
2
3
4
5
6
./Tools/config/depcomp: line 566: exec: g++: not found
make[2]: *** [Modules/allegrocl.o] Error 127
make[2]: Leaving directory `/home/richa088/swig-1.3.32-rc1/Source'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/richa088/swig-1.3.32-rc1/Source'

make: *** [source] Error 2

I then found out (by way of a 2 hour date with google) that by default RHEL5 doesn’t come with g++ installed. (I’m sure a much seasoned linuxologist would have figured it out quicker, but I digress.) So, using yum:

1
2
3
4
5
6
7
8
9
10
$ sudo yum install gcc-c++
...
Transaction Test Succeeded
Running Transaction
Installing: libstdc++-devel              ######################### [1/2]
Installing: gcc-c++                      ######################### [2/2]

Installed: gcc-c++.i386 0:4.1.1-52.el5.2
Dependency Installed: libstdc++-devel.i386 0:4.1.1-52.el5.2
Complete!

In order to get the make to pass, I then had to re-run the configure. The make, and install succeeded afterwards.

1
2
3
$ sudo ./configure
$ sudo make
$ sudo make install

But it’s not over yet. For step 2, I ran then tried to run the “make swig-rb” and received another error regarding the Apache Portable Runtime not being installed:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
============================================
WARNING: skipping the build of mod_dav_svn
--with-apxs or --with-apache must be used
============================================
configure: Apache Portable Runtime (APR) library configuration
checking for APR... no
configure: WARNING: APR not found
The Apache Portable Runtime (APR) library cannot be found.
Please install APR on this system and supply the appropriate
--with-apr option to 'configure'

or

get it with SVN and put it in a subdirectory of this source:
...
configure: error: no suitable apr found

As this post reveals, there is some newness between the Apache Portable Runtime (APR) and neon (don’t even ask me to explain) which make for an error in trying to install the bindings (the command “make swig-rb”). So to get by this, I followed the instructions by Josh Goebel at this pastie to get by. ***Note that on line 4 you need to omit the “tar.gz” as I’ve indicated below.

1
2
3
4
5
6
$ cd neon-0.27.1
$ sudo ./configure --with-ssl --with-libs=/usr/local
...
checking for expat.h... no
checking for xml2-config... no
configure: error: no XML parser was found: expat or libxml 2.x required

WOW!!! When it rains it pours … while running the first config for neon, the process stopped because I didn’t have an XML parser on the system. (I’d thought the folks who set it up had done so, but that wasn’t the case.) So I installed expat with:

1
2
3
4
5
6
7
8
9
10
11
$ yum install expat-devel
...
(1/1): expat-devel-1.95.8 100% |=========================| 130 kB    00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: expat-devel                  ######################### [1/1]

Installed: expat-devel.i386 0:1.95.8-8.2.1
Complete!

And after continuing through the remainder of the pastie, I’ve finally got subversion bindings installed! And now for the moment of truth …

1
2
$ -bash-3.1$ ruby -e 'puts require("svn/core")'
true

Eureka! The test passed! Now I’ve got to actually install Warehouse … but I’ll save that for tomorrow. And I won’t even tell you how long it took me to finish all this stuff.

Here’s the complete pastie with my additions (depending on how your admin set things up you may have to sudo each line):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$ sudo yum install expat-devel (if you don't have an XML parser installed)
$ cd /usr/local/src
$ curl -O http://www.webdav.org/neon/neon-0.27.1.tar.gz
$ tar zxvf neon-0.27.1.tar.gz
$ cd neon-0.27.1
$ ./configure --with-ssl --with-libs=/usr/local
$ make
$ sudo make install
$ cd ..
$ curl -O http://subversion.tigris.org/downloads/subversion-1.4.3.tar.gz
$ curl -O http://subversion.tigris.org/downloads/subversion-deps-1.4.3.tar.gz
$ tar xzvf subversion-1.4.3.tar.gz
$ tar xzvf subversion-deps-1.4.3.tar.gz
$ cd subversion-1.4.3
$ ./configure --prefix=/usr/local --with-openssl --with-ssl --with-zlib --with-neon=/usr/local
$ make
$ sudo make install
$ make swig-rb
$ make check-swig-rb (Most of these test'
s should pass)
$ sudo make install-swig-rb
  • Not sure if this is a 2009 development, but at least on CentOS 5.3, you can just do "yum install subversion-ruby".
  • thanks for your post, it helped me
blog comments powered by Disqus
logo
logo
Powered by Wordpress