Ad Widget

Collapse

pre-1.4.2 rev 4499 on solaris 9 compile fails

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bgm
    Junior Member
    • Jul 2007
    • 3

    #1

    pre-1.4.2 rev 4499 on solaris 9 compile fails

    Just two notes on this release.

    1. configure script does not add -lresolv in LIBS when building the Makefile(s)

    2. compilation fails with the following:

    Making all in nodewatcher
    make[3]: Entering directory `/opt/admin/sources/zabbix-1.4.2/src/zabbix_server/nodewatcher'
    if gcc -DHAVE_CONFIG_H -I. -I. -I../../../include -g -O2 -I/usr/local/mysql/include -DBIG_TABLES -I. -I/opt/admin/net-snmp/include -MT nodewatcher.o -MD -MP -MF ".deps/nodewatcher.Tpo" -c -o nodewatcher.o nodewatcher.c; \
    then mv -f ".deps/nodewatcher.Tpo" ".deps/nodewatcher.Po"; else rm -f ".deps/nodewatcher.Tpo"; exit 1; fi
    In file included from /opt/admin/net-snmp/include/net-snmp/mib_api.h:23,
    from /opt/admin/net-snmp/include/net-snmp/net-snmp-includes.h:67,
    from ../../../include/sysinc.h:348,
    from ../../../include/common.h:23,
    from nodewatcher.c:20:
    /opt/admin/net-snmp/include/net-snmp/library/parse.h:32:1: warning: "MAXLABEL" redefined
    In file included from /usr/include/arpa/nameser.h:585,
    from ../../../include/sysinc.h:101,
    from ../../../include/common.h:23,
    from nodewatcher.c:20:
    /usr/include/arpa/nameser_compat.h:148:1: warning: this is the location of the previous definition
    nodewatcher.c:91:1: directives may not be used inside a macro argument
    nodewatcher.c:90:83: unterminated argument list invoking macro "zbx_snprintf_alloc"
    nodewatcher.c: In function `calculate_checksums':
    nodewatcher.c:92: `zbx_snprintf_alloc' undeclared (first use in this function)
    nodewatcher.c:92: (Each undeclared identifier is reported only once
    nodewatcher.c:92: for each function it appears in.)
    nodewatcher.c:92: parse error before string constant
    nodewatcher.c:125:1: directives may not be used inside a macro argument
    nodewatcher.c:124:83: unterminated argument list invoking macro "zbx_snprintf_alloc"
    nodewatcher.c:126: parse error before string constant
    make[3]: *** [nodewatcher.o] Error 1
    make[3]: Leaving directory `/opt/admin/sources/zabbix-1.4.2/src/zabbix_server/nodewatcher'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/opt/admin/sources/zabbix-1.4.2/src/zabbix_server'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/opt/admin/sources/zabbix-1.4.2/src'
    make: *** [all-recursive] Error 1


    FYI
  • navtek007
    Senior Member
    • May 2005
    • 100

    #2
    i have the exact same problem in 1.4.2. when i try and do a make i get the following errors:

    Zabbix/zabbix-1.4.2/src/zabbix_server/nodewatcher'
    if gcc -DHAVE_CONFIG_H -I. -I. -I../../../include -lssl -I/usr/include/mysql -g -pipe -march=i386 -mcpu=i686 -I/usr/include/rpm -I/usr/include/rpm -I. -I/usr/include/net-snmp -MT nodewatcher.o -MD -MP -MF ".deps/nodewatcher.Tpo" -c -o nodewatcher.o nodewatcher.c; \
    then mv -f ".deps/nodewatcher.Tpo" ".deps/nodewatcher.Po"; else rm -f ".deps/nodewatcher.Tpo"; exit 1; fi
    nodewatcher.c:91:1: directives may not be used inside a macro argument
    nodewatcher.c:90:83: unterminated argument list invoking macro "zbx_snprintf_alloc"
    nodewatcher.c: In function `calculate_checksums':
    nodewatcher.c:92: `zbx_snprintf_alloc' undeclared (first use in this function)
    nodewatcher.c:92: (Each undeclared identifier is reported only once
    nodewatcher.c:92: for each function it appears in.)
    nodewatcher.c:92: syntax error before string constant
    nodewatcher.c:125:1: directives may not be used inside a macro argument
    nodewatcher.c:124:83: unterminated argument list invoking macro "zbx_snprintf_alloc"
    nodewatcher.c:126: syntax error before string constant

    any ideas??

    Comment

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

      #3
      Version of gcc? ZABBIX 1.4.2 was successfully tested on Solaris 9 (Sparc), so it seems to be related to old or a broken version of gcc.
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      • bgm
        Junior Member
        • Jul 2007
        • 3

        #4
        Hi,

        strange since for me it compiles successfully from rev4511 and newer,
        (it was failing on 4505 also) without changing anything on the machine.
        Same gcc 3.4.2

        I thought it was silently fixed


        Regards
        bgm
        Last edited by bgm; 23-08-2007, 11:42.

        Comment

        • valerio.crini

          #5
          problem solved

          I had some problem but in a i386 with Red Hat Enterprise Linux AS release 3 (Taroon Update 6).
          Problem is in the "gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-53)". It's not able to manage 'directives inside a macro argument'.
          I was successfull in compiling after removing manually ifdefs.
          I attach patched file named 'nodewatcher.c'

          Valerio Crini
          Attached Files

          Comment

          • ekenberg
            Junior Member
            • Mar 2006
            • 21

            #6
            Thank you so much for the patched file Valerio, you saved my day!

            (Linux x86, gcc-3.2.3)

            /Johan Ekenberg

            Comment

            Working...