Building MySQL with boost on windows

Posted by user13177919 on Oracle Blogs See other posts from Oracle Blogs or by user13177919
Published on Mon, 2 Jun 2014 07:53:03 +0000 Indexed on 2014/06/02 9:38 UTC
Read the original article Hit count: 147

Filed under:

As you've probably heard already MySQL needs boost to build.

However, in the good ol' MySQL tradition, the above link does give you only the instructions on how to build it on linux. And completely ignores the fact that there're other OSes too that people develop on.

To fill in that gap, I've compiled a small step by step guide on how to do it on windows. Note that I always, as a principle, build out-of-source.

The typical setup I have is :

bzr clone lp:~mysql/mysql-server/5.7 mysql-trunk
cd mysql-trunk
mkdir bld
cd bld
cmake -DWITH_DEBUG=1 -DMYSQL_PROJECT_NAME=mysql-trunk ..
devenv /build debug mysql-trunk.sln

This has been tested to work on a 32 bit compile using VS2013 on a Windows7 64 bit build. Note that you'll need other things too (bison, eventually openssl etc) that I will assume you already have set up.

Steps:

  1. Download Boost 1.55.0. It's the *only* version that is known to work currently.
  2. Extract boost_1_55_0/ from the zip to c:\boost\boost_1_55_0
  3. Go to Control Panel/System/Environment variables and set WITH_BOOST=C:\boost\boost_1_55_0 in User variables. Make sure you restart your open command line terminal windows after this ! 
  4. If you're upgrading from non-boost build, remove your bld/ directory and create a new one.
  5. run cmake as you'd typically do. You should get:
    -- Local boost dir C:/boost/boost_1_55_0
    -- Local boost zip LOCAL_BOOST_ZIP-NOTFOUND
    -- BOOST_VERSION_NUMBER is #define BOOST_VERSION 105500
    -- BOOST_INCLUDE_DIR C:/boost/boost_1_55_0
  6. Build as normal (devenv /build debug ...). It should work.

© Oracle Blogs or respective owner

Related posts about /Oracle