dnaeon / py-vpoller

Distributed vSphere API Proxy
Other
83 stars 31 forks source link

Zabbix 6.2.x vpoller make error #283

Open chises opened 2 years ago

chises commented 2 years ago

I am not able to compile the *.so file with zabbix Server 6.2.x Following error messages:

cc -fPIC -shared -o vpoller.so vpoller.c -I../../../include -I/usr/local/include -L/usr/local/lib -lzmq
In file included from ../../../include/zbxalgo.h:23,
                 from ../../../include/cfg.h:23,
                 from vpoller.c:33:
../../../include/common.h:23:10: fatal error: zbxsysinc.h: Datei oder Verzeichnis nicht gefunden
   23 | #include "zbxsysinc.h"
      |          ^~~~~~~~~~~~~

or

cc -fPIC -shared -o vpoller.so vpoller.c -I../../../include -I../../../include/common -I/usr/local/include -L/usr/local/lib -lzmq
vpoller.c:34:10: fatal error: sysinc.h: Datei oder Verzeichnis nicht gefunden
   34 | #include "sysinc.h"
      |          ^~~~~~~~~~

My "quick and dirty" fix:

  1. Modify the Makefile in extra/zabbix/vpoller-modul and add -I../../../include/common to line 2
  2. Grab a old sysinc.h from zabbix 6.0.x Server. for example 6.0.7 in folder include/sysinc.h
  3. make is working, also items are returned.

Step 1 seems to be okay but i am not happy with the 2nd step.. someone got a better solution here?

cliobrando commented 1 year ago

There's no need to copy the file from the old version, just modify vpoller.c and replace

include sysinc.h

with

include zbxsysinc.h

they refactored and renamed the file in the 6.2 version.