LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-10-2009, 12:36 PM   #1
bpwoods
LQ Newbie
 
Registered: Aug 2009
Posts: 9

Rep: Reputation: 0
Question Nagios + ndoutils + MySQL


So I currently have an install of Nagios and am building another box for a different group of servers. I am trying to add ndoutils to the new install, but an having all sorts of problems.

If I use the MySQL that ships with RHE 4.7 (4.2 I think), I get errors when installing the DB code for ndoutils. Basically saying I canít have varchars longer than 255. If I upgrade to MySQL 5.0, I get errors trying to compile the Nagios Plugins (I will include just the errors at the end).

So, I would REALLY like to stay with the built in 4.2 if possible and get more than 255 in the varchars (system setting?), but if I need to upgrade to MySQL 5, then maybe some help with these errors.

Here are the RPMs Iím installing for MySQL:
  • MySQL-server-community-5.0.85-0.rhel4.x86_64.rpm
  • MySQL-shared-compat-5.0.85-0.rhel4.x86_64.rpm
  • MySQL-client-community-5.0.85-0.rhel4.x86_64.rpm
  • MySQL-devel-community-5.1.38-0.rhel4.x86_64.rpm

Errors:
Code:
check_mysql.c:48:19: mysql.h: No such file or directory
check_mysql.c:49:20: errmsg.h: No such file or directory
check_mysql.c:56: error: `MYSQL_PORT' undeclared here (not in a function)
check_mysql.c: In function `main':
check_mysql.c:71: error: `MYSQL' undeclared (first use in this function)
check_mysql.c:71: error: (Each undeclared identifier is reported only once
check_mysql.c:71: error: for each function it appears in.)
check_mysql.c:71: error: syntax error before "mysql"
check_mysql.c:72: error: `MYSQL_RES' undeclared (first use in this function)
check_mysql.c:72: error: `res' undeclared (first use in this function)
check_mysql.c:73: error: `MYSQL_ROW' undeclared (first use in this function)
check_mysql.c:73: error: syntax error before "row"
check_mysql.c:92: error: `mysql' undeclared (first use in this function)
check_mysql.c:94: error: `MYSQL_READ_DEFAULT_GROUP' undeclared (first use in this function)
check_mysql.c:98: error: `CR_UNKNOWN_HOST' undeclared (first use in this function)
check_mysql.c:100: error: `CR_VERSION_ERROR' undeclared (first use in this function)
check_mysql.c:102: error: `CR_OUT_OF_MEMORY' undeclared (first use in this function)
check_mysql.c:104: error: `CR_IPSOCK_ERROR' undeclared (first use in this function)
check_mysql.c:106: error: `CR_SOCKET_CREATE_ERROR' undeclared (first use in this function)
check_mysql.c:113: warning: cast to pointer from integer of different size
check_mysql.c:113: warning: cast to pointer from integer of different size
check_mysql.c:113: warning: cast to pointer from integer of different size
check_mysql.c:113: warning: passing arg 1 of `strlen' makes pointer from integer without a cast
check_mysql.c:113: warning: passing arg 2 of `memcpy' makes pointer from integer without a cast
check_mysql.c:113: warning: passing arg 1 of `__strdup' makes pointer from integer without a cast
check_mysql.c:117: error: `CR_SERVER_GONE_ERROR' undeclared (first use in this function)
check_mysql.c:119: error: `CR_SERVER_LOST' undeclared (first use in this function)
check_mysql.c:121: error: `CR_UNKNOWN_ERROR' undeclared (first use in this function)
check_mysql.c:128: warning: cast to pointer from integer of different size
check_mysql.c:128: warning: cast to pointer from integer of different size
check_mysql.c:128: warning: cast to pointer from integer of different size
check_mysql.c:128: warning: passing arg 1 of `strlen' makes pointer from integer without a cast
check_mysql.c:128: warning: passing arg 2 of `memcpy' makes pointer from integer without a cast
check_mysql.c:128: warning: passing arg 1 of `__strdup' makes pointer from integer without a cast
check_mysql.c:135: warning: cast to pointer from integer of different size
check_mysql.c:135: warning: cast to pointer from integer of different size
check_mysql.c:135: warning: cast to pointer from integer of different size
check_mysql.c:135: warning: passing arg 1 of `strlen' makes pointer from integer without a cast
check_mysql.c:135: warning: passing arg 2 of `memcpy' makes pointer from integer without a cast
check_mysql.c:135: warning: passing arg 1 of `__strdup' makes pointer from integer without a cast
check_mysql.c:147: error: `row' undeclared (first use in this function)
check_mysql.c:148: warning: cast to pointer from integer of different size
check_mysql.c:148: warning: cast to pointer from integer of different size
check_mysql.c:148: warning: cast to pointer from integer of different size
check_mysql.c:148: warning: passing arg 1 of `strlen' makes pointer from integer without a cast
check_mysql.c:148: warning: passing arg 2 of `memcpy' makes pointer from integer without a cast
check_mysql.c:148: warning: passing arg 1 of `__strdup' makes pointer from integer without a cast
check_mysql.c:166: error: `MYSQL_FIELD' undeclared (first use in this function)
check_mysql.c:166: error: `fields' undeclared (first use in this function)
make[2]: *** [check_mysql-check_mysql.o] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Notes:
I do have the files taht are reported as missing:
  • /usr/include/mysql/mysql.h
  • /usr/include/mysql/errmsg.h

THANKS!!!!!!!!
 
Old 09-10-2009, 12:38 PM   #2
nathanpc
Member
 
Registered: Aug 2009
Location: Brazil
Distribution: Ubuntu Lucid
Posts: 45

Rep: Reputation: 15
Is /usr/include your path to header files?
 
Old 09-10-2009, 12:44 PM   #3
bpwoods
LQ Newbie
 
Registered: Aug 2009
Posts: 9

Original Poster
Rep: Reputation: 0
I don’t know much about the compile process in linux.

Are you talking about the make file, or the .h files (there are a lot of them) in the nagios plug-in source?
 
Old 09-10-2009, 12:50 PM   #4
nathanpc
Member
 
Registered: Aug 2009
Location: Brazil
Distribution: Ubuntu Lucid
Posts: 45

Rep: Reputation: 15
The *.h files is the headers files to compile C++ and C programs and they have to be in a folder that is in the "path" to the compiler, if thet aren't in the correct place the compiler will show this errors, like in your PC:
Code:
check_mysql.c:48:19: mysql.h: No such file or directory
check_mysql.c:49:20: errmsg.h: No such file or directory
All because you need to have it in the correct folder.

Then, search in Google where is your compiler path to header files and put the in the correct place.

Hope it helps!
 
Old 09-10-2009, 02:53 PM   #5
bpwoods
LQ Newbie
 
Registered: Aug 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Ok, I did a really dirty thing, but it seems to have gotten me to the next stage. I copied the entire content of the /usr/include/mysql/ to my build folder. Ran the make and got some new errors:

Code:
Making all in plugins
make[2]: Entering directory `/Backup/nagios-plugins-1.4.13/plugins'
/bin/sh ../libtool --tag=CC --mode=link gcc  -g -O2  -L. -o check_mysql  check_mysql-check_mysql.o netutils.o utils.o ../lib/libnagiosplug.a ../gl/libgnu.a  -lnsl -lresolv  -ldl
gcc -g -O2 -o check_mysql check_mysql-check_mysql.o netutils.o utils.o  -L/Backup/nagios-plugins-1.4.13/plugins ../lib/libnagiosplug.a ../gl/libgnu.a -lnsl -lresolv -ldl
check_mysql-check_mysql.o(.text+0x782): In function `main':
/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:92: undefined reference to `mysql_init'
check_mysql-check_mysql.o(.text+0x794):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:94: undefined reference to `mysql_options'
check_mysql-check_mysql.o(.text+0x7d3):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:97: undefined reference to `mysql_real_connect'
check_mysql-check_mysql.o(.text+0x7e0):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:98: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0x7ef):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:100: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0x7fe):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:102: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0x80d):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:104: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0x81c):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:106: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0x82f):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:107: undefined reference to `mysql_error'
check_mysql-check_mysql.o(.text+0x84b):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:113: undefined reference to `mysql_stat'
check_mysql-check_mysql.o(.text+0x860):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:116: undefined reference to `mysql_error'
check_mysql-check_mysql.o(.text+0x884):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:127: undefined reference to `mysql_query'
check_mysql-check_mysql.o(.text+0x894):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:134: undefined reference to `mysql_store_result'
check_mysql-check_mysql.o(.text+0x8a8):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:141: undefined reference to `mysql_num_rows'
check_mysql-check_mysql.o(.text+0x8b9):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:147: undefined reference to `mysql_fetch_row'
check_mysql-check_mysql.o(.text+0x8cd):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:154: undefined reference to `mysql_field_count'
check_mysql-check_mysql.o(.text+0x8ec):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:168: undefined reference to `mysql_num_fields'
check_mysql-check_mysql.o(.text+0x8f6):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:169: undefined reference to `mysql_fetch_fields'
check_mysql-check_mysql.o(.text+0x96b):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:185: undefined reference to `mysql_free_result'
check_mysql-check_mysql.o(.text+0x973):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:186: undefined reference to `mysql_close'
check_mysql-check_mysql.o(.text+0x9e2):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:222: undefined reference to `mysql_free_result'
check_mysql-check_mysql.o(.text+0x9ea):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:226: undefined reference to `mysql_close'
check_mysql-check_mysql.o(.text+0xa84):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:117: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0xa93):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:119: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0xaa2):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:121: undefined reference to `mysql_errno'
check_mysql-check_mysql.o(.text+0xab5):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:122: undefined reference to `mysql_error'
check_mysql-check_mysql.o(.text+0xb50):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:192: undefined reference to `mysql_free_result'
check_mysql-check_mysql.o(.text+0xb58):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:193: undefined reference to `mysql_close'
check_mysql-check_mysql.o(.text+0xc34):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:128: undefined reference to `mysql_error'
check_mysql-check_mysql.o(.text+0xc47):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:129: undefined reference to `mysql_close'
check_mysql-check_mysql.o(.text+0xc70):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:142: undefined reference to `mysql_close'
check_mysql-check_mysql.o(.text+0xc8e):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:148: undefined reference to `mysql_error'
check_mysql-check_mysql.o(.text+0xca1):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:149: undefined reference to `mysql_free_result'
check_mysql-check_mysql.o(.text+0xca9):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:150: undefined reference to `mysql_close'
check_mysql-check_mysql.o(.text+0xcbd):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:135: undefined reference to `mysql_error'
check_mysql-check_mysql.o(.text+0xcd0):/Backup/nagios-plugins-1.4.13/plugins/check_mysql.c:136: undefined reference to `mysql_close'
collect2: ld returned 1 exit status
make[2]: *** [check_mysql] Error 1
make[2]: Leaving directory `/Backup/nagios-plugins-1.4.13/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/Backup/nagios-plugins-1.4.13'
make: *** [all] Error 2
I looked for "check_mysql-check_mysql.o(.text+0x782): In function `main':" but didn't find anything.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Nagios and Oreon (Nagios web front end) installation and Configuration LXer Syndicated Linux News 1 05-31-2016 07:26 AM
Nagios 3.1.2 + RHEL 5.3 You don't have permission to access /nagios/ on this server psix Linux - Server 13 08-04-2015 02:25 AM
Problem with ndoutils prakash.akumalla Linux - Newbie 4 10-04-2012 05:50 AM
Nagios Daemon, PID not found but rc.nagios runs agentc0re Slackware 1 07-03-2007 02:47 PM
LXer: Nagios 2.5 and Oreon 1.3 (Nagios web front end) installation with screenshots LXer Syndicated Linux News 0 08-11-2006 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration