Compiling error on Rocky Linux Rocky Linux 8.7 (Green Obsidian) of 10.10.2

When I compile mariadb 10.10.2 on Rocky Linux 8.7 x86_64 arch, below error comes:

[ 49%] Building CXX object storage/connect/CMakeFiles/connect.dir/tabjson.cpp.o In file included from /usr/include/string.h:495, from /root/mariadb-10.10.2/include/m_string.h:35, from /root/mariadb-10.10.2/sql/sql_plugin.h:33, from /root/mariadb-10.10.2/sql/mysqld.h:22, from /root/mariadb-10.10.2/storage/connect/tabjson.cpp:12: In function ‘char* strcat(char*, const char*)’, inlined from ‘bool JSONDISC::Find(PGLOBAL, PJVAL, PCSZ, int)’ at /root/mariadb-10.10.2/storage/connect/tabjson.cpp:453:13: /usr/include/bits/string_fortified.h:143:33: error: ‘char* builtin_strcat_chk(char*, const char*, long unsigned int)’ accessing 66 or more bytes at offsets 201 and 136 may overlap 1 byte at offset 201 [-Werror=restrict] return builtin_strcat_chk (dest, src, glibc_objsize (dest)); ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘char* strcat(char*, const char*)’, inlined from ‘bool JSONDISC::Find(PGLOBAL, PJVAL, PCSZ, int)’ at /root/mariadb-10.10.2/storage/connect/tabjson.cpp:527:10: /usr/include/bits/string_fortified.h:143:33: error: ‘char* builtin_strcat_chk(char*, const char*, long unsigned int)’ accessing 66 or more bytes at offsets 201 and 136 may overlap 1 byte at offset 201 [-Werror=restrict] return builtin_strcat_chk (dest, src, glibc_objsize (dest)); ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘char* strcat(char*, const char*)’, inlined from ‘bool JSONDISC::Find(PGLOBAL, PJVAL, PCSZ, int)’ at /root/mariadb-10.10.2/storage/connect/tabjson.cpp:523:11: /usr/include/bits/string_fortified.h:143:33: error: ‘char* builtin_strcat_chk(char*, const char*, long unsigned int)’ accessing 66 or more bytes at offsets 201 and 136 may overlap 1 byte at offset 201 [-Werror=restrict] return builtin_strcat_chk (dest, src, glibc_objsize (dest)); ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In function ‘char* strcat(char*, const char*)’, inlined from ‘bool JSONDISC::Find(PGLOBAL, PJVAL, PCSZ, int)’ at /root/mariadb-10.10.2/storage/connect/tabjson.cpp:420:10: /usr/include/bits/string_fortified.h:143:33: error: ‘char* builtin_strcat_chk(char*, const char*, long unsigned int)’ accessing 66 or more bytes at offsets 201 and 136 may overlap 1 byte at offset 201 [-Werror=restrict] return builtin_strcat_chk (dest, src, glibc_objsize (dest)); ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors gmake[2]: * [storage/connect/CMakeFiles/connect.dir/build.make:496: storage/connect/CMakeFiles/connect.dir/tabjson.cpp.o] Error 1 gmake[1]: * [CMakeFiles/Makefile2:5251: storage/connect/CMakeFiles/connect.dir/all] Error 2 gmake: * [Makefile:166: all] Error 2

Is MariaDB currently completely compatible with Rocky Linux?

Answer Answered by Duin Cui in this comment.

I found the root cause.

I added a wrong cmake configuration option '-DMYSQL_MAINTAINER_MODE=0', after changing to '-DMYSQL_MAINTAINER_MODE=NO', this error disappeared.

This question is not worth to reference, please delete it, thank you.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.