Colin Charles Agenda

Building MySQL from source

So others know how I check out a fresh tree, here are instructions to building MySQL from mysql.bkbits.net, using the free bkf tool.

If for some reason you don’t want the latest development tree, and say, are more interested in a tag, all you need to do is find the appropriate tree under the Repository section on bkbits, click on it, head over to tags, find an appropriate tag, and execute a bkf clone -rTAG bk://mysql.bkbits.net/mysql-5.0-community mysql-5.0-community-TAG. You now have a mysql version that matches a certain tag. Build as per above.

To keep up-to-date, just run bkf pull.

If you actually need to install supporting packages (or bkf itself!), etc. on say Ubuntu or Fedora, read Installing from the Development Source Tree, part of the excellent MySQL manual. Also, executing bkf --help is pretty easy. The tool itself is pretty brain-dead, quite unlike its older (commercial) brother, BitKeeper (bk).

Update: I should clarify that make dist alone, only gives you a pristine source tarball for distribution, etc. What I normally do is hook it into the package management system of the platform of my choice (usually RPM or DEB), and build binaries that way. However, if you want a binary tarball, there’s an additional step in that you need to run scripts/make_binary_distribution (generally, after running tests!). This will be a tarball that contains a binary for distribution. Heads up to Giuseppe for dropping me a line.

Technorati Tags: , , , ,