Понеделник VI 02, 2014

Building MySQL with boost on windows

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.
About

Writing about the interesting features and oddities of the MySQL server and related code.

Search

Categories
Archives
« Април 2015
НдПнВтСрЧтПтСб
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  
       
Today