From: Ben C. <Be...@cl...> - 2004-05-26 09:45:45
|
Marcelo, I am very glad to hear you are working with PerfParse. This was designed exactly to overcome the problems of the performance data being so inaccessible. Looking at the error, I believe the compiler cannot find the MySQL libraries. These are defined in the 'Makefile' as: CFLAGS= -I/usr/local/include/mysql LDFLAGS= -L/usr/local/lib/mysql (These lines do include more information. Do not adjust any other parts.) Therefore we looking for the libraries in /usr/local/include/mysql. Can you please locate the file 'mysql.h', then adjust the Makefile to suit. To help with this, please look at the Makefile in the Nagios directory. If you have compiled Nagios with support for MySQL, There will be a similar line to above. You can copy this directly if you so choose. Please let me know if this solution works, as other users may be greatly interested. Sorry about this, later versions will not have this problem. Regards, Ben. Marcos & Marcelo wrote: > [cut] I'm interesting to use your solution, but I have some problems to install it, although, the README file explain everything. I received some error messages as you can see in the document attached. > Thanks, > Marcelo > [root@dhcp-brasil-xxx-xxx-xxx-xxx perfparse]# make > gcc -g -O2 -I -DHAVE_CONFIG_H -DNSCORE -L -lmysqlclient perfparse.c common.o -o perfparse > /tmp/ccuiITWZ.o(.text+0xc8): In function `my_on_exit': > /tmp/projeto/plugins/perfparse/perfparse.c:138: undefined reference to `mysql_close' > /tmp/ccuiITWZ.o(.text+0xc26): In function `save_raw_data': > /tmp/projeto/plugins/perfparse/perfparse.c:594: undefined reference to `mysql_fetch_row' > /tmp/ccuiITWZ.o(.text+0xc45):/tmp/projeto/plugins/perfparse/perfparse.c:596: undefined reference to `mysql_free_result' > /tmp/ccuiITWZ.o(.text+0xe0b): In function `save_bin_data': > /tmp/projeto/plugins/perfparse/perfparse.c:649: undefined reference to `mysql_fetch_row' > /tmp/ccuiITWZ.o(.text+0xe2a):/tmp/projeto/plugins/perfparse/perfparse.c:651: undefined reference to `mysql_free_result' > /tmp/ccuiITWZ.o(.text+0x110c): In function `validate_service': > /tmp/projeto/plugins/perfparse/perfparse.c:767: undefined reference to `mysql_fetch_row' > /tmp/ccuiITWZ.o(.text+0x112e):/tmp/projeto/plugins/perfparse/perfparse.c:771: undefined reference to `mysql_free_result' > /tmp/ccuiITWZ.o(.text+0x11d7): In function `validate_host': > /tmp/projeto/plugins/perfparse/perfparse.c:798: undefined reference to `mysql_fetch_row' > /tmp/ccuiITWZ.o(.text+0x11f9):/tmp/projeto/plugins/perfparse/perfparse.c:802: undefined reference to `mysql_free_result' > /tmp/ccuiITWZ.o(.text+0x12c4): In function `validate_metric': > /tmp/projeto/plugins/perfparse/perfparse.c:834: undefined reference to `mysql_fetch_row' > /tmp/ccuiITWZ.o(.text+0x12e3):/tmp/projeto/plugins/perfparse/perfparse.c:836: undefined reference to `mysql_free_result' > /tmp/ccuiITWZ.o(.text+0x13db): In function `now_get_state': > /tmp/projeto/plugins/perfparse/perfparse.c:888: undefined reference to `mysql_fetch_row' > /tmp/ccuiITWZ.o(.text+0x1448):/tmp/projeto/plugins/perfparse/perfparse.c:917: undefined reference to `mysql_free_result' > /tmp/ccuiITWZ.o(.text+0x14ba):/tmp/projeto/plugins/perfparse/perfparse.c:876: undefined reference to `mysql_free_result' > /tmp/ccuiITWZ.o(.text+0x1503):/tmp/projeto/plugins/perfparse/perfparse.c:896: undefined reference to `mysql_free_result' > /tmp/ccuiITWZ.o(.text+0x1a54): In function `sql_fail': > /tmp/projeto/plugins/perfparse/perfparse.c:1085: undefined reference to `mysql_error' > common.o(.text+0xce): In function `now_query': > : undefined reference to `mysql_free_result' > common.o(.text+0xeb): In function `now_query': > : undefined reference to `mysql_query' > common.o(.text+0x10d): In function `now_query': > : undefined reference to `mysql_store_result' > common.o(.text+0x13a): In function `rows': > : undefined reference to `mysql_num_rows' > common.o(.text+0x161): In function `now_connect': > : undefined reference to `mysql_init' > common.o(.text+0x192): In function `now_connect': > : undefined reference to `mysql_options' > common.o(.text+0x1c1): In function `now_connect': > : undefined reference to `mysql_real_connect' > common.o(.text+0x1ef): In function `now_connect': > : undefined reference to `mysql_error' > common.o(.text+0x22a): In function `now_connect': > : undefined reference to `mysql_close' > collect2: ld returned 1 exit status > make: *** [perfparse] Error 1 |