netxms-3.0.2292 configure error cannot find mysql.h on centos7

Started by grif, September 25, 2019, 12:22:54 PM

Previous topic - Next topic

grif

Linux 3.10.0-1062.el7.x86_64
./configure --with-server --with-mariadb --prefix=/usr
checking for mysql.h... no
configure: error: Cannot find mysql.h - check your MariaDB client installation


find / -type f -name mysql.h
/usr/include/mysql/server/mysql.h
/usr/include/mysql/mysql.h


rpm -qa *aria*
MariaDB-server-10.4.8-1.el7.centos.x86_64
MariaDB-client-10.4.8-1.el7.centos.x86_64
MariaDB-devel-10.4.8-1.el7.centos.x86_64
MariaDB-compat-10.4.8-1.el7.centos.x86_64
MariaDB-common-10.4.8-1.el7.centos.x86_64



Victor Kirhenshtein


grif

Quote from: Victor Kirhenshtein on September 25, 2019, 04:58:40 PM
Hi,

try to use --with-mysql instead.

Best regards,
Victor

Thank you it helped, but I have an error in the next step

checking for mysql_init in -lmysqlclient... no

Victor Kirhenshtein

Please share your config.log. I've installed clean CentOS 7 and mariadb-devel package and build went without errors using --with-mysql. However versions are different:

rpm -qa *aria*
mariadb-devel-5.5.64-1.el7.x86_64
mariadb-libs-5.5.64-1.el7.x86_64

How did you install MariaDB client?

Best regards,
Victor

grif

Quote from: Victor Kirhenshtein on September 27, 2019, 05:13:12 PM
....
How did you install MariaDB client?
...

/etc/yum.repos.d/MariaDB.repo
# MariaDB 10.4 CentOS repository list
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

yum install MariaDB-server MariaDB-devel

Victor Kirhenshtein

Hi,

looks like you have to install MariaDB-shared as well. Then --with-mysql should work. I also changed configure to provide option for setup like this when MariaDB library tries to mimic MySQL client library and installs headers into /usr/include/mysql: --with-mariadb-compat-headers. You can try this source package: https://netxms.org/download/releases/3.0/netxms-3.0.2307.tar.gz and use configure options --with-mariadb --with-mariadb-compat-headers.

Best regards,
Victor



grif

Quote from: Victor Kirhenshtein on September 30, 2019, 07:54:48 PM
Hi,

looks like you have to install MariaDB-shared as well. Then --with-mysql should work. I also changed configure to provide option for setup like this when MariaDB library tries to mimic MySQL client library and installs headers into /usr/include/mysql: --with-mariadb-compat-headers. You can try this source package: https://netxms.org/download/releases/3.0/netxms-3.0.2307.tar.gz and use configure options --with-mariadb --with-mariadb-compat-headers.

Best regards,
Victor

Hi, Victor

Thanks for your support, it helped me, after installing mariadb-shared, ./configure ended  without errors