PDA

View Full Version : 64-bit build error


eggmaster1969
03-11-2004, 19:04
on dual opteron fc2 x86_64 host, make produces following output:

Making all in src/zabbix_agent
make[1]: Entering directory `/usr/local/src/zabbix-1.0/src/zabbix_agent'
gcc -o ../../bin/zabbix_agent -g -O2 -I../../include zabbix_agent.c sysinfo.c ../../include/log.c ../../include/cfg.c ../../include/security.c ../../include/snprintf.c -Wall -lnsl
sysinfo.c: In function `process':
sysinfo.c:430: warning: cast from pointer to integer of different size
../../include/snprintf.c: In function `dopr':
../../include/snprintf.c:174: error: incompatible types in assignment
../../include/snprintf.c: In function `vasprintf':
../../include/snprintf.c:811: error: incompatible types in assignment
../../include/snprintf.c:819: error: incompatible types in assignment
make[1]: *** [all] Error 1
make[1]: Leaving directory `/usr/local/src/zabbix-1.0/src/zabbix_agent'
make: *** [all] Error 1

I haven't found anything in the docs about 32-bit vs. 64-bit. Am I not looking hard enough?

astyanax
03-11-2004, 21:57
on dual opteron fc2 x86_64 host, make produces following output:

Making all in src/zabbix_agent
make[1]: Entering directory `/usr/local/src/zabbix-1.0/src/zabbix_agent'
gcc -o ../../bin/zabbix_agent -g -O2 -I../../include zabbix_agent.c sysinfo.c ../../include/log.c ../../include/cfg.c ../../include/security.c ../../include/snprintf.c -Wall -lnsl
sysinfo.c: In function `process':
sysinfo.c:430: warning: cast from pointer to integer of different size
../../include/snprintf.c: In function `dopr':
../../include/snprintf.c:174: error: incompatible types in assignment
../../include/snprintf.c: In function `vasprintf':
../../include/snprintf.c:811: error: incompatible types in assignment
../../include/snprintf.c:819: error: incompatible types in assignment
make[1]: *** [all] Error 1
make[1]: Leaving directory `/usr/local/src/zabbix-1.0/src/zabbix_agent'
make: *** [all] Error 1

I haven't found anything in the docs about 32-bit vs. 64-bit. Am I not looking hard enough?
Exact same error,
Redhat Enterprise 3.0 Update 2 for AMD64
kernel Linux optttest2 2.4.21-15.ELsmp #1 SMP Thu Apr 22 00:09:01 EDT 2004 x86_64 x86_64 x86_64 GNU/Linux
gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-34)
Quad processor Opteron box

astyanax
03-11-2004, 23:47
I have found that setting CFLAGS to include -m32 to allow the code to generate 32-bit rather than 64-bit code allows the program to compile:

export CFLAGS="-O2 -Wall -m32"
before running configure.

Of course, I don't know how well the program runs in 32-bit mode in an OS capable of 64-bit memory addressing...especially since I need to monitor memory usage...

The question remains whether zabbix is 64-bit ready.

riegersteve
04-11-2004, 17:03
what are your configure options

and is mysql 32 bit or 64 bit version,
i have zabbix running on 64 bit solaris 9

Alexei
04-11-2004, 17:17
Hey, try to get snprintf.c (just the file, nothing else) from the CVS. Use it with 1.0. I hope it will resolve compilation issues for 64 bit platforms.

And, yes, let me know if it works :)

deanpence
22-02-2005, 16:19
I've yet to find a solution for this problem. I'm trying to run Zabbix on Gentoo Linux on an AMD32 proc, and running with CFLAGS including '-m32' doesn't work; I don't have the option of installing 32-bit emulation libraries.

Also, I've looked around the website (maybe I'm missing something obvious), but I don't see instructions for using your CVS repository there so I can get the aforementioned snprintf.c.

Alexei
22-02-2005, 17:52
Please, follow this link:

http://sourceforge.net/cvs/?group_id=23494

Click on "Browse the CVS Tree" to get access to the latest source code.