PDA

View Full Version : zabbix 1.4.2 on AIX ./configure fails


lolziac
22-08-2007, 12:51
Dear community,

I'm having a problem like all of us, and I need help :)
I'm trying to install ZABBIX 1.4.2 on RS6000 44P Model 170 machine, with AIX OS 5.3 v0.5, to monitor my other AIX and OS400 Servers.
I managed to install Apache (httpd-2.2.4), Mysql (mysql-5.0.45-aix5.2-powerpc-64bit), PHP (php-5.2.3).

installed:
openssh-4.3p2-r2.tar
net-snmp.5.2.tar
openssl-0.9.7l-1.aix5.1.ppc.rpm
curl.7.15.3.tar
gd.2.0.33.tar
and other libraries required for Apache Mysql and PHP.

this is my echo $PATH
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:/usr/local/mysql/bin:/usr/bin:/usr/local/mc/bin:/usr/local:/opt/freeware/lib:/usr/lib:/lib:/usr/local/bin:/usr/local/lib:/usr/java14/jre/bin:/usr/java14/bin
when it comes to install zabbix (that I really want to have it on this machine), it fails
./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --enable-static --with-mysql --with-net-snmp --with-libcurl
>>
>>
it stopes at -lnsl_r
checking for mysql_config... /usr/local/mysql/bin/mysql_config
checking for main in -lz ... yes
checking for main in -lnsl_r ... no
configure: error: Not found nsl_r library
Please can you help me on this, I'm out of solutions and I'm stuck here alone.
I tried to find solutions on net, but no luck...

I'm attaching my config.log

Thank you,
lolziac :eek:

dsipe
22-08-2007, 13:08
Witch compiler are you using ?

I've just compiled Zab 1.4.2 [ but only agent coz i prefer to run the server on a Linux box ] and it's ok.

I used the xlc compiler ( just do an export CC=xlc just before ./configure )

lolziac
22-08-2007, 13:23
Greetingz dsipe,

im using gcc compiler
gcc-4.0.0-1
libgcc-4.0.0-1
gcc-c++-4.0.0-1
-----------------------
but anycase i tryed with the export CC=xlc just before ./configure
# export CC=xlc
# ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --enable-static --with-mysql --with-net-snmp --with-libcurl
checking for a BSD-compatible install... ./install-sh -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
configure: Configuring
checking whether make sets $(MAKE)... (cached) yes
checking build system type... powerpc-ibm-aix5.3.0.0
checking host system type... powerpc-ibm-aix5.3.0.0
checking for gcc... xlc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
but as it seems I dont have xlc ?!!!

is xlc for free, where can i get it ???

thank you

dsipe
22-08-2007, 13:35
xlc is IBM VisualAge Compiler, that's not @all a freeware.
Don't known if a try version exist...

fips
22-08-2007, 14:36
Gcc compiles in 32 bit if you not give some compiler flags!
Try 64 bit with following exports:

export CFLAGS=-maix64
export OBJECT_MODE=64
export LDFLAGS="-Wl,-bbigtoc"

lolziac
22-08-2007, 15:26
fips,

I tryed that but didn't help, same error :confused: ...
checking for mysql_config... /usr/local/mysql/bin/mysql_config
checking for main in -lz ... yes
checking for main in -lnsl_r ... no
configure: error: Not found nsl_r library
with respect,
lolziac

fips
23-08-2007, 10:43
I had problems with --enable-static, try without this option!

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

Do you have /usr/lib/libnsl_r.a?

Peter

lolziac
23-08-2007, 13:53
Peter,

Thank you for your time, helping me,

I tried without --enable-static, and now its giving me a different error warning.

./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl
>>
checking for mysql_config... /usr/local/mysql/bin/mysql_config
checking for main in -lmysqlclient ... no
configure: error: Not found mysqlclient library
>>
I checked for libnsl_r.a, and it seems that it is there :S
# ls -la /usr/lib/libnsl_r.a
lrwxrwxrwx 1 root system 17 Aug 17 09:00 /usr/lib/libnsl_r.a -> /usr/lib/libnsl.a
# mysql_config
Usage: /usr/local/mysql/bin/mysql_config [OPTIONS]
Options:
--cflags [-I/usr/local/mysql/include -ma -qstrict -qoptimize=2 -qmaxmem=8192]
--include [-I/usr/local/mysql/include]
--libs [-L/usr/local/mysql/lib -lmysqlclient -lz -lnsl_r -lm]
--libs_r [-L/usr/local/mysql/lib -lmysqlclient_r -lz -lnsl_r -lm]
--socket [/tmp/mysql.sock]
--port [3306]
--version [5.0.27]
--libmysqld-libs [-L/usr/local/mysql/lib -lmysqld -lz -lnsl_r -lm -lrt]
im attaching you also config.log

with respect,
lolziac

