Bug #72172 Boost version check in 5.7.4 lab release
Submitted: 31 Mar 2014 17:37 Modified: 30 May 2014 14:07
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:mysql-5.7.4-labs-april OS:Any
Assigned to: Tor Didriksen CPU Architecture:Any
Triage: Needs Triage: D1 (Critical)

[31 Mar 2014 17:37] Hartmut Holzgraefe
mysql-5.7.4-labs-april requires Boost 1.55 (AFAICT it is the first 'release' checking for a specific Boost version, 5.7.3 built fine here)

Debian only comes with 1.54 though, even in "testing" and "unstable"

So I tried to rely on the automatic DOWNLOAD_BOOST feature, but that doesn't seem to work yet even though it is the setting suggested by the error message to fix this?

  Could not find boost.  You can download it with -DDOWNLOAD_BOOST=1

I'm also confused by the "-DWITH_BOOST=<directory>" part.

Is there just an "or" missing between the two options, or am I required to know where DOWNLOAD_BOOST will download it to and give that directory to WITH_BOOST manually?

How to repeat:
_build > cmake .. -DDOWNLOAD_BOOST=1
CMake Warning at cmake/boost.cmake:175 (MESSAGE):
  Boost minor version found is 54 we need 55
Call Stack (most recent call first):
  CMakeLists.txt:461 (INCLUDE)

CMake Error at cmake/boost.cmake:36 (MESSAGE):
  Could not find boost.  You can download it with -DDOWNLOAD_BOOST=1
Call Stack (most recent call first):
  cmake/boost.cmake:178 (COULD_NOT_FIND_BOOST)
  CMakeLists.txt:461 (INCLUDE)

Suggested fix:
* Fix wording of the suggestion in the error message

* make -DDOWNLOAD_BOOST=1 work
[31 Mar 2014 19:58] Sveta Smirnova
Thank you for the report.

Verified as described.
[1 Apr 2014 7:23] Tor Didriksen
Posted by developer:
It works :-)
Norvald is preparing a blog post about how to use it.
[1 Apr 2014 9:27] Norvald Ryeng
Posted by developer:

Thank you for trying our labs release!

It's good to know that people try them out. Unfortunately, our blog posts aren't that closely timed to the actual release, so you beat me to it. Try following the recipe in http://mysqlserverteam.com/building-mysql-with-boost/. That should get you started.

The -DWITH_BOOST=<directory> option will tell CMake where Boost is located, or in case it's not and you use -DDOWNLOAD_BOOST=1, where to put it. We considered unpacking Boost in the build directory. That would have made it easier to run CMake, but Boost is 430 MB unpacked. That is too much when you have many builds, so we decided to put it in a separate directory outside the build tree.

This is a labs release, so any comment is welcome. So far I've noted that it's non-intuitive how to build it. We'll have another look at the error messages and how we can make the build process more self-explanatory. Please continue filing bugs you may find, and use the comment field on the blog if you have other comments.


Norvald H. Ryeng
[1 Apr 2014 14:32] Hartmut Holzgraefe
wrong version number in synopsis corrected
[30 May 2014 14:07] Paul Dubois
Fixed in 5.7.5.

Affects no released version. No changelog entry needed.
[31 Dec 2014 10:37] Valeriy Kravchuk
Sorry, but I do not see this fixed in current trunk from git:

openxs@ao756:~/boost/boost_1_55_0$ grep -rn '#define BOOST_VERSION' | more
boost/predef/version_number.h:36:#define BOOST_VERSION_NUMBER(major,minor,patch)
boost/predef/version_number.h:39:#define BOOST_VERSION_NUMBER_MAX \
boost/predef/version_number.h:42:#define BOOST_VERSION_NUMBER_ZERO \
boost/predef/version_number.h:45:#define BOOST_VERSION_NUMBER_MIN \
boost/predef/version_number.h:48:#define BOOST_VERSION_NUMBER_AVAILABLE \
boost/predef/version_number.h:51:#define BOOST_VERSION_NUMBER_NOT_AVAILABLE \
boost/version.hpp:10:#define BOOST_VERSION_HPP
boost/version.hpp:22:#define BOOST_VERSION 105500
libs/predef/doc/predef.qbk:231:  #define BOOST_VERSION_NUMBER( major, minor, pat
ch ) ...

(actually this is where cmake downloaded whatever version it wanted to get). Now:

openxs@ao756:~/boost/boost_1_55_0$ cd -
openxs@ao756:~/git/mysql-server$ cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community -DWITH_EMBEDDED_SERVER=OFF -DCMAKE_INSTALL_PREFIX=/home/openxs/dbs/5.7 -DWITH_BOOST=/home/openxs/boost
-- Running cmake version
-- Configuring with MAX_INDEXES = 64U
-- MySQL 5.7.5-m15
-- Packaging as: mysql-5.7.5-m15-Linux-x86_64
-- Local boost dir /home/openxs/boost/boost_1_55_0
-- Local boost zip /home/openxs/boost/boost_1_55_0.tar.gz
CMake Warning at cmake/boost.cmake:200 (MESSAGE):
  Boost minor version found is 54 we need 55
Call Stack (most recent call first):
  CMakeLists.txt:466 (INCLUDE)

-- Could not find (the correct version of) boost.

CMake Error at cmake/boost.cmake:37 (MESSAGE):
  You can download it with -DDOWNLOAD_BOOST=1 -DWITH_BOOST=<directory>

  This CMake script will look for boost in <directory>.  If it is not there,
  it will download and unpack it (in that directory) for you.

  If you are inside a firewall, you may need to use an http proxy:

  export http_proxy=http://example.com:80

Call Stack (most recent call first):
  cmake/boost.cmake:203 (COULD_NOT_FIND_BOOST)
  CMakeLists.txt:466 (INCLUDE)

-- Configuring incomplete, errors occurred!
See also "/home/openxs/git/mysql-server/CMakeFiles/CMakeOutput.log".
[6 Jan 2015 12:24] Tor Didriksen

My guess, from reading your logs, is that you have downloaded
boost_1_55 inside an already existing boost installation.
We are probably reading
which is version 1_54

In trunk, we will be upgrading to the latest boost version as soon as it is
This is what I'm doing: I set BOOST_ROOT environment variable
(to some directory in my home directory) and
boost_1_55_0/  boost_1_55_0.tar.gz  boost_1_56_0/  boost_1_56_0.tar.gz
boost_1_57_0/  boost_1_57_0.tar.gz

-- didrik