MariaDB 10.x not compiling on FreeBSD 12.1

ChiefZigZag

Verified User
Joined
Feb 17, 2020
Messages
30
I attempted to upgrade from MySQL to MariaDB.. the upgrade to MariaDB 5.5 worked. 10.x doesnt work at all, I tried some options provided from the following post with no luck. Here is where my build keeps stopping on MariaDB 10.4, any ideas?

Code:
...
[ 11%] Building C object plugin/auth_pam/CMakeFiles/pam_user_map.dir/mapper/pam_user_map.c.o
clang: warning: -Wl,-z,relro,-z,now: 'linker' input unused [-Wunused-command-line-argument]
/usr/local/directadmin/custombuild/mariadb-10.4.12/plugin/auth_pam/mapper/pam_user_map.c:42:10: fatal error: 'security/pam_ext.h' file not found
#include <security/pam_ext.h>
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.
--- plugin/auth_pam/CMakeFiles/pam_user_map.dir/mapper/pam_user_map.c.o ---
*** [plugin/auth_pam/CMakeFiles/pam_user_map.dir/mapper/pam_user_map.c.o] Error code 1

make[2]: stopped in /usr/local/directadmin/custombuild/mariadb-10.4.12
1 error

make[2]: stopped in /usr/local/directadmin/custombuild/mariadb-10.4.12
--- plugin/auth_pam/CMakeFiles/pam_user_map.dir/all ---
*** [plugin/auth_pam/CMakeFiles/pam_user_map.dir/all] Error code 2

make[1]: stopped in /usr/local/directadmin/custombuild/mariadb-10.4.12
A failure has been detected in another branch of the parallel make

make[2]: stopped in /usr/local/directadmin/custombuild/mariadb-10.4.12
--- storage/rocksdb/CMakeFiles/rocksdblib.dir/all ---
*** [storage/rocksdb/CMakeFiles/rocksdblib.dir/all] Error code 2

make[1]: stopped in /usr/local/directadmin/custombuild/mariadb-10.4.12
A failure has been detected in another branch of the parallel make

make[2]: stopped in /usr/local/directadmin/custombuild/mariadb-10.4.12
--- storage/rocksdb/CMakeFiles/rocksdb_tools.dir/all ---
*** [storage/rocksdb/CMakeFiles/rocksdb_tools.dir/all] Error code 2

make[1]: stopped in /usr/local/directadmin/custombuild/mariadb-10.4.12
 

mmx

Verified User
Joined
May 8, 2005
Messages
114
Location
Montreal, QC, Canada
I haven't spent too much time with MariaDB 10.4 yet, but I've read the changelog and will recommend to stick with 10.3 for now. Latest major version has a few breaking changes when it comes to user authentication (PAM being the default). Not sure if DirectAdmin is compatible with it right now.
 

ChiefZigZag

Verified User
Joined
Feb 17, 2020
Messages
30
I haven't spent too much time with MariaDB 10.4 yet, but I've read the changelog and will recommend to stick with 10.3 for now. Latest major version has a few breaking changes when it comes to user authentication (PAM being the default). Not sure if DirectAdmin is compatible with it right now.
Thanks for the reply, it seems that MariaDB 10.3 doesn't build either.. similar problem. Seems to be supported by DirectAdmin since it's in the options.. but who knows?
 

ChiefZigZag

Verified User
Joined
Feb 17, 2020
Messages
30
Even with the custom cmake file I had outlined previously?
Unfortunately it isn't working..

Code:
...
[ 10%] Building C object plugin/auth_pam/CMakeFiles/pam_user_map.dir/mapper/pam_user_map.c.o
clang: warning: -Wl,-z,relro,-z,now: 'linker' input unused [-Wunused-command-line-argument]
/usr/local/directadmin/custombuild/mariadb-10.3.22/plugin/auth_pam/mapper/pam_user_map.c:42:10: fatal error: 'security/pam_ext.h' file not found
#include <security/pam_ext.h>
         ^~~~~~~~~~~~~~~~~~~~
1 error generated.
--- plugin/auth_pam/CMakeFiles/pam_user_map.dir/mapper/pam_user_map.c.o ---
*** [plugin/auth_pam/CMakeFiles/pam_user_map.dir/mapper/pam_user_map.c.o] Error code 1
...
Code:
root@admin:/usr/local/directadmin/custombuild # cat custom/mysql/cmake.mysql
#!/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
Code:
root@admin:/usr/local/directadmin/custombuild # uname -a
FreeBSD admin 12.1-RELEASE-p2 FreeBSD 12.1-RELEASE-p2 GENERIC  amd64
 

ChiefZigZag

Verified User
Joined
Feb 17, 2020
Messages
30
Fixed in CB 2.0 rev. 2413.
Thanks smtalk! I went ahead and tested a fresh install of directadmin on FreeBSD 12.1.. using the ./setup.sh in custom mode selecting MariaDB 10.3 instead of mysql.. it again failed during compiling of MariaDB