fips
24-08-2007, 13:37
I think you have a problem with your mysql installation. Could you not compile mysql for your self?

lolziac
24-08-2007, 15:22
Dear community,

let me update you with my problem,

It could be that mysql is not installed good, but with me everything is working with mysql

the How-to that I followed to install mysql was http://www-941.ibm.com/collaboration/wiki/display/WikiPtype/aixopen

I have installed mysql version [5.0.27]
# mysql_config
Usage: /usr/local/mysql/bin/mysql_config [OPTIONS]
Options:
--cflags [-I/usr/local/mysql/include -ma -qstrict -qoptimize=2 -qmaxmem=8192]
--include [-I/usr/local/mysql/include]
--libs [-L/usr/local/mysql/lib -lmysqlclient -lz -lnsl_r -lm]
--libs_r [-L/usr/local/mysql/lib -lmysqlclient_r -lz -lnsl_r -lm]
--socket [/tmp/mysql.sock]
--port [3306]
--version [5.0.27]
--libmysqld-libs [-L/usr/local/mysql/lib -lmysqld -lz -lnsl_r -lm -lrt]
FYI
------------------------------
I did a test by installing this
MySQL-client-3.23.58-2.aix5.1.ppc.rpm
MySQL-devel-3.23.58-2.aix5.1.ppc.rpm

with CC=gcc, .configure passed that error, and stopped in other places, and also i know that thats not preferred so I uninstalled it, so the problem could be with client-development libraries, not finding them
------------------------------

I downloaded a trail version of xlC, and installed in my AIX, removed gcc and started ./configure
./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --enable-static --with-mysql --with-net-snmp --with-libcurl
it passed that mysql problem, but stopped at crypto libraries somewhere...
what i did i took off --enable-static

and passed that also, I managed to ./configure but when it comes to make install :( it stopped at
zbxsms

sms.c Undeclared identifier CRTSCTS
what I did to pass that also was

I commented in file ./src/libs/zbxsms/sms.c

// options.c_cflag = old_options.c_cflag | CRTSCTS | CS8 | CLOCAL | CREAD;
and I passed that error also, but now it stoppes at :)
xlc -I /usr/local/include -I/usr/local/mysql/include -ma -qstrict -qoptimize=2 -qmaxmem=8192 -I/usr/local/include -I. -I/usr/local/include -L /usr/local/lib -L/usr/local/mysql/lib -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -o zabbix_server zabbix_server-evalfunc.o zabbix_server-expression.o zabbix_server-actions.o zabbix_server-operations.o zabbix_server-events.o zabbix_server-zlog.o zabbix_server-functions.o zabbix_server-server.o alerter/libzbxalerter.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 ../../src/libs/zbxsysinfo/libzbxserversysinfo.a ../../src/libs/zbxsysinfo/aix/libspecsysinfo.a ../../src/libs/zbxsysinfo/common/libcommonsysinfo.a ../../src/libs/zbxsysinfo/simple/libsimplesysinfo.a ../../src/libs/zbxlog/libzbxlog.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/zbxdbhigh/libzbxdbhigh.a ../../src/libs/zbxdb/libzbxdb.a ../../src/libs/zbxcommon/libzbxcommon.a ../../src/libs/zbxcrypto/libzbxcrypto.a ../../src/libs/zbxcomms/libzbxcomms.a -lm -lnsl -lmysqlclient -lcurl -lnetsnmp
ld: 0711-317 ERROR: Undefined symbol: .compress
ld: 0711-317 ERROR: Undefined symbol: .uncompress
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make: 1254-004 The error code from the last command is 8.

To make sure that this is not a problem with zabbix 1.4.2, I went with 1.4.1, but the same problem occurred
Now I'm out of options

I would appreciate your help
Thank you all
lolziac

lolziac
25-08-2007, 22:56
Ok ppl,
1. started from begging by installing zabbix,
./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl --prefix=/usr/local/zabbix --exec-prefix=/usr/local/zabbix
2. It stopped at
checking whether libcurl is usable... no
configure: error: Not found Curl library
But I fixed that by editing the configure file, at line
> LIBS="-lnetsnmp $LIBS" and I added -lcurl
LIBS="-lnetsnmp -lcurl $LIBS"
and also I had to add to LDFLAGS "-L/usr/local/lib"

3. ./configure went well :) hoorrayyy

4. make install, is now what I get problems :)

5. stooped at
Making install in zbxsms
"sms.c", line 205.53: 1506-045 ( S )Undeclared identifier CRTSCTS.
what I did to fix this is I edited sms.c at line
> options.c_cflag = old_options.c_cflag | CRTSCTS | CS8 | CLOCAL | CREAD and I deleted CRTSCTS
options.c_cflag = old_options.c_cflag | CS8 | CLOCAL | CREAD I know that I will not need SMS so i dont care if SMS doesnt work :)

