How to build MySQL releases
One of the major benefits from the CMake
work available in MySQL 5.5 is that in the
MySQL Release Engineering team we have been able to make it easy for users and
developers to build MySQL exactly as we do for the official releases. For too
long there has been a disconnect between the binaries produced as part of a
./configure; make” build and what we ship to users and
We’re still not exactly where we want to be, there are still some parts which need to be integrated into the server tree, but for now it’s relatively straightforward to build exactly as we do.
Here are the instructions, using the
mysql-5.5.6-rc.tar.gz source tarball as an
These are the generic instructions to build a tarball release. Note that we make use of CMake’s out-of-srcdir support to
- ensure the source directory is kept pristine
- allow us to easily build both debug and release binaries, and package them together
Assuming everything goes ok, you should end up with a tarball in the
Some platforms require extra flags to be specified on the CMake command line to ensure the correct compiler etc is used. Here are some that we use.
Avoid libstdc++ dependancy
In order to create “generic” binaries, on GCC platforms we compile
CXX=gcc. This avoids
libstdc++ being pulled in, and means that the
server will run across a larger range of releases as you do not rely on having
the exact version of
libstdc++ installed by your system package manager.
Paste this before running cmake.
Specify target architecture
On systems which support multiple targets, you can specify exactly which one you want, rather than relying on the OS default. These strings are meant to be added to the cmake command lines above.
- GCC/Sun Studio
We’ve spent a lot of time improving the RPM builds too. Previously some of the configuration was only available in the commercial RPM builds, but now we have merged them into the community version.
You should end up with nice shiny RPMs in
rpm/RPMS. One thing to note is
that the RPM spec no longer runs the test suite as part of the build, so you
will need to run that separately. On the plus side, you get your RPMs much
Another nice thing about the improved RPM spec is that you can now build targetted distribution RPMs, as we do. These have extra dependancy information in them tailored to the target distribution. Currently the spec file supports the distributions we build on, but we will accept patches for others.
To enable this, use:
Our Windows builds have relied on CMake since MySQL 5.0, but the procedure has
still changed to ensure that you can build as we do. These instructions use
cmd.exe but you can use the Visual Studio front end if you prefer.
You can now choose which type of package to create. 5.5 includes new code to create minimal MSI packages, these should work ok, and only differ from the official MySQL MSI packages in that they do not include the instance config wizard.
To create the MSI packages you will need to install WiX.
Assuming everything goes ok, you should have some packages in the
Work still to be done
We still have a number of scripts only available internally, for example those we use to create SVR4, DMG and DEPOT packages. However, we are looking to integrate these into the MySQL Server source tree so that all users can benefit from them.
- 16 Jul 2015 » Reducing RAM usage in pkgin
- 03 Mar 2015 » pkgsrc-2014Q4: LTS, signed packages, and more
- 06 Oct 2014 » Building packages at scale
- 04 Dec 2013 » A node.js-powered 8-bit CPU - part four
- 03 Dec 2013 » A node.js-powered 8-bit CPU - part three
- 02 Dec 2013 » A node.js-powered 8-bit CPU - part two
- 01 Dec 2013 » A node.js-powered 8-bit CPU - part one
- 21 Nov 2013 » MDB support for Go
- 30 Jul 2013 » What's new in pkgsrc-2013Q2
- 24 Jul 2013 » Distributed chrooted pkgsrc bulk builds
- 07 Jun 2013 » pkgsrc on SmartOS - creating new packages
- 15 Apr 2013 » What's new in pkgsrc-2013Q1
- 19 Mar 2013 » Installing SVR4 packages on SmartOS
- 27 Feb 2013 » SmartOS is Not GNU/Linux
- 18 Feb 2013 » SmartOS development preview dataset
- 17 Jan 2013 » pkgsrc on SmartOS - fixing broken builds
- 15 Jan 2013 » pkgsrc on SmartOS - zone creation and basic builds
- 10 Jan 2013 » Multi-architecture package support in SmartOS
- 09 Jan 2013 » Solaris portability - cfmakeraw()
- 08 Jan 2013 » Solaris portability - flock()
- 06 Jan 2013 » pkgsrc-2012Q4 illumos packages now available
- 23 Nov 2012 » SmartOS and the global zone
- 24 Oct 2012 » Setting up Samba on SmartOS
- 10 Oct 2012 » pkgsrc-2012Q3 packages for illumos
- 23 Aug 2012 » Creating local SmartOS packages
- 10 Jul 2012 » 7,000 binary packages for OSX Lion
- 09 Jul 2012 » 9,000 packages for SmartOS and illumos
- 07 May 2012 » Goodbye Oracle, Hello Joyent!
- 13 Apr 2012 » SmartOS global zone tweaks
- 12 Apr 2012 » Automated VirtualBox SmartOS installs
- 30 Mar 2012 » iptables script for Debian / Ubuntu
- 20 Feb 2012 » New site design
- 11 Jan 2012 » Set up anonymous FTP upload on Oracle Linux
- 09 Jan 2012 » Kickstart Oracle Linux in VirtualBox
- 09 Jan 2012 » Kickstart Oracle Linux from Ubuntu
- 22 Dec 2011 » Last day at MySQL
- 15 Dec 2011 » Installing OpenBSD with softraid
- 21 Sep 2011 » Create VirtualBox VM from the command line
- 14 Sep 2011 » Creating chroots for fun and MySQL testing
- 30 Jun 2011 » Graphing memory usage during an MTR run
- 29 Jun 2011 » Fix input box keybindings in Firefox
- 24 Jun 2011 » How to lose weight
- 23 Jun 2011 » How to fix stdio buffering
- 13 Jun 2011 » Serving multiple DNS search domains in IOS DHCP
- 13 Jun 2011 » Fix Firefox URL double click behaviour
- 20 Apr 2011 » SSH via HTTP proxy in OSX
- 09 Nov 2010 » How to build MySQL releases
- 29 Apr 2010 » 'apt-get' and 5,000 packages for Solaris10/x86
- 16 Sep 2009 » ZFS and NFS vs OSX
- 12 Sep 2009 » pkgsrc on Solaris
- 09 Dec 2008 » Jumpstart from OSX
- 31 Dec 2007 » Set up local caching DNS server on OSX 10.4