Code:
[ 92%] Building CXX object storage/connect/CMakeFiles/connect.dir/blkfil.cpp.o
clang++: warning: -Wl,-z,relro,-z,now: 'linker' input unused [-Wunused-command-line-argument]
In file included from /usr/local/directadmin/custombuild/mariadb-10.3.22/storage/mroonga/ha_mroonga.cpp:23:
In file included from /usr/local/directadmin/custombuild/mariadb-10.3.22/storage/mroonga/mrn_mysql.h:51:
In file included from /usr/local/directadmin/custombuild/mariadb-10.3.22/sql/sql_class.h:30:
In file included from /usr/local/directadmin/custombuild/mariadb-10.3.22/sql/field.h:34:
In file included from /usr/local/directadmin/custombuild/mariadb-10.3.22/sql/sql_type.h:28:
In file included from /usr/local/directadmin/custombuild/mariadb-10.3.22/sql/sql_type_real.h:19:
In file included from /usr/include/c++/v1/cmath:306:
/usr/local/directadmin/custombuild/mariadb-10.3.22/storage/mroonga/version:1:1: error: expected unqualified-id
7.07
^
[ 92%] Built target mariabackup
Scanning dependencies of target spider
[ 92%] Building CXX object storage/spider/CMakeFiles/spider.dir/spd_param.cc.o
clang++: warning: -Wl,-z,relro,-z,now: 'linker' input unused [-Wunused-command-line-argument]
15 errors generated.
--- storage/mroonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o ---
*** [storage/mroonga/CMakeFiles/mroonga.dir/ha_mroonga.cpp.o] Error code 1

make[2]: stopped in /usr/local/directadmin/custombuild/mariadb-10.3.22
1 error
I went ahead for a test and I made a custom cmake to work around this and I went ahead and did a "./build all d" with some success.
Code:
root@admin:~ # cat /usr/local/directadmin/custombuild/custom/mysql/cmake.mysql
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql \
-DWITHOUT_MROONGA=YES
It appears I am using the latest version of custombuild..

Code:
root@admin:/usr/local/directadmin # md5 custombuild.tar.gz                      MD5 (custombuild.tar.gz) = 11c58b3d7028f7052993b4b84b23b83d
root@admin:/usr/local/directadmin # grep 11c58b3d7028f7052993b4b84b23b83d custombuild_md5.txt
11c58b3d7028f7052993b4b84b23b83d
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,936
Location
LT, EU
Added -DWITHOUT_MROONGA=YES to CB 2.0 rev. 2414, thank you for the report!
 
Last edited:

ChiefZigZag

Verified User
Joined
Feb 17, 2020
Messages
30
Added [icocde]-DWITHOUT_MROONGA=YES[/icode] to CB 2.0 rev. 2414, thank you for the report!
Excellent I will test!

Also, In my testing this morning I have tried MariaDB 10.4 as well.. I received the following error:
Code:
[ 56%] Building CXX object storage/tokudb/PerconaFT/locktree/CMakeFiles/locktree.dir/keyrange.cc.o
In file included from /usr/local/directadmin/custombuild/mariadb-10.4.12/storage/rocksdb/rocksdb/db/malloc_stats.cc:16:
/usr/local/directadmin/custombuild/mariadb-10.4.12/storage/rocksdb/rocksdb/port/jemalloc_helper.h:44:19: error: redefinition of 'malloc_usable_size' as different kind of symbol
extern "C" size_t malloc_usable_size(JEMALLOC_USABLE_SIZE_CONST void*)
                  ^
/usr/include/malloc_np.h:71:8: note: previous definition is here
size_t  malloc_usable_size(const void *ptr);
        ^
In file included from /usr/local/directadmin/custombuild/mariadb-10.4.12/storage/rocksdb/rocksdb/db/malloc_stats.cc:16:
/usr/local/directadmin/custombuild/mariadb-10.4.12/storage/rocksdb/rocksdb/port/jemalloc_helper.h:44:38: error: use of undeclared identifier 'JEMALLOC_USABLE_SIZE_CONST'
extern "C" size_t malloc_usable_size(JEMALLOC_USABLE_SIZE_CONST void*)
                                     ^
/usr/local/directadmin/custombuild/mariadb-10.4.12/storage/rocksdb/rocksdb/port/jemalloc_helper.h:44:71: error: expected ';' after top level declarator
extern "C" size_t malloc_usable_size(JEMALLOC_USABLE_SIZE_CONST void*)
                                                                      ^
                                                                      ;
/usr/local/directadmin/custombuild/mariadb-10.4.12/storage/rocksdb/rocksdb/port/jemalloc_helper.h:45:24: warning: declaration does not declare anything [-Wmissing-declarations]
    JEMALLOC_CXX_THROW __attribute__((__weak__));
                       ^
/usr/local/directadmin/custombuild/mariadb-10.4.12/storage/rocksdb/rocksdb/port/jemalloc_helper.h:58:43: warning: comparison of function 'malloc_usable_size' not equal to a null pointer is always true [-Wtautological-pointer-compare]
         malloc_stats_print != nullptr && malloc_usable_size != nullptr;
                                          ^~~~~~~~~~~~~~~~~~    ~~~~~~~
/usr/local/directadmin/custombuild/mariadb-10.4.12/storage/rocksdb/rocksdb/port/jemalloc_helper.h:58:43: note: prefix with the address-of operator to silence this warning
         malloc_stats_print != nullptr && malloc_usable_size != nullptr;
                                          ^
                                          &
clang++: warning: -Wl,-z,relro,-z,now: 'linker' input unused [-Wunused-command-line-argument]
2 warnings and 3 errors generated.
I am uncertain to what the solution is for this and i'll try again with the latest revision you provided with MariaDB 10.3.
 
Top