View Full Version : Help needed : compilation on AIX 5.3 failed
pcamelio
03-01-2006, 15:55
I try to compile Zabbix on AIX 5.3 unsuccessfully :eek:
I got the following error msg at the link step:
Configure option I used :
configure --enable-server --enable-agent --with-mysql --with-net-snmp-5.2.2 --prefix=$HOME
Then I run Make
the compilation is OK but the link failed at the first step
...
Making all in zabbix_agent
...
gcc -static -g -O2 -o zabbix_agent zabbix_agent.o .....
collect2: ../libs/zbxsysinfo/libzbxsysinfo.a: not a COFF file
make: The error code from the last command is 1.
Any idea ? :confused:
Seems like outdated version of GCC. Try to compile ZABBIX with AIX compiler by setting environment CC:
export CC=cc
pcamelio
03-01-2006, 16:13
So I need the IBM C compiler :D
but we did not have it, :( I just can use gcc provided by IBM:
gcc 3.3.2-5 for aix 5.3
...
I read in some threads in forum about pb between 32 bits and 64 bits
I tried to compile with -maix64 but I have got error msg for declaration variables in some c files ... stop to look in that direction
sniff sniff
I already used Zabbix on Linux, but I really loved use it on AIX 5.3 (p520)
Any others suggestions
pcamelio
03-01-2006, 17:09
I am downloading gcc 4.0.2
I let you know if I already have problem to compile
Regards
pcamelio
05-01-2006, 16:54
I still have the same pb with gcc 4.0.2 :(
Any help is welcome
Wookielnx
25-01-2006, 20:16
I'm having the same problem. I've tried to dig into it a bit more. I'm using AIX 5.2 ML6 and I've tried both the IBM supplied gcc and the one from bull's freeware. Here is what I've been able to see also.
I get the following error first:
gcc -g -O2 -o zabbix_agent zabbix_agent.o ../libs/zbxsysinfo/libzbxsysinfo.a ../libs/zbxsysinfo/aix/libzbxsysinfo2.a ../libs/zbxlog/libzbxlog.a
../libs/zbxcrypto/libzbxcrypto.a ../libs/zbxnet/libzbxnet.a ../libs/zbxconf/libzbxconf.a ../libs/zbxcommon/libzbxcommon.a -lnsl
collect2: ../libs/zbxsysinfo/libzbxsysinfo.a: not a COFF file
Then, if I run the collect2 and ld commands here is what I find:
~#> collect2 ./src/libs/zbxsysinfo/libzbxsysinfo.a
collect2: ./src/libs/zbxsysinfo/libzbxsysinfo.a: not a COFF file
~#> collect2 -v
collect2 version 3.3.2
/usr/bin/ld -v
ld: 0706-030 No processing done. Specify at least one
input or import file or use at least one -b ex<n> option.
collect2: ld returned 255 exit status
~#> /usr/bin/ld ./src/libs/zbxsysinfo/libzbxsysinfo.a
ld: 0711-230 WARNING: Nested archives are not supported.
Archive member ./src/libs/zbxsysinfo/libzbxsysinfo.a[libzbxcommon.a] is being ignored.
ld: 0711-230 WARNING: Nested archives are not supported.
Archive member ./src/libs/zbxsysinfo/libzbxsysinfo.a[libzbxcrypto.a] is being ignored.
ld: 0711-327 WARNING: Entry point not found: __start
ld: 0711-244 ERROR: No csects or exported symbols have been saved.
I also read through all of the issues with AIX 4.3 and the "not a COFF file" errors. I've tried to "ar -g" the files (which changes them from big archives to small archives), and it doesn't do anything different.
I hope this helps get us closer to using this. I would really like to start monitoring all of my AIX boxes. Let me know if you want me try anything to get this going.
Chip
There is pre-compiled ZABBIX agent for AIX 5.1. I'm not sure I have access to AIX 5.3 box to create an agent specially for 5.3.
pcamelio
26-01-2006, 08:45
Well, about the error in the compilation I tried with the gcc get from AIXPDSL
(http://aixpdslib.seas.ucla.edu) with the same error :(
Unfortunately, I can't spend a lot of time to solve this problem.
About your answer Alexei, I did not try to build only the agent but Zabbix itself because I planned to install the Zabbix server on our AIX server in order to manage other AIX boxes and our network and W2K servers.
Anyway, it is already running on Debian box, and it is working fine for the network and Windows servers :)
Bye.
I'm current running the 1.1beta2 agent on AIX 5.1 and 1.1beta5 on my server. Will using the beta5 agent give me more items I can check against? If so, anyway we can get a pre-compiled beta5 agent since I'm have the same make issue as others? :)
Just started using this software and it looks pretty good so far.
Thanks
Things work with IBM's c compiler ... I just compiled the agent on 5.3 using XLC.
If you don't have a license for XLC and only need it for this one thing then you can always download the free trial version ... I think they give you 30 or 60 days for free.
pcamelio
08-02-2006, 08:30
Thank you for the update
As soon as I got time, I'll try to download the C compiler and compile Zabbix :)
I let you know what I have done
Regards
vendraminmauro
20-02-2006, 16:59
Hi All,
I'm a system administrator on p595 machines (about 25 systems with AIX 5.3 ML03).
I tried to compile the server and the agent (with gcc-3.3.2-5) but I got the same results.
Did you tried to compile zabbix on AIX with XLC compiler ?
Any result ?
Regards.
Mauro
KarmaPolice
01-05-2006, 22:51
bump for having the same issue... anyone know a workaround?...
XLC isn't really an option... and i'm getting the "Empty String" error if i try and use the pre-compiled agent out on the site...
Any help?
Just FYI, I gave up on an agent for AIX and am just running the default AIX SNMP from my AIX boxes, 9 of them.
Good luck guys
fmtaylor2
16-05-2006, 22:01
I installed the latest gcc. still getting that *&$^# not a COFF file error. If anyone has any ideas or a fix or something let me know. I am desperate to get this working on my AIX boxen
Have you tried to compile ZABBIX agent with AIX C compiler? It works on AIX 4.x and 5.0. I do not have available AIX 5.3, I cannot test it now.
Has someone got a compiled version of zabbix_agentd (1.1) for aix5.2? It isn't in the download section. Whenever I try to compile myself I get the COFF error :/
If you like to compile the agent with gcc you have to following commands:
./configure --enable-agent
make
cd src/zabbix_agent/
gcc -g -O2 -o zabbix_agent zabbix_agent.o ../libs/zbxsysinfo/aix.o ../libs/zbxsysinfo/common.o ../libs/zbxsysinfo/file.o ../libs/zbxsysinfo/ntp.o ../libs/zbxsysinfo/system.o ../libs/zbxsysinfo/http.o ../libs/zbxsysinfo/aix/cpu.o ../libs/zbxsysinfo/aix/diskio.o ../libs/zbxsysinfo/aix/diskspace.o ../libs/zbxsysinfo/aix/inodes.o ../libs/zbxsysinfo/aix/kernel.o ../libs/zbxsysinfo/aix/memory.o ../libs/zbxsysinfo/aix/net.o ../libs/zbxsysinfo/aix/proc.o ../libs/zbxsysinfo/aix/sensors.o ../libs/zbxsysinfo/aix/swap.o ../libs/zbxsysinfo/aix/uptime.o ../libs/zbxlog/libzbxlog.a ../libs/zbxcrypto/libzbxcrypto.a ../libs/zbxnet/libzbxnet.a ../libs/zbxconf/libzbxconf.a ../libs/zbxcommon/libzbxcommon.a
make
gcc -g -O2 -o zabbix_agentd active.o cpustat.o diskdevices.o interfaces.o logfiles.o stats.o zabbix_agentd.o ../libs/zbxsysinfo/aix.o ../libs/zbxsysinfo/common.o ../libs/zbxsysinfo/file.o ../libs/zbxsysinfo/ntp.o ../libs/zbxsysinfo/system.o ../libs/zbxsysinfo/http.o ../libs/zbxsysinfo/aix/cpu.o ../libs/zbxsysinfo/aix/diskio.o ../libs/zbxsysinfo/aix/diskspace.o ../libs/zbxsysinfo/aix/inodes.o ../libs/zbxsysinfo/aix/kernel.o ../libs/zbxsysinfo/aix/memory.o ../libs/zbxsysinfo/aix/net.o ../libs/zbxsysinfo/aix/proc.o ../libs/zbxsysinfo/aix/sensors.o ../libs/zbxsysinfo/aix/swap.o ../libs/zbxsysinfo/aix/uptime.o ../libs/zbxlog/libzbxlog.a ../libs/zbxcrypto/libzbxcrypto.a ../libs/zbxpid/libzbxpid.a ../libs/zbxnet/libzbxnet.a ../libs/zbxconf/libzbxconf.a ../libs/zbxcommon/libzbxcommon.a
cd ../..
make
make install
For the server you have to find out by your self which librarys you need!
This error came into the code with the new autoconf, I think it was 1beata10.
Have fun
Great. That did the job.
However the AIX agent doesn't seem to like proc.num checks. Is there a way around this?
You can use Userparameters to get the missing values:
# cpu load
UserParameter=usr.cpu,uptime |cut -d, -f5
# diskio
UserParameter=usr.io.disk_r,iostat | grep hdisk | awk '{sum += $ 5} END {print sum}'
UserParameter=usr.io.disk_w,iostat | grep hdisk | awk '{sum += $ 6} END {print sum}'
# net load
UserParameter=usr.net.in ,netstat -v $1 | grep Bytes | awk '{printf("%d", $ 4%2^24)}'
UserParameter=usr.net.out ,netstat -v $1 | grep Bytes | awk '{printf("%d", $ 2%2^24)}'
# pagings
UserParameter=usr.paging ,lsps -s $1 | grep % | awk '{printf("%d",$ 2)}'
UserParameter=usr.paging.total,svmon|grep 'pg space'|awk '{printf "%.0f\n",$3*4}'
UserParameter=usr.paging.used,svmon|grep 'pg space'|awk '{printf "%.0f\n",$4*4}'
UserParameter=usr.paging.free,svmon|grep 'pg space'|awk '{printf "%.0f\n",($3 - $4)*4}'
# proc count
UserParameter=usr.proc.cnt ,ps -eaf |grep -v grep|grep -c $1
#cups
UserParameter=usr.cups.cnt ,/usr/local/bin/lpstat -P $1 |wc -l
Thanks for your help. The more and more I find things out with this program the more impressed I get.
Well done to the developers.
endorphin
01-08-2006, 14:43
Hi Zabbix-users,
despite all your advice, I only managed to compile Zabbix agent on my AIX 5.2 server. This has been made with gcc.
So I try to compile the server part, an error appears with the "make" command :
.....
.....
Making all in zbxsms
source='sms.c' object='sms.o' libtool=no DEPDIR=.deps depmode=aix /bin/sh ./../../depcomp xlc -DHAVE_CONFIG_H -I. -I. -I../../../include -g -c sms.c
"sms.c", line 116.40: 1506-045 (S) Undeclared identifier CRTSCTS.
make: The error code from the last command is 1.
Stop.
I decided to install XLC (IBM C compiler for AIX), but still the same error.....
Please help me !
mshulman1980
08-08-2006, 22:26
I'm trying to install Zabbix 1.1 agent onto my AIX 5.3ML3 system, and I've tried installing XLC and I continue to get the same make error as everyone else:
conf.a ../libs/zbxcommon/libzbxcommon.a -lnsl
collect2: ../libs/zbxsysinfo/libzbxsysinfo.a: not a COFF file
make: 1254-004 The error code from the last command is 1.
Do I need to tell it to look for xlc rather then gcc or will it do that automatically?
excellent work. thanks very much. i shall plow on.
one last thing, how are you starting the agent, in inittab ???
H
mshulman1980, have you followed the instructions on the previous page for gcc ???
H
Hi,
I have my zabbix user setup thus ... "uid=901(zabbix) gid=1(staff)". Anyone have any different, is there anything in particular people have found that needs to be added/done to the zabbix user to make it work better ?? I seem to be getting data ok.
the only other thing that i think i will need to do is to add it to the oracle groups so it gain access to the DB's for monitoring.
ta
H
endorphin
05-10-2006, 09:26
Hello,
question for developper of Zabbix : is it "theorycally" possible to
make the compilation of Zabbix server on AIX 5.2 ? (with full functionnalities)
Thank you for your answer
Endorphin
I had the same COFF file problem using gcc 3.3.2 on AIX 5.3. I was able to get it compiled and running using the fix posted by fips (thanks fips). I am still working the bugs out my config, but the zabbix agent is at least functional for me.
flex.lima
27-12-2006, 19:49
Guys!
I had the same COF file problem in my AIX 5.3 on power, I give up to compile and to solve my problem, I used an AIX 5.1 compiled agent (http://www.zabbix.com/download2.php)
Extract the files zabbix_agent zabbix_agentd zabbix_sender to a folder as you wish
Configure the zabbix_agentd.conf and start the zabbix_agentd
Flex.lima
djinn_fr22
05-03-2007, 16:10
Thanks to advices of Flips I compiled 1.1.6 on AIX 5.1
If you have problems in gmake in aix 5.3 i mode server in sms
Just edit src/libs/zbxsms/sms.c
options.c_cflag = old_options.c_cflag | CRTSCTS | CS8 | CLOCAL | CREAD;
for these
options.c_cflag = old_options.c_cflag | CS8 | CLOCAL | CREAD;
I dont now what i disable but work