Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-273

Agent compilation error on AlphaServer Tru64 5.1B (With fix)

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Major Major
    • None
    • 1.4
    • Agent (G)
    • None
    • HP AlphaServer DS15
      Tru64 5.1B

      When making the sources for agent 1.4.4 the following error stops compilation:

      Making all in osf
      source='cpu.c' object='libspecsysinfo_a-cpu.o' libtool=no DEPDIR=.deps depmode=tru64 /usr/bin/posix/sh ../../../../depcomp cc -DHAVE_CONFIG_H -I. -I. -I../../../../include -I../../../../src/zabbix_agent/ -g -c -o libspecsysinfo_a-cpu.o `test -f 'cpu.c' || echo './'`cpu.c
      cc: Error: cpu.c, line 90: The compiler was expecting a ")", but one was not found. This condition could have occured because "cpuname" is used in what might be a type cast, but there is no declared type of that name visible. (undefinedtype)
      zbx_snprintf(cpuname, sizeof(cpuname)"all");
      -----------------------------------------------------^
      cc: Error: cpu.c, line 104: In this statement, "tupe" is not declared. (undeclared)
      zbx_snprintf(type, sizeof(tupe), "user");
      ------------------------------------------^

      The configure script:
      Configuration:

      Detected OS: osf5.1b
      Install path: /usr/local/zabbix
      Compilation arch: osf

      Compiler: cc
      Compiler flags: -g

      Enable server: no

      Enable agent: yes
      Linker flags:
      Libraries: -lm

      LDAP support: no

      Seems that the problem is a typo in a variable in: src/libs/zbxsysinfo/osf/cpu.c (line 104) and other in line 90
      Line 90
      ----------
      Original: zbx_snprintf(cpuname, sizeof(cpuname)"all");
      WithFix: zbx_snprintf(cpuname, sizeof(cpuname),"all");

      Line 104
      -----------
      Original: zbx_snprintf(type, sizeof(tupe), "user");
      WithFix: zbx_snprintf(type, sizeof(type), "user");

      This two issues fixes the compilation.

      Thanks for all (zabbix rocks!)

            alexei Alexei Vladishev
            jgordor Jose Luis Gordo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: