Ad Widget

Collapse

PATCH 1.3.4 / 1.3.5: zabbix_agent (Solaris link problem)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NOB
    Senior Member
    Zabbix Certified Specialist
    • Mar 2007
    • 469

    #1

    PATCH 1.3.4 / 1.3.5: zabbix_agent (Solaris link problem)

    Hi,

    the following patch fixes a problem in the Solaris 8 link
    of the zabbix_agent.

    Error message is:

    Code:
    gcc  -g -O2   -o zabbix_agent  zabbix_agent.o stats.o  cpustat.o diskdevices.o interfaces.o  zbxconf.o ../../src/libs/zbxsysinfo/libzbxagentsysinfo.a  ../../src/libs/zbxsysinfo/solaris/libspecsysinfo.a  ../../src/libs/zbxsysinfo/common/libcommonsysinfo.a  ../../src/libs/zbxsysinfo/simple/libsimplesysinfo.a  ../../src/libs/zbxlog/libzbxlog.a  ../../src/libs/zbxsys/libzbxsys.a  ../../src/libs/zbxnix/libzbxnix.a  ../../src/libs/zbxcomms/libzbxcomms.a  ../../src/libs/zbxconf/libzbxconf.a  ../../src/libs/zbxcommon/libzbxcommon.a  ../../src/libs/zbxcrypto/libzbxcrypto.a -lkvm -lresolv -lnsl -lkstat -lsocket
    Undefined                       first referenced
     symbol                             in file
    ERROR_DO_NOT_USE_SNPRINTF_FUNCTION_TRY_TO_USE_ZBX_SNPRINTF ../../src/libs/zbxsysinfo/solaris/libspecsysinfo.a(libspecsysinfo_a-cpu.o)
    ld: fatal: Symbol referencing errors. No output written to zabbix_agent
    collect2: ld returned 1 exit status
    *** Error code 1
    This patch fixes it, I suggest changing this in the next release.
    Otherwise I have to do it for every version
    Code:
    *** src/libs/zbxsysinfo/solaris/cpu.c   Wed Apr 18 16:38:26 2007
    --- src/libs/zbxsysinfo/solaris/cpu.orig.c      Wed Apr 18 16:43:31 2007
    ***************
    *** 50,56 ****
      
            for(i = 0; i < CPU_STATES; new_cpu[i++] = 0LL);
      
    !         zbx_snprintf(ks_name, sizeof(ks_name), "cpu_stat%s", cpuname);
      
            kc = kstat_open();
            if (kc)
    --- 50,56 ----
      
            for(i = 0; i < CPU_STATES; new_cpu[i++] = 0LL);
      
    !         snprintf(ks_name, sizeof(ks_name), "cpu_stat%s", cpuname);
      
            kc = kstat_open();
            if (kc)
    Norbert.
  • Alexei
    Founder, CEO
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2004
    • 5654

    #2
    Heh, at least we gave you a hint how to fix this
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • NOB
      Senior Member
      Zabbix Certified Specialist
      • Mar 2007
      • 469

      #3
      Originally posted by Alexei
      Heh, at least we gave you a hint how to fix this
      Yes, you are right.
      otherwise it would be slightly harder to find

      Norbert.

      Comment

      • Alexei
        Founder, CEO
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Sep 2004
        • 5654

        #4
        This problem is fixed in pre 1.3.6.
        Alexei Vladishev
        Creator of Zabbix, Product manager
        New York | Tokyo | Riga
        My Twitter

        Comment

        Working...