1. Please describe the problem: community-mysql bundles boost library now, the change dates back to 2016: https://src.fedoraproject.org/rpms/community-mysql/c/44a4c48b16548fb17653529a9a633f7e042c5cba It should be worth re-checking whether the reason of bundling are still valid. This requires more work that should hopefully not block package review bz#2252763, so detaching this issue into a separate ticket. Reproducible: Always
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle. Changing version to 40.
The MySQL source code bears a very strict requirement for the bundled Boost version: https://github.com/mysql/mysql-server/blob/8.0/cmake/boost.cmake#L306 It does not allow newer Boost releases to be used. I tried to 'git blame' that line to see why such a strict requirement has been added: https://github.com/mysql/mysql-server/blame/8.0/cmake/boost.cmake#L305 It led to a commit from 'May 30, 2014', which introduces the whole Boost bundling logic, but does not explain the reasons behind> https://github.com/mysql/mysql-server/commit/33a60b44afcefa172fff7da3f5ac89c4085cd116 This (very) roughly corresponds with the introduction of that bundle to Fedora: https://src.fedoraproject.org/rpms/community-mysql/c/44a4c48b16548fb17653529a9a633f7e042c5cba In the last rebase commit before that, that was affected (rebase from 5.6.27 to 5.7.9) (the Boost problem started with MySQL 5.7) https://src.fedoraproject.org/rpms/community-mysql/c/bf0a83b8b2ed48a9a87c3af830476f9d83589f77 there was an attemp to ignore that strict upstream requirement, and use Fedora system version of Boost instead, but it only lived one release. Unfortunately, neither of the Fedora commits has a useful commit message. I've took a look into other distro, to see how they manage the problem. Debian bundles the Boost with a note: | > wget http://deb.debian.org/debian/pool/main/m/mysql-8.0/mysql-8.0_8.0.36-1.debian.tar.xz | > tar -xof mysql-8.0_8.0.36-1.debian.tar.xz | > tail -n 12 ./debian/README.Maintainer | # | # Bundled boost and rapidjson headers | # | | MySQL bundles code from two projects that are technically available in Debian: boost and rapidjson | For both of these projects, MySQL bundles header files only. | | For boost, MySQL relies on a very specific version, so using the version available on the system | will generally not work. And they are not the only hitting that version lock: https://github.com/Homebrew/legacy-homebrew/issues/48082 But so far from what I found, people usually considers the version mismatch a bug and fix their code to honor the strict upstream version lock. --- MySQL project only use the Boost headers though. In the upstream MySQL blog post from that time https://dev.mysql.com/blog-archive/building-mysql-with-boost/ it is stated both that: | [unbundled] ... is the way we expect Linux distros to compile MySQL AND | but the build will fail if you don’t switch Boost versions at the same time as we do suggesting that the downstream patch maintenance cost might be significant. Which points to the behavior not to be unnecessary oversight, but an intended part of the upstream design.
Arch Linux bundles. MariaDB does not need the bundle and uses the system library: https://src.fedoraproject.org/rpms/mariadb10.11/blob/rawhide/f/mariadb10.11.spec#_496 But MariaDB use Boost for different functionality than MySQL. Percona Server upstream follows MySQL upstream and bundles.
Please just unbundle it. Upstreams do such things occasionally, and when there is no detailed explanation, it's misguided 99% of the time.
Any progress on unbundling?
The package has changed to mysql8.0, so moving to this component.
MySQL is maintaining a collection of ~30 patches of the Boost header files it uses. Instead of keeping just patches (diffs), they keep the whole patched files. The are stored here: https://github.com/mysql/mysql-server/tree/mysql-8.0.36/include/boost_1_77_0/patches/boost This whole directory tree of patched headers files is then used directly during the compilation with the "-isystem " flag, so the patched files are used, with higher priority than the bundled or system unpatched variants. E.g.: /usr/bin/g++ ... ... -isystem /builddir/build/BUILD/mysql-8.0.36/include/boost_1_77_0/patches -isystem /builddir/build/BUILD/mysql-8.0.36/boost/boost_1_77_0 ... ... --- The boost headers bundled by MySQL are a clean copy of those released by the Boost upstream. The Boost package in Fedora ships them very slightly patched. (3 files changed, 8 insertions(+), 5 deletions(-) on ~15.500 files) --- I've reconstructed the patches MySQL applies, to see how significant the changes are. 32 files changed, 1490 insertions(+), 363 deletions(-) on ~15.500 files Few are entirely new Boost header files written wholly by MySQL upstream. I've tried my best to build MySQL with different version of Boost un-bundled, to see if at least one will work with reasonable un-bundling effort. The only luck I had was when the version of Boost bundled with MySQL and shipped by Fedora were the same. In that case the un-bundling was trivial, however last time this occurred was at a brief moment of F33 (if i remember correctly) life-cycle, in which some later update of MySQL brought in bundled version number matching the one of Fedora, but even that was just for a fraction of the F33 life-cycle. In all other cases the diff is huge. So the problem with the patches isn´t to rebase them so they would fit, but mostly rewriting them to work with the new boost in the first place. Moreover, it changes frequently - in nearly every MySQL release, often significantly. Since the version of Boost selected by Fedora and by MySQL upstream isn't coordinated in any way, and the differences between the Boost releases themselves are big, it means to re-do a huge amount of un-bundling work every time either Fedora brings in new version of Boost, MySQL does, or both. --- I've also discussed with the MySQL upstream the difference between the two variants of MySQL sources released. (mysql-version.tar.gz and mysql-boost-version.tar.gz) The outcome is that all variants need the Boost headers bundled and only one variant (mysql-version.tar.gz which includes the Boost headers) is published starting with the newly released MySQL 8.4.0 --- I've done the research, I've looked for ways to de-bundle the Boost libraries. I've found that it would take huge effort, that would have to be mostly repeated every MySQL release and every Fedora Boost rebase. It would also need to be maintained separately between Fedora releases with different version of Boost library. For this reason, I'm closing this as WON'T FIX. I'm open to anyone to step in to do the regular maintenance of the un-bundled Boost, but I certainly don't have this much capacity myself. We may take a look again in a few years whether the situation get better.