-
Notifications
You must be signed in to change notification settings - Fork 63
Description
Hello,
I am trying to use this module on AIX 7200-03-03-1914 with zabbix agent version 4.0.18.
Have successfully compiled the module using the following options and two different compilers, XLC and GCC:
export OBJECT_MODE=64
CC=/opt/IBM/xlc/13.1.0/bin/xlc CFLAGS=-q64 ./configure --with-postgresql=/opt/postgres/11.5/bin/pg_config --with-zabbix=/apps/zabbix-4.0.18
CC=/usr/bin/gcc CFLAGS=-maix64 ./configure --with-postgresql=/opt/postgres/11.5/bin/pg_config --with-zabbix=/apps/zabbix-4.0.18
In order for compile to succeed, I had to make two minor changes in code:
#diff libzbxpgsql.c libzbxpgsql.c.orig
27c27
< #include <sys/socket.h>
191c191
< if (NULL == (handle = dlopen(NULL, RTLD_LAZY)))
if (NULL == (handle = dlopen(NULL, RTLD_LAZY | RTLD_NOLOAD)))
Otherwise compilers complained that macros RTLD_NOLOAD, AF_INET and AF_INET6 were undeclared.
Since I could not locate macro RTLD_NOLOAD in any header (.h) file on the whole system, I simply removed it from libzbxpgsql.c :)
After enabling libzbxpgsql.so module loading in configuration file of zabbix agent, agent crashes when trying to start it with the following message:
22479114:20200504:161804.520 Starting Zabbix Agent [HOSTNAME]. Zabbix 4.0.18 (revision 688cd21456).
22479114:20200504:161804.520 **** Enabled features ****
22479114:20200504:161804.520 IPv6 support: NO
22479114:20200504:161804.520 TLS support: NO
22479114:20200504:161804.520 **************************
22479114:20200504:161804.520 using configuration file: /etc/zabbix/zabbix_agentd.conf
22479114:20200504:161804.521 Got signal [signal:4(SIGILL),reason:30,refaddr:0]. Crashing ...
22479114:20200504:161804.521 ====== Fatal information: ======
22479114:20200504:161804.522 program counter not available for this architecture
22479114:20200504:161804.522 === Registers: ===
22479114:20200504:161804.522 register dump not available for this architecture
22479114:20200504:161804.522 backtrace is not available for this platform
22479114:20200504:161804.522 === Memory map: ===
22479114:20200504:161804.522 memory map not available for this platform
22479114:20200504:161804.522 ================================
When loading of libzbxpgsql.so module is disabled in configuration file of zabbix agent, agent starts and works without any problems.
I am confused.
Any ideas?