NetXMS Support Forum

Please login or register.

Login with username, password and session length

Author Topic: netxms-3.0.2292 configure error cannot find mysql.h on centos7  (Read 388 times)

grif

  • Newbie
  • *
  • Posts: 4
    • View Profile
netxms-3.0.2292 configure error cannot find mysql.h on centos7
« on: September 25, 2019, 12:22:54 pm »

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


Logged

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 6791
    • View Profile
Re: netxms-3.0.2292 configure error cannot find mysql.h on centos7
« Reply #1 on: September 25, 2019, 04:58:40 pm »

Hi,

try to use --with-mysql instead.

Best regards,
Victor
Logged

grif

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: netxms-3.0.2292 configure error cannot find mysql.h on centos7
« Reply #2 on: September 27, 2019, 02:40:41 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
Logged

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 6791
    • View Profile
Re: netxms-3.0.2292 configure error cannot find mysql.h on centos7
« Reply #3 on: September 27, 2019, 05:13:12 pm »

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
Logged

grif

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: netxms-3.0.2292 configure error cannot find mysql.h on centos7
« Reply #4 on: September 30, 2019, 10:29:25 am »

....
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
« Last Edit: September 30, 2019, 11:14:59 am by grif »
Logged

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 6791
    • View Profile
Re: netxms-3.0.2292 configure error cannot find mysql.h on centos7
« Reply #5 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


Logged

grif

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: netxms-3.0.2292 configure error cannot find mysql.h on centos7
« Reply #6 on: October 03, 2019, 08:40:28 am »

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

Logged