PDA

View Full Version : Complie errors


Mark Ramm-Christensen
18-11-2004, 17:47
I am trying to install 1.1, and I have some compile errors. I've been working on this for a while, and I'm sure I'm missing something simple. It gooks like perhaps there is something wrong with my mysql libraries, but I am just using the default RPM's from Suse 9.1. I am using ./configure -with-mysql and then running make, as directed in the manual.

The relivant portion of the Make output is below.

Anybody see this before, or have any suggestions on how to fix it?

Thanks in advance,
--Mark

--------------------------------------------------

Making all in src/zabbix_sucker
make[1]: Entering directory `/home/mark/bin/zabbix-1.1alpha1/src/zabbix_sucker'
gcc -o ../../bin/zabbix_suckerd -g -O2 -I../../include -I/usr/include/mysql zabbix_sucker.c ../../include/db.c ../../include/functions.c ../../include/expression.c ../../include/cfg.c ../../include/log.c ../../include/security.c ../../include/pid.c ../../include/email.c ../../include/snprintf.c ../zabbix_agent/sysinfo.c ../../include/md5.c alerter.c pinger.c housekeeper.c checks_simple.c checks_snmp.c checks_agent.c checks_internal.c -Wall -pthread -lnsl -L/usr/lib/mysql -lmysqlclient_r -lm
../../include/snprintf.c:161: warning: `dopr' defined but not used
../zabbix_agent/sysinfo.c: In function `process':
../zabbix_agent/sysinfo.c:304: warning: `function_str' might be used uninitialized in this function
/usr/lib/mysql/libmysqlclient_r.a(my_compress.o)(.text+0x66): In function `my_uncompress':
: undefined reference to `uncompress'
/usr/lib/mysql/libmysqlclient_r.a(my_compress.o)(.text+0x11c): In function `my_compress_alloc':
: undefined reference to `compress'
collect2: ld returned 1 exit status
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/mark/bin/zabbix-1.1alpha1/src/zabbix_sucker'
make: *** [all] Error 1

Alexei
18-11-2004, 19:09
Your system is missing thread-safe MySQL libraries. Currently ZABBIX does not require it, so you may do the following:

1. Replace mysqlclient_r by mysqlclient in configure.in, then run autoheader; autoconf

or

2. Do this replacement in all Makefiles

Let me know if this helps.

Mark Ramm-Christensen
19-11-2004, 19:45
Your system is missing thread-safe MySQL libraries. Currently ZABBIX does not require it, so you may do the following:

1. Replace mysqlclient_r by mysqlclient in configure.in, then run autoheader; autoconf

or

2. Do this replacement in all Makefiles

Let me know if this helps.

Thanks for your suggestions. Here's an update on where I am at now:

Based on your suggestions, I tried two things to get the install to work, I uninstalled the SUSE 9.1 standard mysql RPM's and replace them with the official RPM's from mysql.com (as the website said the newer RPMs were built with thread safe) including the server, client, development and source RPMs. I then checked for mysqlclient_r in the usr/lib/mysql directory, and verified that I was able to login to the zabbix database. But I still received the compile error above.

So then I edited the configure.in file as you suggested, but then autoheader errored out. I am now trying two things:

1) doing the zabbix 1.1 install on another box,
2) editing all the make files as you suggest.

--Mark

Mark Ramm-Christensen
20-11-2004, 18:44
I am now trying two things:

1) doing the zabbix 1.1 install on another box,
2) editing all the make files as you suggest.

--Mark

Well both solutions worked. I got it to install with all the default packages from ubuntu Linux (warty warthog) and on Suse I was able to get it to compile without net-snmp by hacking the make files as suggested.

Later I will try compiling net-snmp and mysql on the Suse box and see if I can't get the standard install working there too.

--Mark