Subversion - Compiling from source

I will assume that you know how to perform the standard ‘nix compile steps. And, that you know where to put the compiled files.

Why compile from source? Why not use a package manager, such as Yum or MacPorts?
  • You are hard core old school.
  • Usually, it is because the package maintainers have not put out the latest (or a specific version) of a package that you need NOW!
Some gotchas with compiling SVN (who would have thought):
  • Prerequisite libraries. Since you are not using the awesomeness of a package manager, which will take care of prerequisites for you, you MUST have required libraries pre-installed. Those libraries can be installed from a package manager, or you could have compiled them from source. It does not matter as long as you know where they are.
  • Out of the box, SVN does not support the HTTP or HTTPS protocol. What?! Yeah, I know. This is the main gotcha. If you do not configure SVN for this, you will get the “URL unrecognized” error, which is what we were seeing yesterday.

Here are the steps:

Install the
APR libraries.

These usually come with the Apache installation. If you have Apache installed, and you still don’t have them. You probably need to install the Apache development files too.

The files you need are:
  • apr-config
  • apu-config
Look in:
  • /usr/bin . . . or
  • /usr/local/bin
For some reason on CentOS, with the Apache libraries installed with Yum, the files are called:
  • /usr/bin/apr-1-config
  • /usr/bin/apu-1-config
Install Neon with SSL support

You will need the OpenSSL libraries installed.
  • ./configure—with-ssl
  • make
  • make install
Install Subversion with HTTP and HTTPS support

  • ./configure --with-ssl --with-apr=/usr/bin/apr-1-config --with-apr-util=/usr/bin/apu-1-config --with-neon=/usr/local
  • make
  • make install
Note: Make sure that you have the correct paths for the --with-apr, --with-apu, and --with-neon parameters.

You can make sure that SVN installed correctly with the proper support for HTTP and HTTPS by running the “svn—version” command. You should see this.

svn_compile_result


About this entry


0 comments: