[MDEV-6449] TokuDB failed to build with 'logformat.cc:847: undefined reference to `toku_do_assert_fail()' Created: 2014-07-16 Updated: 2015-05-06 Resolved: 2014-10-05 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - TokuDB |
| Affects Version/s: | 5.5.38, 10.0.12 |
| Fix Version/s: | 5.5.40, 10.0.14 |
| Type: | Bug | Priority: | Major |
| Reporter: | Otto Kekäläinen | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | compile, tokudb | ||
| Issue Links: |
|
||||||||||||
| Description |
|
TokuDB does no longer build after some of it's build dependencies got updated in Debian unstable. More details at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=753222 Relevant part (hopefully):
The same is now confirmed at http://buildbot.askmonty.org/buildbot/builders/debpkg-sid where the only difference between builds #26 and #27 is that a 'apt-get upgrade' was run in between, so indeed some new package in Debian unstable breaks the build process. See full log at: |
| Comments |
| Comment by Elena Stepanova [ 2014-07-19 ] | ||||||||||||||||||||||||
|
After upgrade, the machine has gcc 4.9.0 which is known not to work well for MariaDB anyway (see | ||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2014-07-19 ] | ||||||||||||||||||||||||
|
See also | ||||||||||||||||||||||||
| Comment by Leif Walsh [ 2014-07-24 ] | ||||||||||||||||||||||||
|
We found the same problem was hit by the Arch packagers. I believe the problem is a combination of -flto in gcc 4.9.x generating object files that can't be handled by normal ar/nm/ranlib (gcc now ships gcc-ar/gcc-nm/gcc-ranlib wrappers), and TokuDB's usage of ar/ranlib to merge static libraries before finally linking ha_tokudb.so. The solution we found in Arch was to set -DCMAKE_AR=/usr/bin/gcc-ar -DCMAKE_RANLIB=/usr/bin/gcc-ranlib. I think the real solution is to include something like the following in some higher-level cmake, before we get down to the storage engine's cmake files (taken from https://github.com/Tokutek/ft-index/blob/ed02cc90b2c3d723f41e745811daea7182ef5407/CMakeLists.txt#L10-L33)
| ||||||||||||||||||||||||
| Comment by Honza Horak [ 2014-07-29 ] | ||||||||||||||||||||||||
|
I tried to use the trick with
but it doesn't look to work, since /usr/bin/ar is still called when building xz library for ft-index and it crashes:
However, that pointed me on a different thing, that there is no option to use the lzma library from the system, the ft-index is always built with bundled one. IMHO, that should be fixed so system library is used by default and only when not available, the bundle one should be used. | ||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2014-07-29 ] | ||||||||||||||||||||||||
|
About lzma — this was an intentional decision of tokudb developers. They decided to use a specific xz library version, saying that using later versions resulted in a notably lower performance. | ||||||||||||||||||||||||
| Comment by Honza Horak [ 2014-07-29 ] | ||||||||||||||||||||||||
|
Thanks for the info about xz; it seems like mariadb should respect that decision then. However, since it is far away from acceptable way for Fedora/Red Hat, especially regarding security, I'll try to talk to Tokutek directly to re-consider this way of solving such issues. | ||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2014-07-30 ] | ||||||||||||||||||||||||
|
Thanks! Many distributions would appreciate that. By the way, using gcc-ar and gcc-ranlib didn't help me either... | ||||||||||||||||||||||||
| Comment by Honza Horak [ 2014-07-30 ] | ||||||||||||||||||||||||
|
I've opened that question on the Google Group, no response yet: | ||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2014-08-12 ] | ||||||||||||||||||||||||
|
It seems the root cause was TokuDB incompatibility with GCC 4.9, which seems to be fixed by commit https://bazaar.launchpad.net/~maria-captains/maria/5.5/revision/0.34.5868 and is confirmed to work in build sid build #38 at http://buildbot.askmonty.org/buildbot/builders/debpkg-sid/builds/38/steps/compile/logs/stdio, so this is issue is now resolved. | ||||||||||||||||||||||||
| Comment by Honza Horak [ 2014-08-14 ] | ||||||||||||||||||||||||
|
Well, I still see the same issue with gcc-4.9.1-5.fc22.x86_64 and mariadb-10.0.13 on Fedora rawhide (22). And I don't see an option to re-open this bug, maybe I'm just blind – could we re-open it, please? | ||||||||||||||||||||||||
| Comment by Otto Kekäläinen [ 2014-08-14 ] | ||||||||||||||||||||||||
|
reopened on request by Honza, see comment below | ||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2014-10-02 ] | ||||||||||||||||||||||||
|
TokuDB 7.5.0 compiles just fine for me on debian sid with the latest gcc 4.9.1 that sid has. | ||||||||||||||||||||||||
| Comment by Honza Horak [ 2014-10-06 ] | ||||||||||||||||||||||||
|
It still does not build on Fedora, but it seems to be issue in Fedora's ar, which crashes, reported as: | ||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2014-10-06 ] | ||||||||||||||||||||||||
|
Ok, thanks. I've added myself to the CC of that bug, if there'll be something we need to do — hopefully I'll see it. |