Bug #107151 Incorrect Homebrew Boost check
Submitted: 28 Apr 2022 15:21 Modified: 23 May 2022 20:06
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0.29 OS:MacOS
Assigned to: CPU Architecture:x86
Tags: boost, brew, cmake, homebrew, macos

[28 Apr 2022 15:21] Laurynas Biveinis
Description:
8.0.29 added a check whether Homebrew Boost is installed [1], presumably to help with the likes of bug 106212. But, this check is based on a flawed assumption: that adding $HOMEBREW_BASE/include to include search path will see Boost headers, if Homebrew Boost is installed. This is not entirely correct because Homebrew packages can be in linked and unlinked states, in the latter case $HOMEBREW_BASE/include will not see Boost headers.

This is a regression in that previously "brew unlink boost" was enough to build MySQL with system libraries on macOS, now it does not work.

How to repeat:
brew install boost
cmake ... -DWITH_SYSTEM_LIBS=ON

Suggested fix:
Just check for $HOMEBREW_BASE/include/boost directly instead of $HOMEBREW_HOME/boost ?
[29 Apr 2022 4:59] MySQL Verification Team
Hello Laurynas,

Thank you for the report and feedback!

regards,
Umesh
[29 Apr 2022 5:05] Laurynas Biveinis
Thanks Umesh

Forgot the footnote in my report:
[1]: https://github.com/mysql/mysql-server/commit/1de89d75257d19c8d5951b24805b79a16f4e8839
[29 Apr 2022 13:18] MySQL Verification Team
This bug is a duplicate of:

https://bugs.mysql.com/bug.php?id=106212

but, it will not be marked as duplicate since it has some additional info.
[23 May 2022 20:06] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Server 8.0.30 release, and here's the proposed changelog entry from the documentation team:

On MacOS, improved Boost library detection logic for Homebrew as a
potentially incompatible system's Boost version could get used even with
-DWITH_BOOST set.

Thank you for the bug report.