Ndoutuils compiled error


#1

I am getting undefined reference to ceil error, when trying to compile ndoutils, see below for details:

ndoutils-1.4b4]# make
cd ./src/; make ; cd …
make[1]: Entering directory /export/home/kchan/ndoutils-1.4b4/src' make ndo2db-2x make[2]: Entering directory/export/home/kchan/ndoutils-1.4b4/src’
gcc -O0 -g -DHAVE_CONFIG_H -D BUILD_NAGIOS_2X -o ndo2db-2x ndo2db.c dbhandlers-2x.o io.o utils.o db.o -L/usr/lib/mysql -lz -lnsl
utils.o(.text+0x14e): In function ndo_dbuf_strcat': /export/home/kchan/ndoutils-1.4b4/src/utils.c:67: undefined reference toceil’
collect2: ld returned 1 exit status
make[2]: *** [ndo2db-2x] Error 1
make[2]: Leaving directory /export/home/kchan/ndoutils-1.4b4/src' make[1]: *** [ndo2db] Error 2 make[1]: Leaving directory/export/home/kchan/ndoutils-1.4b4/src’

I have tried “./configure” and “./configure --with-mysql-lib=/usr/lib/myql --with-mysql-inc=/usr/include/mysql”. Does any one have any idea? The Nagios version I am on is 2.9.

Thanks.


#2

**i have problem with installation of ndoutils-1.4b7 too. i have on my system 6.2-RELEASE FreeBSD installed and running Nagios 2.9, mysql-server and client:
mysql-client-5.0.45_1 Multithreaded SQL database (client)
mysql-server-5.0.45_1 Multithreaded SQL
php5 with gd and mysql support.
i unpack ndoutils-1.4b7.tar.gz into
/usr/home/my_directory/ndoutils-1.4b7/
then **
cd /usr/home/my_directory/ndoutils-1.4b7/
**then **
./configure

and get next ouput:

*** MySQL library could not be located… **************************

You chose to compile NDBXT with MySQL support, but I was unable to
locate the MySQL library on your system. If the library is
installed, use the --with-mysql-lib argument to specify the
location of the MySQL library.

NOTE: After you install the necessary libraries on your system:
1. Make sure /etc/ld.so.conf has an entry for the directory in
which the MySQL libraries are installed.
2. Run ‘ldconfig’ to update the run-time linker options.
3. Run ‘make devclean’ in the NDBXT distribution to clean out
any old references to your previous compile.
4. Rerun the configure script.

TIP: Try the following…

     ./configure --with-mysql-lib=/usr/lib/mysql

checking mysql/mysql.h usability… no
checking mysql/mysql.h presence… no
checking for mysql/mysql.h… no

*** MySQL include file could not be located… **********************

You chose to compile NDBXT with MySQL support, but I was unable to
locate <mysql/mysql.h> on your system. If the include file is
installed, use the --with-mysql-inc argument to specify the location
of the MySQL include file.


then i find where locate mysql library and file mysql.h

***./configure --with-pgsql-inc=/usr/local/include/mysql/ --with-mysql-lib=/usr/local/lib/mysql/ --disable-pgsql


and get output:
*** MySQL include file could not be located… **********************

You chose to compile NDBXT with MySQL support, but I was unable to
locate <mysql/mysql.h> on your system. If the include file is
installed, use the --with-mysql-inc argument to specify the location
of the MySQL include file.


**but im sure that file mysql.h locate in /usr/local/include/mysql/ - i see that file via mc and console
then i change path to this file **
./configure –with-pgsql-inc=/usr/local/include/ --with-mysql-lib=/usr/local/lib/mysql/ --disable-pgsql

and get ouput

MySQL library and include file(s) were found!
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating subst
config.status: creating include/config.h

*** Configuration summary for ndoutils 1.4b7 10-31-2007 ***:

General Options:

NDO2DB user: nagios
NDO2DB group: nagios

Review the options above for accuracy. If they look okay,
type ‘make’ to compile the NDO utilities.

**and finaly as i red in instructions i run ***make *and get output:

cd ./src/; make ; cd …
gcc -g -O2 -DHAVE_CONFIG_H -c -o io.o io.c
In file included from io.c:10:
…/include/config.h:261:25: mysql/mysql.h: No such file or directory
…/include/config.h:262:26: mysql/errmsg.h: No such file or directory
*** Error code 1

Stop in /usr/home/my_directory/nagios2_10/ndoutils-1.4b7/src.
*** Error code 1

Stop in /usr/home/my_directory/nagios2_10/ndoutils-1.4b7.

i guess that something wrong with paths in that package - help me please