Page 1 of 1

UPgrade from 5.8.1 to 5.8.2: compile error of ndo 3.0.6

Posted: Thu Mar 11, 2021 3:15 am
by jweijters
Hi

I tried to upgrade my NagiosXI development system from 5.8.1 to 5.8.2.
however I get a compile error for ndo.
first error was:

Code: Select all

checking mysql/mysql.h presence... configure: error: Can't locate mysql headers
no
checking for mysql/mysql.h... no
So I installed mariadb-devel fileset

This is the last part of the upgrade:

Code: Select all

*** Configuration summary for    ***:

----------------
 User:              nagios
 Group:             nagios
 Bin directory:     /usr/local/nagios/bin
 Config directory:  /usr/local/nagios/etc
 Nagios config:     /usr/local/nagios/etc/nagios.cfg
----------------

Review the options above for accuracy.  If they look okay,
type 'make all' to compile NDOUtils, or type 'make' to get
a list of make options.

cd src/ && make ndo.so
make[1]: Entering directory `/root/nagiosxi/subcomponents/ndo/ndo-3.0.6/src'
gcc -fPIC -shared -g -O2 -I/usr/include/mysql -I/usr/include/mysql/mysql ndo.c -o ndo.so -L/usr/lib64/ -lmariadb -pthread
/bin/ld: cannot find -lmariadb
collect2: error: ld returned 1 exit status
make[1]: *** [ndo.so] Error 1
make[1]: Leaving directory `/root/nagiosxi/subcomponents/ndo/ndo-3.0.6/src'
make: *** [ndo.so] Error 2

I am running

Code: Select all

#cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
these mariadb filesets are installed:

Code: Select all

 rpm -qa |grep -i mariadb
MariaDB-devel-10.5.9-1.el7.centos.x86_64
MariaDB-compat-10.5.9-1.el7.centos.x86_64
MariaDB-common-10.5.9-1.el7.centos.x86_64
MariaDB-client-10.5.9-1.el7.centos.x86_64
MariaDB-backup-10.5.9-1.el7.centos.x86_64
MariaDB-server-10.5.9-1.el7.centos.x86_64

Re: UPgrade from 5.8.1 to 5.8.2: compile error of ndo 3.0.6

Posted: Thu Mar 11, 2021 4:04 pm
by dchurch
You need the MariaDB-shared package to get libmariadb on your system.

MariaDB-devel installs the .pc file for libmariadb, but not the .so file! :-/

Is there a reason you're using MariaDB 10.5 instead of the version of MariaDB available in the default CentOS repos (5.5.68)?

Re: UPgrade from 5.8.1 to 5.8.2: compile error of ndo 3.0.6

Posted: Fri Mar 12, 2021 1:06 am
by jweijters
Hi,

Thanks for you support, I installed the MariaDB-shared package and the upgrade went fine.

At my development server I try-out different versions of the software, and develop extra checks, API endpoints and build tools to talk to NagiosXi and the database before these goes to test and production.

At the MariaDB website
https://mariadb.com/kb/en/changes-impro ... ariadb-55/
It states:
"MariaDB 5.5 is no longer being supported. Please use a more recent release."

Therefor at my development server I previously upgraded of the MariaDB database to current stable version 10.5.

Kind regards,

Joris Weijters

Re: UPgrade from 5.8.1 to 5.8.2: compile error of ndo 3.0.6

Posted: Fri Mar 12, 2021 12:13 pm
by dchurch
Interesting that it's no longer supported.

I'd love to hear if you run into any issues running Nagios XI under MariaDB 10.x. It would be good to get bug reports in so that we can support it moving forward.

Re: UPgrade from 5.8.1 to 5.8.2: compile error of ndo 3.0.6

Posted: Mon Mar 15, 2021 12:39 pm
by wesh
I'm encountering the same issue with the version of MariaDB in CentOS, and used by NagiosXi, as no longer being supported. My new Xi install was just flagged by our security team for the out of date MariaDB.
Does Nagios now officially support upgrading to a new/supported version of MariaDB, like 10.x? If so, is there any documentation for that procedure? Also, will you be releasing a new NagiosXi .OVA with a currently supported database? Thanks

Re: UPgrade from 5.8.1 to 5.8.2: compile error of ndo 3.0.6

Posted: Mon Mar 15, 2021 5:02 pm
by dchurch
We here at Nagios Enterprises don't choose which versions of packages such as PHP or Apache to install. Those decisions are made by the operating system vendor. I.e. RHEL or CentOS.

CentOS 7 is likely going to keep its version of MariaDB at 5.5.x until CentOS 7 is EOL, and that's just fine from a security standpoint.

To mitigate security vulnerabilities while avoiding backward compatibility issues, RHEL, and by extension CentOS uses a process known as backporting. Here's how it works: RHEL patches the supported versions of these packages with the security fixes from the newer versions of these packages. For example, they will take the code from say PHP 7.2 and apply the security vulnerability fixes from that version to the shipped version, in the case of RHEL 7, PHP 5.4.16.  A security audit that checks only the version numbers of installed packages does not take this process into account.

https://access.redhat.com/security/updates/backporting

All this means that an out-of-date version does not necessarily mean "vulnerable" - it just means "not the latest version." Please share this information with your security team and let us know if you have any additional questions.