6. Started again with make install but now stoppes at nodewatcher.c
Making install in nodewatcher
source='nodewatcher.c' object='nodewatcher.o' libtool=no DEPDIR=.deps depmode=aix /bin/sh ../../../depcomp xlc -DHAVE_CONFIG_H -I. -I. -I../../../include -g -I/usr/local/mysql/include -ma -qstrict -qoptimize=2 -qmaxmem=8192 -I/usr/local/include -I. -I/usr/local/include -c nodewatcher.c
"/usr/local/include/net-snmp/net-snmp-config.h", line 928.9: 1506-236 (W) Macro name PACKAGE_BUGREPORT has been redefined.
"/usr/local/include/net-snmp/net-snmp-config.h", line 928.9: 1506-358 (I) "PACKAGE_BUGREPORT" is defined on line 479 of ../../../include/config.h.
"/usr/local/include/net-snmp/net-snmp-config.h", line 931.9: 1506-236 (W) Macro name PACKAGE_NAME has been redefined.
"/usr/local/include/net-snmp/net-snmp-config.h", line 931.9: 1506-358 (I) "PACKAGE_NAME" is defined on line 482 of ../../../include/config.h.
"/usr/local/include/net-snmp/net-snmp-config.h", line 934.9: 1506-236 (W) Macro name PACKAGE_STRING has been redefined.
"/usr/local/include/net-snmp/net-snmp-config.h", line 934.9: 1506-358 (I) "PACKAGE_STRING" is defined on line 485 of ../../../include/config.h.
"/usr/local/include/net-snmp/net-snmp-config.h", line 937.9: 1506-236 (W) Macro name PACKAGE_TARNAME has been redefined.
"/usr/local/include/net-snmp/net-snmp-config.h", line 937.9: 1506-358 (I) "PACKAGE_TARNAME" is defined on line 488 of ../../../include/config.h.
"/usr/local/include/net-snmp/net-snmp-config.h", line 940.9: 1506-236 (W) Macro name PACKAGE_VERSION has been redefined.
"/usr/local/include/net-snmp/net-snmp-config.h", line 940.9: 1506-358 (I) "PACKAGE_VERSION" is defined on line 491 of ../../../include/config.h.
"/usr/local/include/net-snmp/library/snmp_impl.h", line 78.9: 1506-236 (W) Macro name NOACCESS has been redefined.
"/usr/local/include/net-snmp/library/snmp_impl.h", line 78.9: 1506-358 (I) "NOACCESS" is defined on line 122 of /usr/include/sys/vmuser.h.
"/usr/local/include/net-snmp/library/parse.h", line 32.9: 1506-236 (W) Macro name MAXLABEL has been redefined.
"/usr/local/include/net-snmp/library/parse.h", line 32.9: 1506-358 (I) "MAXLABEL" is defined on line 53 of /usr/include/arpa/onameser_compat.h.
"nodewatcher.c", line 91.1: 1506-191 (E) The character # is not a valid C source character.
"nodewatcher.c", line 93.1: 1506-191 (E) The character # is not a valid C source character.
"nodewatcher.c", line 95.1: 1506-191 (E) The character # is not a valid C source character.
"nodewatcher.c", line 91.2: 1506-276 (S) Syntax error: possible missing ')'?
"nodewatcher.c", line 125.1: 1506-191 (E) The character # is not a valid C source character.
"nodewatcher.c", line 127.1: 1506-191 (E) The character # is not a valid C source character.
"nodewatcher.c", line 129.1: 1506-191 (E) The character # is not a valid C source character.
"nodewatcher.c", line 125.2: 1506-276 (S) Syntax error: possible missing ')'?
"nodewatcher.c", line 124.25: 1506-023 (S) Expecting function or pointer to function.
"nodewatcher.c", line 124.25: 1506-275 (S) Unexpected text ')' encountered.
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 1.


Stop.
make: 1254-004 The error code from the last command is 1.


Stop.


Now I'm lost my skillz are limited :)

Thanks to all
Help appreciated
lolziac

lolziac
06-09-2007, 16:41
Dear community,

After a time, I managed to install zabbix on AIX 5.3 with GCC compiler :D .
The mysql problem that i was having was because I had installed a precompiled mysql for AIX 5.2.
Mysql was compiled with xlC and when trying with gcc to install zabbix with --mysql support, it was bringing library mysql errors.

What I had to do was, change the /usr/local/mysql/bin/mysql_config file

Find:
cflags="-I$pkgincludedir -ma -O2 -qstrict -qoptimize=2 -qmaxmem=8192 " #note: end space!
Replace:
cflags="-I$pkgincludedir -pipe -mcpu=power3 -Wa,-many " #note: end space!

This worked for me, hope it will help others also.
Now hard work comes, configuring the zabbix :) help appriciated.

Greetingz,
lolziac