Ad Widget

Collapse

Zabbix 1.6: Compiling errors on OS X

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mbobkiewicz
    Member
    • Aug 2005
    • 36

    #1

    Zabbix 1.6: Compiling errors on OS X

    Hi,
    I´m trying to compile Zabbix 1.6 on a Mac OS X, 10.5.5 (Leopard) system. Both client and server are stopping.First the server:
    ./configure --enable-server --with-mysql=path-to-mysql_config
    Undefined symbols:
    "_res_9_query", referenced from:
    _CHECK_DNS in libcommonsysinfo.a(net.o)
    "_res_9_init", referenced from:
    _CHECK_DNS in libcommonsysinfo.a(net.o)
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    make[3]: *** [zabbix_server] Error 1
    make[2]: *** [all-recursive] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all-recursive] Error 1

    Next the client:
    ./configure --enable-client
    cpustat.c: In function ‘get_cpustat’:
    cpustat.c:202: error: ‘CPUSTATES’ undeclared (first use in this function)
    cpustat.c:202: error: (Each undeclared identifier is reported only once
    cpustat.c:202: error: for each function it appears in.)
    cpustat.c:276: error: ‘CP_USER’ undeclared (first use in this function)
    cpustat.c:277: error: ‘CP_NICE’ undeclared (first use in this function)
    cpustat.c:278: error: ‘CP_SYS’ undeclared (first use in this function)
    cpustat.c:279: error: ‘CP_INTR’ undeclared (first use in this function)
    cpustat.c:280: error: ‘CP_IDLE’ undeclared (first use in this function)
    make[2]: *** [cpustat.o] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all-recursive] Error 1

    Any suggestions how to make them? Did I miss some libs?

    Greetings,

    Mike
  • rwa
    Junior Member
    • Oct 2008
    • 9

    #2
    The server error is explained and fixed here:



    I ran into the client error as well. The fix listed here:



    works. The issue seems to be that these constants aren't defined on OS X. One of them, I think CPUSTATES is defined in another file on OS X that isn't included by default (you can grep through /usr and find it). Including that gets past the one error, but the other constants don't show up anywhere on OS X by default (even w/xcode tools).

    The fix described above I think tells Zabbix that these won't be there which seems correct as they aren't. The client will show Items which track CPU time in these states as not supported, but I think that's correct on OS X.

    I downloaded a previous client which doesn't seem to have had this problem and diffed the file w/the error. These constants were hard coded integers in that version. I didn't try replacing them in the 1.6 code as I have no idea if that would work or provide accurate data.

    But these fixes will get you going.

    Comment

    • mbobkiewicz
      Member
      • Aug 2005
      • 36

      #3
      Thanks for the reply, works as described.

      Comment

      Working...