Friday, June 11, 2021

Building Subversion from Source on WSL 2

I've officially transitioned from Cygwin to Ubuntu on WSL 2 as my preferred Unix environment on Windows. Cygwin performed well for decades, but WSL 2 is just too well done to pass up.

One feature of WSL 2 that I've been enjoying is the ability to easily build packages from source. This means that if the 'apt' version of the software is out of date, I'm not out of luck.

Two pieces of software that I find lag behind in package repositories are emacs and subversion.

After struggling to build emacs 27 on WSL 2, I found this handy build script that takes care of the process. What's the big deal, you ask? Download the package, run configure, make and make install. How hard is that? How about accounting for the the 137(!!) dependencies. That script is a life saver.

I couldn't find such a recipe for subversion. Besides tracking down dependencies, I often ran into another gotcha with subversion. Frequently, I'd build svn and forget to include the optional libserf library. In this case, Subversion compiles fine but then can't be used with 'https' URLs, which means it's effectively useless.

When I built subversion for a clean WSL 2 install yesterday I made sure to keep track the process. Here you go, enjoy.

Build & Install Subversion from Source on WSL 2

$ apt update -y
$ apt install -y autoconf libtool gcc  libsqlite3-dev libarchive-dev libz-dev libutf8proc-dev \
    libserf-dev libapr1-dev libaprutil1-dev libssl-dev  libmagic-dev liblz4-dev

$ wget
$ cd subversion-1.14.1
$ ./configure ; make
$ sudo make install

No comments:

Post a Comment