Ad Widget

Collapse

help for compiling agent for 1.6.1 on freebsd 4.x

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ghislain
    Senior Member
    • Jun 2005
    • 160

    #1

    help for compiling agent for 1.6.1 on freebsd 4.x

    hi,

    i try to compile the new agent (1.6.1) on freebsd 4.x. I got this error, perhaps you can help me here:

    I got this error:

    make clean ; ./configure --enable-static --disable-server --enable-agent --disable-ipv6 --disable-proxy --without-jabber --without-net-snmp --without-ucd-snmp


    Configuration:

    Detected OS: freebsd4.7
    Install path: /usr/local
    Compilation arch: freebsd

    Compiler: gcc
    Compiler flags: -g -O2

    Enable server: no

    Enable proxy: no

    Enable agent: yes
    Linker flags: -static
    Libraries: -lkvm -lm

    LDAP support: no
    IPv6 support: no

    ************************************************** *********
    * Now run 'make install' *
    * *
    * Thank you for using ZABBIX! *
    * <http://www.zabbix.com> *
    ************************************************** *********



    (aqadmin)> make
    Making all in src
    Making all in libs
    Making all in zbxcrypto
    Making all in zbxcommon
    Making all in zbxlog
    Making all in zbxnix
    Making all in zbxconf
    Making all in zbxsysinfo
    Making all in common
    Making all in simple
    Making all in freebsd
    source='proc.c' object='libspecsysinfo_a-proc.o' libtool=no DEPDIR=.deps depmode=gcc /usr/local/bin/bash ../../../../depcomp gcc -DHAVE_CONFIG_H -I. -I../../../../include -I../../../../src/zabbix_agent/ -g -O2 -c -o libspecsysinfo_a-proc.o `test -f 'proc.c' || echo './'`proc.c
    In file included from ../../../../include/sysinc.h:77,
    from ../../../../include/common.h:23,
    from proc.c:20:
    /usr/include/grp.h:58: warning: parameter names (without types) in function declaration
    proc.c: In function `get_commandline':
    proc.c:49: structure has no member named `ki_pid'
    proc.c:67: structure has no member named `ki_comm'
    proc.c: In function `PROC_MEMORY':
    proc.c:106: `COMMLEN' undeclared (first use in this function)
    proc.c:106: (Each undeclared identifier is reported only once
    proc.c:106: for each function it appears in.)
    proc.c:148: `KERN_PROC_PROC' undeclared (first use in this function)
    proc.c:168: structure has no member named `ki_comm'
    proc.c:179: structure has no member named `ki_tsize'
    proc.c:180: structure has no member named `ki_dsize'
    proc.c:181: structure has no member named `ki_ssize'
    proc.c: In function `PROC_NUM':
    proc.c:239: `COMMLEN' undeclared (first use in this function)
    proc.c:279: `KERN_PROC_PROC' undeclared (first use in this function)
    proc.c:301: structure has no member named `ki_comm'
    proc.c:307: structure has no member named `ki_stat'
    proc.c:311: structure has no member named `ki_stat'
    proc.c:315: structure has no member named `ki_stat'
    *** Error code 1

    Stop in /usr/local/.aqadmin/home/aqadmin/zabbix-1.6.1/src/libs/zbxsysinfo/freebsd.
    *** Error code 1

    Stop in /usr/local/.aqadmin/home/aqadmin/zabbix-1.6.1/src/libs/zbxsysinfo.
    *** Error code 1

    Stop in /usr/local/.aqadmin/home/aqadmin/zabbix-1.6.1/src/libs.
    *** Error code 1

    Stop in /usr/local/.aqadmin/home/aqadmin/zabbix-1.6.1/src.
    *** Error code 1

    Stop in /usr/local/.aqadmin/home/aqadmin/zabbix-1.6.1.



    This is on jail based virtual hosting, agent from 1.4.x work fine here . Any idea of the problem ?

    regards,
    Ghislain.
    Regards,
    Ghislain.
  • lauerdk
    Junior Member
    • Oct 2008
    • 6

    #2
    Same problem here!

    Same here :/
    And the Freebsd 6.2 version from the website makes a core dump.

    Comment

    • zbxr
      Junior Member
      • Feb 2009
      • 1

      #3
      This patch allows the agent to compile under FreeBSD 4.x (tested on 4.7).

      Hints for manual editing of src/libs/zbxsysinfo/freebsd/proc.c:
      Code:
      s/ki_pid/kp_proc.p_pid/g
      s/ki_comm/kp_proc.p_comm/g
      s/ki_tsize/kp_eproc.e_vm.vm_tsize/g
      s/ki_dsize/kp_eproc.e_vm.vm_dsize/g
      s/ki_ssize/kp_eproc.e_vm.vm_ssize/g
      s/ki_stat/kp_proc.p_stat/g
      s/COMMLEN/MAXCOMLEN/g
      s/KERN_PROC_PROC/KERN_PROC_ALL/g
      Attached Files

      Comment

      • lauerdk
        Junior Member
        • Oct 2008
        • 6

        #4
        It works, thanks

        I use Freebsd 4.9-RELEASE and when patching the zabbix 1.6.2 agent, the configure works and the agent could be installed.

        Comment

        • wanderer
          Junior Member
          • Feb 2009
          • 1

          #5
          Works like a charm for me on 4.11 with 1.6.2. Thanks a lot!

          Comment

          Working...