Tuesday, August 16, 2011

Compiling Vim on Ubuntu Natty

The latest version of vim 7.3 included in Ubuntu Natty has a bug (Ruby-related I think) that causes the awesome command-t plugin to stop working. To get around this you will have to compile vim yourself to get to a higher patch level. I've done this a couple of times recently but always forget which dependencies need to be installed and which configure flags to enable and which make targets to run if you change stuff. So I thought I'd try to document my findings in case I have to do it again and to try to figure out exactly which packages need to be installed. On some occasions I've ended installing hundreds of megs of dependencies just to be on the safe side.

1) First you need to clone the vim repository using mercurial, this step is easy and is described on the official vim.org site: http://www.vim.org/mercurial.php

2) Install dependencies: sudo apt-get build-dep vim This pulls in about 554 MB of stuff at the time of writing and I'm not sure if all of it is needed but it at least is quick to type. Running configure at this point, gawk was still missing.

2) Next you need to configure the build you create. I've found the following to be smallest subset of required flags: ./configure --with-features=huge --enable-rubyinterp

3) then make and make install

No comments:

Post a Comment