Building against MariaDB 10.5
Alan DeKok
aland at deployingradius.com
Wed May 26 17:17:29 CEST 2021
On May 26, 2021, at 11:06 AM, Sebastian Hagedorn <Hagedorn at uni-koeln.de> wrote:
> And yet, that is the only way to make it work. Perhaps I wasn’t clear. When I build using 10.5 libraries and headers, *and* run using the same libraries, it does *not* work.
Hmm... I'd blame the MariaDB people for that, quite frankly. Or maybe the 10.5 libraries and headers shipped by RedHat don't match what the MariaDB people use.
Either way, it's a library / header issue. There really isn't much we can do to FreeRADIUS to fix it.
> I forgot to mention that the MariaDB-devel RPM from 10.5 isn’t sufficient. With only that installed, rlm_sql_mysql is skipped because the configure script fails to find the library to link to:
>
> checking for mysql_config... yes
> checking for mysql_init in -lmysqlclient_r (using mysql_config)... no
> checking for mysql_init in -lmysqlclient (using mysql_config)... no
> checking for mysql_init in -lmysqlclient_r in /usr/lib... no
> checking for mysql_init in -lmysqlclient_r in /usr/lib/mysql... no
> checking for mysql_init in -lmysqlclient_r in /usr/local/lib/mysql... no
> checking for mysql_init in -lmysqlclient_r in /usr/local/mysql/lib/mysql... no
> checking for mysql_init in -lmysqlclient_r... no
> checking for mysql_init in -lmysqlclient_r in /usr/local/lib... no
> checking for mysql_init in -lmysqlclient_r in /opt/lib... no
>
> I had to install MariaDB-shared as well, which appears to be a compatibility layer.
Yes.
> I noticed the following warning when compiling with that configuration:
>
> CC src/modules/rlm_sql/drivers/rlm_sql_mysql/rlm_sql_mysql.c
> In file included from src/modules/rlm_sql/drivers/rlm_sql_mysql/rlm_sql_mysql.c:42:0:
> /usr/include/mysql/mysql_version.h:3:2: warning: #warning This file should not be included by clients, include only <mysql.h> [-Wcpp]
> #warning This file should not be included by clients, include only <mysql.h>
> ^
> cc1: warning: unrecognized command line option "-Wno-date-time" [enabled by default]
> LINK build/lib/rlm_sql_mysql.la
Meh, they can be ignored.
> Again, the only way I can get it to work is currently to build the RPM on a development server with mariadb-devel 5.5, and to run it on production servers with MariaDB 10.5
Blame RH and/or MariaDB. There isn't anything we can do to fix it.
Alan DeKok.
More information about the Freeradius-Users
mailing list