Bug #106212 | Potentially incompatible system Boost gets picked even with -DWITH_BOOST=/path | ||
---|---|---|---|
Submitted: | 19 Jan 2022 11:40 | Modified: | 23 May 2022 20:19 |
Reporter: | Laurynas Biveinis (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S3 (Non-critical) |
Version: | 8.0 | OS: | MacOS (12.1) |
Assigned to: | CPU Architecture: | x86 | |
Tags: | boost, cmake |
[19 Jan 2022 11:40]
Laurynas Biveinis
[19 Jan 2022 11:52]
Laurynas Biveinis
Title typo
[19 Jan 2022 12:21]
Tor Didriksen
MySQL 8.0.28 must have *exactly* boost 1.73.0 anything else, and you may get build errors, and/or wrong results for GIS queries.
[19 Jan 2022 12:23]
Tor Didriksen
You must download boos yourself, or use the DOWNLOAD_BOOST cmake option.
[19 Jan 2022 12:30]
Laurynas Biveinis
I have used -DDOWNLOAD_BOOST=ON, and pointed with -DWITH_BOOST there. But the system Boost takes precedence over the downloaded one
[19 Jan 2022 13:28]
Tor Didriksen
I just got myself a mac, so good timing :) However, it's an M1 so HOMEBREW is in /opt/homebrew rather than /usr/local and I cannot reproduce. Maybe do INCLUDE_DIRECTORIES(BEFORE SYSTEM ${BOOST_PATCHES_DIR} ${BOOST_INCLUDE_DIR}) wherever we include boost stuff. or 'brew install boost@1.73 ??
[19 Jan 2022 14:01]
Laurynas Biveinis
$ brew install boost@1.73 ... Warning: No available formula with the name "boost@1.73". Did you mean boost? ... I think I found the bug - one of cmakecache.txt entries pointing to /usr/local/include was zstd, and in zstd.cmake there is IF(NOT ZSTD_INCLUDE_DIR STREQUAL "/usr/include") # In case of -DCMAKE_PREFIX_PATH=</path/to/custom/zstd> INCLUDE_DIRECTORIES(BEFORE SYSTEM ${ZSTD_INCLUDE_DIR}) ENDIF() - so ZSTD_INCLUDE is "/usr/local/include", != "/usr/include", and also gets prepended not appended to the include search list.
[19 Jan 2022 14:17]
Tor Didriksen
nice find. I will have an extra look in current development branches then. I have been working with using system libs (from homebrew) also on mac.
[19 Jan 2022 14:17]
MySQL Verification Team
Hi Mr. Biveinis, We have tried to repeat the behaviour on Intel Mac, with Monterey OS and we were unable to repeat the behaviour.
[19 Jan 2022 14:18]
MySQL Verification Team
Sorry Mr. Biveinis, We managed to reproduce the behaviour. This bug is now verified ........
[28 Apr 2022 15:21]
Laurynas Biveinis
See bug 107151
[29 Apr 2022 13:17]
MySQL Verification Team
This bug report is, indeed, the original bug of the bug #107151.
[29 Apr 2022 13:17]
MySQL Verification Team
This bug report is, indeed, the original bug of the bug #107151.
[23 May 2022 20:19]
Philip Olson
It appears a patch for this was committed in 8.0.29 here: https://github.com/mysql/mysql-server/commit/1de89d75257d19c8d5951b24805b79a16f4e8839 But the fix was incomplete, and the final fix for this issue was committed for Bug #107151 The 8.0.30 release note: 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. Thanks Laurynas for both bug reports and sorry for the delayed response to this one.
[24 May 2022 12:52]
MySQL Verification Team
Thank you, Philip !!!