PDA

View Full Version : Problem with make on OS X


mbobkiewicz
23-08-2005, 12:41
Hi,
Iīve some trouble with building zabbix 1.1 alpha 12 on a Mac OS X 10.4.2 client system. It first starts with make not finding my mysql 4.0.x installation, stops with an error message mysqlclient canīt be found. So iīve downloaded the latest stable 4.1 and calling make stops with some error messages telling some mysql functions are missing. So I thought it would be a good idea to just trash the zabbix folder and get a new one by unpacking the tar archieve. I ran ./configure --with-mysql everything looks good so far. The make comes out with the following output:
Making all in src
make[2]: Nothing to be done for `all-am'.
make[1]: Nothing to be done for `all-am'.
To be sure my system is ok Iīve downloaded the latest stable zabbix 1.0, build it, created configuration files and all daemons are running without trouble.
Whatīs wrong with me and Zabbix 1.1? Any suggestions what to do to make make run again?

sauron
23-08-2005, 13:33
May added --enable-agent --enable-server ? ;)

mbobkiewicz
25-08-2005, 13:05
Thanks for the reply. Now make starts but then stops with these error codes:
/usr/bin/ld: Undefined symbols:
_mysql_free_result
_mysql_affected_rows
_mysql_close
_mysql_data_seek
_mysql_errno
_mysql_error
_mysql_fetch_row
_mysql_init
_mysql_insert_id
_mysql_num_rows
_mysql_query
_mysql_real_connect
_mysql_select_db
_mysql_store_result
collect2: ld returned 1 exit status
make[3]: *** [zabbix_server] Error 1

What may be wrong? From my point of view zabbix seems to find the mysql libs. And while Iīm using the offical tar.gz distro from mysql.org there shouldnīt be any mess ups from apple inside them.

tommie
25-08-2005, 20:45
No, that means the linker can't find the mysql library functions. If the -lmysqlclient (or -lmysql, whatever) is on the linker command line, this is pretty serious. But since it doesn't complain about not finding the library, it's probably not even on the command line. (But what I've seen from the Mac ld, anything goes)

Alexei
26-08-2005, 08:01
Compile agents only:

./configure --enable-agent

Compile server only:

./configure --enable-server --with-mysql

Compile both:

./configure --enable-server --with-mysql --enable-agent

mbobkiewicz
29-08-2005, 09:20
Trashed the zabbix folder, unpacked the tar.gz file, did run configure as you suggested Alexei, still the same missing mysql functions.

chaosloth
30-08-2005, 06:23
I encountered the same problem on 10.3.9 ..
Downloaded the latest release of MySQL to no avail.

Was able to compile after doing the following..

Modify Makefile in ./src/zabbix_server

Added reference to libmysqlclient.a .. Search for line starting with "zabbix_server_LDADD"

zabbix_server_LDADD = /usr/local/mysql/lib/libmysqlclient.a ../libs/zbx... blah..blah

Hope this helps ..

chaosloth
30-08-2005, 06:35
Follow up ..

A better way is to modify the makefile.in in the /src/zabbix_server

Line 171:
zabbix_server_LDADD = ../libs/zbxsysinfo/libzbxsysinfo.a ../libs/zbxlog/libzbxlog.a ../libs/zbxpid/libzbxpid.a ../libs/zbxconf/libzbxconf.a ../libs/zbxdbhigh/libzbxdbhigh.a ../libs/zbxcrypto/libzbxcrypto.a ../libs/zbxnet/libzbxnet.a pinger/libzbxpinger.a poller/libzbxpoller.a escalator/libzbxescalator.a housekeeper/libzbxhousekeeper.a alerter/libzbxalerter.a timer/libzbxtimer.a trapper/libzbxtrapper.a ../libs/zbxemail/libzbxemail.a ../libs/zbxcommon/libzbxcommon.a

Changes to:
zabbix_server_LDADD = /usr/local/mysql/lib/libmysqlclient.a ../libs/zbxsysinfo/libzbxsysinfo.a ../libs/zbxlog/libzbxlog.a ../libs/zbxpid/libzbxpid.a ../libs/zbxconf/libzbxconf.a ../libs/zbxdbhigh/libzbxdbhigh.a ../libs/zbxcrypto/libzbxcrypto.a ../libs/zbxnet/libzbxnet.a pinger/libzbxpinger.a poller/libzbxpoller.a escalator/libzbxescalator.a housekeeper/libzbxhousekeeper.a alerter/libzbxalerter.a timer/libzbxtimer.a trapper/libzbxtrapper.a ../libs/zbxemail/libzbxemail.a ../libs/zbxcommon/libzbxcommon.a

mbobkiewicz
30-08-2005, 09:16
Thanks a lot chaosloth, now it works!