Tuesday, 13 November 2007

building a static subversion...

Installing a latest version of subversion can be a real pain in the ass is you are not allowed the alter the base system (read: no root access) and the system administrator rather drinks coffee than keeping his/her system up2date.

Luckily most of the times the compiler is installed and so are the header files, so no worry I will provide you a way to get the bleeding edge to work :-)

First some boring, but handy background. Subversion uses several libraries and programs to extend it functionality, which all good programs should do ;-). Some of them are not optional and needs to be compiled first, these are apr, zlib and neon. 'Luckily' all external needed program sources are pre selected and put into the subversion-deps archive :-)

In order to avoid the library mess, I will try to use as many static libraries as possible. This might make your program feel to load a bit slower, but you do know for sure you are using the right libraries.

FYI: The --without-gssapi disables advanced authentication (kerberos and such) and the --without-swig disables the python bindings, cause python was not installed on the machine :-(


$ curl -O http://subversion.tigris.org/downloads/subversion-deps-1.4.5.tar.gz
$ curl -O http://subversion.tigris.org/downloads/subversion-1.4.5.tar.gz
$ tar -xvzf subversion-1.4.5.tar.gz
$ tar -xvzf subversion-deps-1.4.5.tar.gz
$ cd subversion-1.4.5
$ ./configure --with-ssl --without-gssapi --without-swig --enable-all-static
$ make


Working :-)


[hvdzwet@silver 0:23 /scratch/hvdzwet/subversion-1.4.5] > ldd ./subversion/svn/svn
not a dynamic executable
[hvdzwet@silver 0:23 /scratch/hvdzwet/subversion-1.4.5] > ./subversion/svn/svn --version
svn, version 1.4.5 (r25188)
compiled Nov 14 2007, 00:06:52
# Big beast :-)
[hvdzwet@silver 0:30 /scratch/hvdzwet/subversion-1.4.5] > ls -lh ./subversion/svn/svn
-rwx------ 1 hvdzwet student 5.8M Nov 14 00:11 ./subversion/svn/svn

3 comments:

  1. Dang, this is what I have been looking for! Bedankt! ;)

    ReplyDelete
  2. Thanks bro! Still working for 1.6.x

    ReplyDelete
  3. Thanks, URLs have moved to subversion.apache.org and the dependencies are now downloadable via a script.

    "Previous releases of Subversion shipped with companion artifacts which included a number of Subversion dependencies. In the past, these dependencies were hard to find and build, and not often installed on the target platform. Today, this is no longer a problem, so we have discontinued shipping the companion dependency tarballs. If you still want to get some of the required Subversion dependencies before building, you can run the get-deps.sh script in the root of the unpacked archive."

    ReplyDelete