mmx
Verified User
Here's a quick guide on how to fix the long-standing MariaDB 10.x on FreeBSD compilation issues when using CustomBuild. Credit goes to wattie for his previous thread on the matter.
Tested on:
The issue:
When building MariaDB 10.x through CustomBuild, compilation will continuously fail. The underlying problem is using MariaDB's bundled zlib libraries instead of the base system ones when compiling. Disabling the TokuDB storage engine is not the correct solution, however we're still going to keep it off for the time being as other patches are necessary to make it work properly.
The fix:
A few CMAKE flags to override the one's from CB2 will permanently fix this annoying issue. These flags are straight from FreeBSD's databases/mariadb103-server port (source).
The solution:
What we're going to do is create a custom/cmake.mysql script which will then be used by CustomBuild automatically on subsequent builds.
Copy and paste the following into cmake.mysql:
Save and exit.
Now cross your fingers and run:
CustomBuild will then take care of the rest for you, including running mysql_upgrade.
For reference, relevant options.conf values are as follows:
Tested on:
- FreeBSD 11.2 with latest patches (as of 2019-02-02)
- DirectAdmin 1.55+ with FreeBSD 11.x beta binaries
- Latest CustomBuild2
The issue:
When building MariaDB 10.x through CustomBuild, compilation will continuously fail. The underlying problem is using MariaDB's bundled zlib libraries instead of the base system ones when compiling. Disabling the TokuDB storage engine is not the correct solution, however we're still going to keep it off for the time being as other patches are necessary to make it work properly.
The fix:
A few CMAKE flags to override the one's from CB2 will permanently fix this annoying issue. These flags are straight from FreeBSD's databases/mariadb103-server port (source).
The solution:
What we're going to do is create a custom/cmake.mysql script which will then be used by CustomBuild automatically on subsequent builds.
Code:
cd /usr/local/directadmin/custombuild
mkdir -p custom/mysql
touch custom/mysql/cmake.mysql
chmod 700 custom/mysql/cmake.mysql
ee custom/mysql/cmake.mysql
Copy and paste the following into cmake.mysql:
Code:
#!/bin/sh
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_FEDERATED_STORAGE_ENGINE=1 \
-DWITH_ZLIB=system \
-DWITH_EXTRA_CHARSETS=all \
-DPLUGIN_TOKUDB=NO \
-DWITH_JEMALLOC=system \
-DWITH_LIBWRAP=1 \
-DWITHOUT_TOKUDB=YES
Save and exit.
Now cross your fingers and run:
Code:
./build mariadb
CustomBuild will then take care of the rest for you, including running mysql_upgrade.
For reference, relevant options.conf values are as follows:
Code:
mariadb=10.3
mysql_inst=mariadb
mysql_force_compile=no