Problem installing Zabbix with libiconv

Nate Rudd deafears at naterudd.com
Fri Nov 8 00:20:08 PST 2013


I am trying to setup Zabbix server for the first time and am running into
problems with "make install" catching on some "undefined symbols" that are
supposed to be referencing functions in libiconv.  Here is what I have done:

Installed a clean install of OS X 10.9
Installed macports from the package
sudo port install mysql5-server
sudo port install apache2
sudo port install php5 +apache2
sudo port install php5-mysql
sudo port install php5-gd
sudo port install php5-sockets
sudo port install php5-mbstring
sudo port install php5-gettext
sudo port install php5-iconv

I downloaded Zabbix from the source and am able to run the following line:
./configure --enable-server --enable-agent
--with-mysql=/opt/local/lib/mysql5/bin/mysql_config --with-ldap
--enable-ipv6 --with-net-snmp --with-libcurl --prefix=/usr/local
--with-libiconv-prefix=/opt/local

When I run "make install" I get the following error:
gcc -DZABBIX_DAEMON -DSYSCONFDIR="\"/usr/local/etc\""
-DDATADIR="\"/usr/local/share\"" -g -O2  -I/opt/local/include/mysql5/mysql
 -pipe -Os -fPIC    -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE
-DSIGNALS_DONT_BREAK_READ -DIGNORE_SIGHUP_SIGQUIT
 -DDONT_DECLARE_CXA_PURE_VIRTUAL       -I. -I/usr/local/include
 -I/usr/include  -L/opt/local/lib -L/opt/local/lib/mysql5/mysql
-L/opt/local/lib -L/opt/local/lib/          -L/usr/lib -rdynamic   -o
zabbix_server zabbix_server-actions.o zabbix_server-operations.o
zabbix_server-events.o zabbix_server-scripts.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
snmptrapper/libzbxsnmptrapper.a nodewatcher/libzbxnodewatcher.a
utils/libzbxutils.a httppoller/libzbxhttppoller.a watchdog/libzbxwatchdog.a
escalator/libzbxescalator.a proxypoller/libzbxproxypoller.a
selfmon/libzbxselfmon.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/zbxmemory/libzbxmemory.a ../../src/libs/zbxalgo/libzbxalgo.a
../../src/libs/zbxnix/libzbxnix.a ../../src/libs/zbxsys/libzbxsys.a
../../src/libs/zbxconf/libzbxconf.a ../../src/libs/zbxmedia/libzbxmedia.a
../../src/libs/zbxcommon/libzbxcommon.a
../../src/libs/zbxcrypto/libzbxcrypto.a
../../src/libs/zbxcomms/libzbxcomms.a
../../src/libs/zbxcommshigh/libzbxcommshigh.a
../../src/libs/zbxjson/libzbxjson.a ../../src/libs/zbxexec/libzbxexec.a
../../src/libs/zbxself/libzbxself.a ../../src/libs/zbxserver/libzbxserver.a
../../src/libs/zbxicmpping/libzbxicmpping.a
../../src/libs/zbxdbhigh/libzbxdbhigh.a ../../src/libs/zbxdb/libzbxdb.a
-lmysqlclient       -lcurl  -lnetsnmp -lcrypto -lcrypto  -lnetsnmp -lcrypto
-lcrypto   -lldap -llber  -lm  -lresolv -liconv
Undefined symbols for architecture x86_64:
  "_iconv", referenced from:
      _convert_to_utf8 in libzbxcommon.a(str.o)
  "_iconv_close", referenced from:
      _convert_to_utf8 in libzbxcommon.a(str.o)
  "_iconv_open", referenced from:
      _convert_to_utf8 in libzbxcommon.a(str.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make[3]: *** [zabbix_server] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1


The references are being called from src/libs/zbxcommon/str.c, but I don't
know how to modify that file in order for the "make install" command to
complete successfully.

I read the many posts online that talk about a conflict with the system
version of libiconv, so I have tried moving the system libiconv with the
following command.  But that didn't have an effect.
sudo mv /usr/lib/libiconv.2.dylib /usr/lib/libiconv.2.old.dylib

Please let me know if you can help me. I don't mind trying anything  Thanks
in advance.

Nate Rudd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20131108/a598d6c6/attachment.html>


More information about the macports-users mailing list