PDA

View Full Version : installing 1.8.2 on Mac OS X Server 10.6.3 (Intel)


nleaman
04-05-2010, 02:06
got the following on make install:

checks_snmp.c: In function 'get_snmp':
checks_snmp.c:602: error: expected expression before ')' token

I edited line 597 in checks_snmp.c from :
else if (vars->type == ASN_INTEGER ||
to
else if (vars->type == ASN_INTEGER

This seemed to fix that issue, but now I have no idea what the new problem is:
gcc -DZABBIX_DAEMON -g -O2 -I/usr/include/mysql -fno-omit-frame-pointer -pipe -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -I/usr/local/include -I. -I/usr/local/include -I/usr/include -L/usr/lib/mysql -L/usr/local/lib -lcurl -lnetsnmp -lcrypto -lnetsnmp -lcrypto -L/usr/lib -lldap -llber -o zabbix_server zabbix_server-actions.o zabbix_server-operations.o zabbix_server-events.o zabbix_server-zlog.o zabbix_server-server.o alerter/libzbxalerter.a dbsyncer/libzbxdbsyncer.a dbconfig/libzbxdbconfig.a discoverer/libzbxdiscoverer.a pinger/libzbxpinger.a poller/libzbxpoller.a housekeeper/libzbxhousekeeper.a timer/libzbxtimer.a trapper/libzbxtrapper.a nodewatcher/libzbxnodewatcher.a utils/libzbxutils.a httppoller/libzbxhttppoller.a watchdog/libzbxwatchdog.a escalator/libzbxescalator.a ../../src/libs/zbxsysinfo/libzbxserversysinfo.a ../../src/libs/zbxsysinfo/osx/libspecsysinfo.a ../../src/libs/zbxsysinfo/common/libcommonsysinfo.a ../../src/libs/zbxsysinfo/simple/libsimplesysinfo.a ../../src/libs/zbxlog/libzbxlog.a ../../src/libs/zbxdbcache/libzbxdbcache.a ../../src/libs/zbxnix/libzbxnix.a ../../src/libs/zbxsys/libzbxsys.a ../../src/libs/zbxconf/libzbxconf.a ../../src/libs/zbxemail/libzbxemail.a ../../src/libs/zbxsms/libzbxsms.a ../../src/libs/zbxcommon/libzbxcommon.a ../../src/libs/zbxcrypto/libzbxcrypto.a ../../src/libs/zbxcomms/libzbxcomms.a ../../src/libs/zbxjson/libzbxjson.a ../../src/libs/zbxserver/libzbxserver.a ../../src/libs/zbxicmpping/libzbxicmpping.a ../../src/libs/zbxdbhigh/libzbxdbhigh.a ../../src/libs/zbxdb/libzbxdb.a ../../src/libs/zbxjabber/libzbxjabber.a -lmysqlclient -liksemel -lcurl -lnetsnmp -lm -lresolv -liconv
Undefined symbols:
"_compress", referenced from:
_my_compress_alloc in libmysqlclient.a(my_compress.o)
_my_compress in libmysqlclient.a(my_compress.o)
(maybe you meant: _compress_signs, _my_compress_alloc , _my_compress )
"_uncompress", referenced from:
_my_uncompress in libmysqlclient.a(my_compress.o)
(maybe you meant: _my_uncompress)
ld: symbol(s) not found
collect2: ld returned 1 exit status

I installed the MySQL-49 libraries by following the directions here http://support.apple.com/kb/HT4006


this is my configure options:
./configure -prefix=/Users/zabbix --enable-server --enable-agent --with-mysql --with-net-snmp --with-jabber=/usr/local --with-libcurl --with-ldap

nleaman
06-05-2010, 19:27
Any advice on how I can resolve the "undefined symbols" errors I'm getting when trying to compile?

Undefined symbols:
"_compress", referenced from:
_my_compress_alloc in libmysqlclient.a(my_compress.o)
_my_compress in libmysqlclient.a(my_compress.o)
(maybe you meant: _compress_signs, _my_compress_alloc , _my_compress )
"_uncompress", referenced from:
_my_uncompress in libmysqlclient.a(my_compress.o)
(maybe you meant: _my_uncompress)
ld: symbol(s) not found

nleaman
06-05-2010, 23:18
Okay, well I fixed the undefined symbols in libmysqlclient.a problem by setting the env var LDFLAGS to -lz (export LDFLAGS=-lz)

I've now decided to compile with the ssh2 option:

./configure -prefix=/Users/zabbix --enable-server --enable-agent --with-mysql --with-net-snmp --with-jabber=/usr/local --with-libcurl --with-ldap --with-ssh2


Before, without setting --with-ssh2, the Linker flags where this:
Linker flags: -lz -L/usr/lib -lldap -llber -L/usr/lib/mysql -L/usr/local/lib -lcurl -lnetsnmp -lcrypto -lnetsnmp -lcrypto

Looks fine, but now, with the addition of the --with-ssh2 option, the Linker flags are:
Linker flags: -lz -L/usr/lib -lldap -llber -L/usr/lib/mysql -L/usr/local/lib -lcurl -lnetsnmp -lcrypto -lnetsnmp -lcrypto -L$/usr/local/lib


make seems to choke on -L$/usr/local/lib
gcc -DZABBIX_DAEMON -g -O2 -I/usr/include/mysql -fno-omit-frame-pointer -pipe -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT -I/usr/local/include -I. -I/usr/local/include -Iusr/local/include -I/usr/include -L/usr/lib/mysql -L/usr/local/lib -lcurl -lnetsnmp -lcrypto -lnetsnmp -lcrypto -Lusr/local/lib -lz -L/usr/lib -lldap -llber -o zabbix_server zabbix_server-actions.o zabbix_server-operations.o zabbix_server-events.o zabbix_server-zlog.o zabbix_server-server.o alerter/libzbxalerter.a dbsyncer/libzbxdbsyncer.a dbconfig/libzbxdbconfig.a discoverer/libzbxdiscoverer.a pinger/libzbxpinger.a poller/libzbxpoller.a housekeeper/libzbxhousekeeper.a timer/libzbxtimer.a trapper/libzbxtrapper.a nodewatcher/libzbxnodewatcher.a utils/libzbxutils.a httppoller/libzbxhttppoller.a watchdog/libzbxwatchdog.a escalator/libzbxescalator.a ../../src/libs/zbxsysinfo/libzbxserversysinfo.a ../../src/libs/zbxsysinfo/osx/libspecsysinfo.a ../../src/libs/zbxsysinfo/common/libcommonsysinfo.a ../../src/libs/zbxsysinfo/simple/libsimplesysinfo.a ../../src/libs/zbxlog/libzbxlog.a ../../src/libs/zbxdbcache/libzbxdbcache.a ../../src/libs/zbxnix/libzbxnix.a ../../src/libs/zbxsys/libzbxsys.a ../../src/libs/zbxconf/libzbxconf.a ../../src/libs/zbxemail/libzbxemail.a ../../src/libs/zbxsms/libzbxsms.a ../../src/libs/zbxcommon/libzbxcommon.a ../../src/libs/zbxcrypto/libzbxcrypto.a ../../src/libs/zbxcomms/libzbxcomms.a ../../src/libs/zbxjson/libzbxjson.a ../../src/libs/zbxserver/libzbxserver.a ../../src/libs/zbxicmpping/libzbxicmpping.a ../../src/libs/zbxdbhigh/libzbxdbhigh.a ../../src/libs/zbxdb/libzbxdb.a ../../src/libs/zbxjabber/libzbxjabber.a -lmysqlclient -liksemel -lcurl -lnetsnmp -lssh2 -lm -lresolv -liconv
ld: warning: directory 'usr/local/lib' following -L not found


I'm now looking for where it adds "$/usr/local/lib" (also it adds "I$/usr/local/include" to Compiler flags)

Separately, is it a big deal that I get 100s of

host.c:1372: warning: format '%lu' expects type 'long unsigned int *', but argument 3 has type 'uint64_t *'
host.c is just an example. Getting it seemingly on every *.c.

nleaman
07-05-2010, 02:21
Here is the fix for the errors in the checks_snmp.c source and configure
sed -ie 's/$\/usr/\/usr/' configure
sed -ie 's/ASN_INTEGER ||/ASN_INTEGER/' ./src/zabbix_server/poller/checks_snmp.c


on to the next problem:

zabbix$ tail -f zabbix_server.log
924:20100506:171330.245 SNMP monitoring: YES
924:20100506:171330.245 IPMI monitoring: NO
924:20100506:171330.245 WEB monitoring: YES
924:20100506:171330.245 Jabber notifications: YES
924:20100506:171330.245 ODBC: NO
924:20100506:171330.245 SSH2 support: YES
924:20100506:171330.245 IPv6 support: NO
924:20100506:171330.245 **************************
924:20100506:171330.462 Can't allocate shared memory of size 29361128 [Cannot allocate memory]
924:20100506:171330.462 Can't allocate shared memory for database cache.


Here are the default settings out of the box:

zabbix$ sysctl kern.sysv
kern.sysv.shmmax: 4194304
kern.sysv.shmmin: 1
kern.sysv.shmmni: 4096
kern.sysv.shmseg: 8
kern.sysv.shmall: 2097152
kern.sysv.semmni: 128
kern.sysv.semmns: 32000
kern.sysv.semmnu: 87381
kern.sysv.semmsl: 250
kern.sysv.semume: 10

set them to the following (set in /etc/sysctl.conf and a reboot):

kern.sysv.shmall=2097152
kern.sysv.shmmax=2147483648
kern.sysv.shmmni=4096
kern.sysv.semmsl=250
kern.sysv.semmns=32000
kern.sysv.semopm=100
kern.sysv.semmni=128


and now I see stuff happening in the logs... I'm wondering what the next install/setup problem is though... wish me luck

How do I report these issues?