Bug #112887 Simplify (slightly) boost build configuration by not requiring -DWITH_BOOST
Submitted: 30 Oct 2023 20:01 Modified: 31 Oct 2023 5:44
Reporter: Simon Mudd (OCA) Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Compiling Severity:S4 (Feature request)
Version:8.2.0 OS:Any
Assigned to: CPU Architecture:Any

[30 Oct 2023 20:01] Simon Mudd
I notice when trying to build 8.2.0 the following:

-- MySQL currently requires boost_1_77_0

CMake Error at cmake/boost.cmake:108 (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.

Check when building about how to build the server.
I usually do something like (and suggested by the docs):

$ mkdir bld; cd bld
$ cmake ../ # but this will fail as no BOOST available (at least for a clean first build)
$ cmake -DDOWNLOAD_BOOST=1 -DWITH_BOOST=boost_1_77_0 ../

Basically the following would be easier

$ mkdir bld; cd bld
$ cmake -DDOWNLOAD_BOOST=1 ../

If not defined use the latest version of boost that's supported, e.g. take BOOST_PACKAGE_NAME.

Currently for reproducible builds you need to figure out which is the version to use, explicitly set the boost version to use and ensure the compile setting also provide the correct directory to download to.

How to repeat:
See above.

Suggested fix:
- Remove the need to explicitly provide the -DWITH_BOOST= parameter if -DDOWNLOAD_BOOST=1 is provided and use a location based on the latest supported version of boost.
- Ensure the user can still provide a value for -DWITH_BOOST=<directory> for backwards compatibility and also if a different location is needed.
[31 Oct 2023 5:44] MySQL Verification Team
Hello Simon,

Thank you for the feature request!