Ad Widget

Collapse

HPUX 11.0 snprintf compile problem alpha10

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • welshpjw
    Member
    • Mar 2005
    • 50

    #1

    HPUX 11.0 snprintf compile problem alpha10

    Did not have this issue under 1.1alpha7, but 1.1alpha10 (atleast) has got a couple HP-UX 11.0 issues for me. One is noted as problem in Solaris, also under:


    (and is the reason for the "-lresolv" noted below)
    The one that is kick'n my butt now, however, is something to do with snprintf:

    Making all in src/zabbix_agent
    make[1]: Entering directory `/usr/src/zabbix-1.1alpha10/src/zabbix_agent'
    gcc -o ../../bin/zabbix_agent -g -O2 -I../../include zabbix_agent.c sysinfo.c ../../include/log.c ../../include/cfg.c ../../include/security.c ../../include/snprintf.c ../../include/md5.c -Wall -lnsl -lresolv
    ../../include/security.c: In function `check_security':
    ../../include/security.c:54: warning: passing arg 3 of `getpeername' from incompatible pointer type
    ../../include/snprintf.c:802: conflicting types for `snprintf'
    /usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.2/include/stdio.h:493: previous declaration of `snprintf'
    make[1]: *** [all] Error 1
    make[1]: Leaving directory `/usr/src/zabbix-1.1alpha10/src/zabbix_agent'


    Again, did not have this issue under alpha7. Building with gcc and just realy want the zabbix_agent... Please help.

    Note: I am not a developer. I am just an admin. I can barely spell "make" (just keep that in mind when responding).

    Thank you.
  • welshpjw
    Member
    • Mar 2005
    • 50

    #2
    Slight update...

    I reread the comment from the Solaris link I found above and tried the HPUX ansi C compiler instead of gcc and also made the noted change in include/snprintf.c. I still used the gnu make since the hp make didn't like the Makefile and got the:
    /usr/ccs/bin/ld: Unsatisfied symbols:
    hstrerror (first referenced in /var/tmp//ccCSXj3d.o) (code)

    On a guess, I just cut-n-pasted the "cc -o ..." line and ran it from the src/zabbix_agent without problem. That is I have zabbix_agent in the bin dir????

    Was this any help or did it confuse anyone like it confuses me???

    Comment

    • welshpjw
      Member
      • Mar 2005
      • 50

      #3
      Still a problem

      Of course I submitted the second comment too soon... I still have no love with alpha10. I did not pay enough attention to the Makefile to notice the agentd cc line. It's realy the agentd I wanted and that does NOT compile. I still seem to get the hstrerror:

      zabbix_agentd.c: In function `child_passive_main':
      zabbix_agentd.c:386: warning: passing arg 3 of `accept' from incompatible pointer type
      active.c: In function `parse_list_of_checks':
      active.c:160: warning: implicit declaration of function `strtok_r'
      active.c: In function `get_active_checks':
      active.c:200: warning: implicit declaration of function `hstrerror'
      active.c:201: warning: format argument is not a pointer (arg 4)
      active.c: In function `send_value':
      active.c:356: warning: passing arg 6 of `recvfrom' from incompatible pointer type
      ../../include/security.c: In function `check_security':
      ../../include/security.c:54: warning: passing arg 3 of `getpeername' from incompatible pointer type
      ../../include/snprintf.c:165: warning: `dopr' defined but not used
      /usr/ccs/bin/ld: Unsatisfied symbols:
      hstrerror (first referenced in /var/tmp//cctHWPub.o) (code)

      Comment

      • chocho63
        Member
        • Jun 2005
        • 53

        #4
        hstrerror in HP-UX

        I removed hstrerror function from src/zabbix_agent/active.c (the err_no would be print instead) and zabbix_agentd compiled.
        I found that hstrerror is a function not supported on HP-UX.

        Comment

        Working...