Unfortunately it is not possible to build Zabbix 1.1 binaries from scratch in a Red Hat Enterprice Linux 3 environment (gcc 3.2.3-42, glibc 3.2.3).
It tried to create binaries for agent and server using
but I received:
make[3]: Entering directory `/home/guiadmin/zabbix-1.1/src/zabbix_agent'
if gcc -DHAVE_CONFIG_H -I. -I. -I../../include -static -g -O2 -MT zabbix_agent.o -MD -MP -MF ".deps/zabbix_agent.Tpo" -c -o zabbix_agent.o zabbix_agent.c; \
then mv -f ".deps/zabbix_agent.Tpo" ".deps/zabbix_agent.Po"; else rm -f ".deps/zabbix_agent.Tpo"; exit 1; fi
gcc -static -g -O2 -o zabbix_agent zabbix_agent.o ../libs/zbxsysinfo/libzbxsysinfo.a ../libs/zbxsysinfo/linux/libzbxsysinfo2.a ../libs/zbxlog/libzbxlog.a ../libs/zbxcrypto/libzbxcrypto.a ../libs/zbxnet/libzbxnet.a ../libs/zbxconf/libzbxconf.a ../libs/zbxcommon/libzbxcommon.a
../libs/zbxsysinfo/linux/libzbxsysinfo2.a(proc.o)(.text+0x846): In function `PROC_MEMORY':
/home/guiadmin/zabbix-1.1/src/libs/zbxsysinfo/linux/proc.c:83: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../libs/zbxsysinfo/libzbxsysinfo.a(common.o)(.text+0x1cc4): In function `forward_request':
common/common.c:1391: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../libs/zbxsysinfo/libzbxsysinfo.a(common.o)(.text+0x2ca1): In function `CHECK_DNS':
common/common.c:2023: undefined reference to `__res_query'
collect2: ld returned 1 exit status
make[3]: *** [zabbix_agent] Error 1
make[3]: Leaving directory `/home/guiadmin/zabbix-1.1/src/zabbix_agent'
Unfortunately the resolver-methods are included in libresolv, instead of glibc. Furthermore the -static flag causes problems with glibc. To solve these problems, I added two addition flags to the make command:
Maybe this helps somebody to build Zabbix 1.1 on RH EL3.
Best regards
Axel
It tried to create binaries for agent and server using
./configure --enable-static --with-mysql --enable-server --enable-agent
but I received:
make[3]: Entering directory `/home/guiadmin/zabbix-1.1/src/zabbix_agent'
if gcc -DHAVE_CONFIG_H -I. -I. -I../../include -static -g -O2 -MT zabbix_agent.o -MD -MP -MF ".deps/zabbix_agent.Tpo" -c -o zabbix_agent.o zabbix_agent.c; \
then mv -f ".deps/zabbix_agent.Tpo" ".deps/zabbix_agent.Po"; else rm -f ".deps/zabbix_agent.Tpo"; exit 1; fi
gcc -static -g -O2 -o zabbix_agent zabbix_agent.o ../libs/zbxsysinfo/libzbxsysinfo.a ../libs/zbxsysinfo/linux/libzbxsysinfo2.a ../libs/zbxlog/libzbxlog.a ../libs/zbxcrypto/libzbxcrypto.a ../libs/zbxnet/libzbxnet.a ../libs/zbxconf/libzbxconf.a ../libs/zbxcommon/libzbxcommon.a
../libs/zbxsysinfo/linux/libzbxsysinfo2.a(proc.o)(.text+0x846): In function `PROC_MEMORY':
/home/guiadmin/zabbix-1.1/src/libs/zbxsysinfo/linux/proc.c:83: Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../libs/zbxsysinfo/libzbxsysinfo.a(common.o)(.text+0x1cc4): In function `forward_request':
common/common.c:1391: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
../libs/zbxsysinfo/libzbxsysinfo.a(common.o)(.text+0x2ca1): In function `CHECK_DNS':
common/common.c:2023: undefined reference to `__res_query'
collect2: ld returned 1 exit status
make[3]: *** [zabbix_agent] Error 1
make[3]: Leaving directory `/home/guiadmin/zabbix-1.1/src/zabbix_agent'
Unfortunately the resolver-methods are included in libresolv, instead of glibc. Furthermore the -static flag causes problems with glibc. To solve these problems, I added two addition flags to the make command:
make CFLAGS="-g -O2" LDFLAGS=-lresolv
Maybe this helps somebody to build Zabbix 1.1 on RH EL3.
Best regards
Axel
Comment