Ad Widget

Collapse

freebsd port will not build 1.8.3

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • warchild
    Junior Member
    • Jul 2010
    • 10

    #1

    freebsd port will not build 1.8.3

    I have zabbix on a variety of FreeBSD flavours, but it seems to fail to build the agent on machine which are i386.. everywhere lse... no problems. Any ideas or is it incompatible?

    FreeBSD orientexpress 7.3-RELEASE-p1 FreeBSD 7.3-RELEASE-p1 #0: Wed May 26 04:29:05 UTC 2010 [email protected]:/usr/obj/usr/src/sys/GENERIC i386

    ===> Building for zabbix-agent-1.8.3,2
    Making all in src
    Making all in libs
    Making all in zbxcrypto
    Making all in zbxcommon
    Making all in zbxlog
    Making all in zbxalgo
    Making all in zbxnix
    Making all in zbxconf
    Making all in zbxsysinfo
    Making all in common
    Making all in simple
    Making all in freebsd
    Making all in zbxplugin
    Making all in zbxsys
    Making all in zbxcomms
    Making all in zbxjson
    Making all in zabbix_agent
    cc -DZABBIX_DAEMON -O2 -fno-strict-aliasing -pipe -I/usr/local/include -L/usr/local/lib -o zabbix_agentd zabbix_agentd-active.o zaix_agentd-cpustat.o zabbix_agentd-diskdevices.o zabbix_agentd-interfaces.o zabbix_agentd-perfstat.o zabbix_agentd-vmstats.o zabbibix_agentd-zabbix_agentd.o zabbix_agentd-zbxconf.o zabbix_agentd-listener.o zabbix_agentd-eventlog.o ../../src/libs/zbxsysinfo/libzsrc/libs/zbxsysinfo/freebsd/libspecsysinfo.a ../../src/libs/zbxsysinfo/common/l src/libs/zbxlog/libzbxlog.a ../../src/libs/zbxalgo/libzbxalgo.a ../../src/libs s/libzbxcomms.a ../../src/libs/zbxconf/libzbxconf.a ../../src/libs/zbxcommon/l /libzbxjson.a -lkvm -lm -ldevstat -liconv
    ../../src/libs/zbxnix/libzbxnix.a(fatal.o)(.text+0xe2): In function `print_fatal
    : undefined reference to `backtrace'
    ../../src/libs/zbxnix/libzbxnix.a(fatal.o)(.text+0xf6): In function `print_fatal
    : undefined reference to `backtrace_symbols'
    *** Error code 1

    Stop in /usr/ports/net-mgmt/zabbix-agent/work/zabbix-1.8.3/src/zabbix_agent.
    *** Error code 1

    Stop in /usr/ports/net-mgmt/zabbix-agent/work/zabbix-1.8.3/src.
    *** Error code 1

    Stop in /usr/ports/net-mgmt/zabbix-agent/work/zabbix-1.8.3.
    *** Error code 1

    Stop in /usr/ports/net-mgmt/zabbix-agent.
    *** Error code 1

    Stop in /usr/ports/net-mgmt/zabbix-agent.
  • dilmas
    Junior Member
    • Aug 2010
    • 4

    #2
    Hello,
    #uname -sr
    #FreeBSD 7.3-STABLE

    I commented out the following lines in file "*zabbix*/src/libs/zbxnix/fatal.c":
    #ifdef HAVE_EXECINFO_H
    # include <execinfo.h>
    #endif

    And:

    #ifdef HAVE_EXECINFO_H

    bcktrc_sz = backtrace(bcktrc, ZBX_BACKTRACE_SIZE);
    bcktrc_syms = backtrace_symbols(bcktrc, bcktrc_sz);

    if (NULL == bcktrc_syms)
    {
    zabbix_log(LOG_LEVEL_CRIT, "error in backtrace_symbols(): [%s]", strerror(errno));

    for (i = 0; i < bcktrc_sz; i++)
    zabbix_log(LOG_LEVEL_CRIT, "%d: %p", bcktrc_sz - i - 1, bcktrc[i]);
    }
    else
    {
    for (i = 0; i < bcktrc_sz; i++)
    zabbix_log(LOG_LEVEL_CRIT, "%d: %s", bcktrc_sz - i - 1, bcktrc_syms[i]);

    zbx_free(bcktrc_syms);
    }
    #else
    zabbix_log(LOG_LEVEL_CRIT, "backtrace not available for this platform");

    #endif /* HAVE_EXECINFO_H */

    Added the following line:
    zabbix_log(LOG_LEVEL_CRIT, "backtrace not available for this platform");

    Try... (Sorry, my english isn't good)

    Comment

    • warchild
      Junior Member
      • Jul 2010
      • 10

      #3
      cc -DHAVE_CONFIG_H -I. -I../../../include -I/usr/local/include -O2 -fno-strict-aliasing -pipe -I/usr/local/include -MT fatal.o -MD -MP -MF .deps/fatal.Tpo -c -o fatal.o fatal.c
      fatal.c:283:3: error: invalid preprocessing directive #bcktrc_sz
      fatal.c:284:3: error: invalid preprocessing directive #bcktrc_syms
      fatal.c:286:7: error: operator '*' has no right operand
      fatal.c:294:3: error: invalid preprocessing directive #{
      fatal.c:295:4: error: invalid preprocessing directive #for
      fatal.c:296:5: error: invalid preprocessing directive #zabbix_log
      fatal.c:298:4: error: invalid preprocessing directive #zbx_free
      fatal.c:299:3: error: invalid preprocessing directive #}
      fatal.c:300:2: error: #else after #else
      fatal.c:286:1: error: the conditional began here
      fatal.c:281:1: error: unterminated #ifdef


      maybe you can post your fatal.c here?

      Comment

      • warchild
        Junior Member
        • Jul 2010
        • 10

        #4
        I worked out my mistakes..... I got it working.

        by the way, your english is fine.

        Jurgen

        Comment

        • dilmas
          Junior Member
          • Aug 2010
          • 4

          #5
          Thank you. I later deleted these lines.

          Comment

          • asaveljevs
            Zabbix developer
            • Feb 2010
            • 36

            #6
            I have created an issue for this problem on the bug tracker at https://support.zabbix.com/browse/ZBX-2946. Please do not hesitate to report these issues yourself.

            Comment

            • asaveljevs
              Zabbix developer
              • Feb 2010
              • 36

              #7
              We could not reproduce the issue. Could you please join our discussion at https://support.zabbix.com/browse/ZBX-2946?

              Comment

              Working...