[MDEV-7526] TokuDB doesn't build on OS X Created: 2015-01-28 Updated: 2015-12-22 Resolved: 2015-12-22 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - TokuDB |
| Affects Version/s: | 5.5, 10.0, 10.1 |
| Fix Version/s: | 5.5.48, 10.0.24, 10.1.10 |
| Type: | Bug | Priority: | Major |
| Reporter: | Kolbe Kegel (Inactive) | Assignee: | Vicențiu Ciorbaru |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Mac OS X 10.10.1 |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Sprint: | 10.1.10 | ||||||||
| Description |
|
TokuDB apparently doesn't built on OS X:
This should either be fixed, or TokuDB should be disabled on OS X for now. |
| Comments |
| Comment by Elena Stepanova [ 2015-01-28 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
See also | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Charles Bailey [ 2015-05-05 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Aside questions about whether Toku is supported under OS X (cf | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Thierry Coppey [ 2015-10-24 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I managed to build mariadb-10.1.8 on MacOS 10.9.5 with the following tweaks:
Dependencies: XCode, CMake, JEMalloc | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Thierry Coppey [ 2015-10-25 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Compiles but crashes when trying to load the plugin, here is the error message:
This seems to be related to the silenced warning that empty C structures have size 0 whereas this is not the case in C++. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Thierry Coppey [ 2015-10-26 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Finally I made it compile and was able to create a TokuDB table in a chrooted MySQL environment with MariaDB 10.1.8 on OSX 10.9.5, but the same trick would probably work for other versions. Here are the steps that I did: 0. Install XCode, and cmake (manually)
2. Patch MariaDB 10.1.8 (to execute from the root of the unzipped archive)
3. Configure, build and install
What struck me is that engineers do not remember there is a syscall API in C and do it the wrong way with 2-3 shell-based attempts to detect CPU speed in portability.cc – which is btw not compatible with chrooting. Then (for completeness) I configure /etc/my.cnf (for chroot) with
And run the server with Let me know if there is some missing bit | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergey Vojtovich [ 2015-12-15 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Beware of 10.1 PR: https://github.com/MariaDB/server/pull/79 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vicențiu Ciorbaru [ 2015-12-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There are a number of errors that cause TokuDB to fail compiling on OS X. All these failures are still present in the 5.5 branch, so that is where we should address them. The first error is related to the DB_LSN struct. Being declared empty, according to the C++ standard, it must be assigned a size of 1, while in C it does not. To fix this we add a dummy char field (of size 1). This fix has also been implemented upstream within the TokuDB repository and makes sense. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vicențiu Ciorbaru [ 2015-12-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
A second error is related to unused functions within the tokudb_dump.cc. I've removed the functions from the codebase. A third error is related to a redundant if statement on the address of a member field in ft-index/ft/txn/rollback.cc. The address of a member field is always true. A fourth error is caused by specifying attribute(nonnull) for the copyout function within ft-index/util/dmt.h. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vicențiu Ciorbaru [ 2015-12-19 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Sergei! Can you please review the series of patches on the commits mailing list related to this issue? I've fixed all the errors within TokuDB on Mac OS X. The fixes are done on 5.5 as the problems are also present there. All the changes that I've done, I've double checked with the upstream TokuDB repository. One of the commits is actually from a pull request from the community. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Vicențiu Ciorbaru [ 2015-12-22 ] | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Closed with: |