Ad Widget

Collapse

Errors while compiling ZABBIX server 1.4.4

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anoy
    Junior Member
    • Mar 2008
    • 7

    #1

    Errors while compiling ZABBIX server 1.4.4

    Hi folks,

    I'm trying to compile ZABBIX server, but getting erros while the make install process. I've tried both, the cc and gcc compiler, with no success.
    I guess the gcc is more comon so I will post the errors by running the gcc.

    The plattform is
    Code:
    hp-ux 11.23ia
    compiler versions
    Code:
    gcc (GCC) 3.4.3
    cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]
    Add-on libs:
    Code:
      Curl                          A.10.00-7.17.1.001 A Command Line Tool For Transfering Data
      Net-SNMP                      A.10.00-5.4.1.007 Simple Network Monitoring protocol
      xMySQL                        A.10.00-5.0.45.001 MySQL Database
    configure process seems to do fine so far (reduced output):

    Code:
    ./configure --enable-server --with-mysql --with-net-snmp --with-ldap --prefix=/opt/zabbix_v1.4.4
    checking for a BSD-compatible install... ./install-sh -c
    checking whether build environment is sane... yes
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    --> SNIP
    <-- SNIP 
    
    Configuration:
    
      Detected OS:        hpux11.23
      Install path:       /opt/zabbix_v1.4.4
      Compilation arch:   hpux
    
      Compiler:           gcc
      Compiler flags:     -g -O2   -I/opt/iexpress/mysql/include/mysql   -I/opt/iexpress/curl/include  -I/opt/openssl/include -I. -I/opt/iexpress/net-snmp/include  -I/usr/include
    
      Enable server:      yes
      With database:      MySQL
      WEB Monitoring via: cURL
      Native Jabber:      no
      SNMP:               net-snmp
      IPv6:               no
      Linker flags:        -L/usr/lib -lldap      -L/opt/iexpress/mysql/lib/mysql -L/usr/local/lib -L/opt/openssl/lib/hpux32    -L/opt/iexpress/curl/lib  -L/opt/openssl/lib -L/opt/iexpress/net-snmp/lib  -L/opt/openssl/lib -L/opt/iexpress/net-snmp/lib
      Libraries:          -lm     -lmysqlclient    -lcurl  -lnetsnmp
    
      Enable agent:       no
    
      LDAP support:       yes
    
    ***********************************************************
    *            Now run 'make install'                       *
    *                                                         *
    *            Thank you for using ZABBIX!                  *
    *              <http://www.zabbix.com>                    *
    ***********************************************************
    make install shows erros:
    Code:
    root@zabbix01:/compile/source/zabbix-1.4.4 # make install
    No suffix list.
    Making install in create
    No suffix list.
    Making install in schema
    No suffix list.
    No suffix list.
    No suffix list.
    No suffix list.
    Making install in misc
    No suffix list.
    No suffix list.
    Making install in src
    No suffix list.
    Making install in libs
    No suffix list.
    Making install in zbxcrypto
            if gcc -DHAVE_CONFIG_H -I. -I. -I../../../include      -g -O2   -I/opt/iexpress/mysql/include/mysql   -I/opt/iexpress/curl/include  -I/opt/openssl/include -I. -I/opt/iexpress/net-snmp/include  -I/usr/include -MT md5.o -MD -MP -MF ".deps/md5.Tpo" -c -o md5.o md5.c; \
            then mv -f ".deps/md5.Tpo" ".deps/md5.Po"; else rm -f ".deps/md5.Tpo"; exit 1; fi
    In file included from ../../../include/sysinc.h:303,
                     from ../../../include/common.h:23,
                     from md5.c:54:
    /usr/include/sys/ipc.h:51: error: parse error before "cid_t"
    /usr/include/sys/ipc.h:56: error: parse error before '}' token
    In file included from ../../../include/sysinc.h:307,
                     from ../../../include/common.h:23,
                     from md5.c:54:
    /usr/include/sys/sem.h:91: error: field `sem_perm' has incomplete type
    In file included from ../../../include/sysinc.h:311,
                     from ../../../include/common.h:23,
                     from md5.c:54:
    /usr/include/sys/shm.h:82: error: field `shm_perm' has incomplete type
    In file included from /opt/iexpress/net-snmp/include/net-snmp/net-snmp-includes.h:74,
                     from ../../../include/sysinc.h:354,
                     from ../../../include/common.h:23,
                     from md5.c:54:
    /opt/iexpress/net-snmp/include/net-snmp/utilities.h:31:20: getopt.h: No such file or directory
    In file included from /opt/iexpress/net-snmp/include/net-snmp/mib_api.h:24,
                     from /opt/iexpress/net-snmp/include/net-snmp/net-snmp-includes.h:77,
                     from ../../../include/sysinc.h:354,
                     from ../../../include/common.h:23,
                     from md5.c:54:
    /opt/iexpress/net-snmp/include/net-snmp/library/parse.h:32:1: warning: "MAXLABEL" redefined
    In file included from /usr/include/arpa/nameser.h:434,
                     from ../../../include/sysinc.h:105,
                     from ../../../include/common.h:23,
                     from md5.c:54:
    /usr/include/arpa/nameser_compat.h:134:1: warning: this is the location of the previous definition
    *** Error exit code 1
    
    Stop.
    *** Error exit code 1
    
    Stop.
    *** Error exit code 1
    
    Stop.
    *** Error exit code 1
    
    Stop.
    root@zabbix01:/compile/source/zabbix-1.4.4 #

    Unfortunately I'm not so familiar with the c compiling errors, so could somone please advise?

    Thank you in advance!

    anoy
    Last edited by anoy; 11-03-2008, 19:05.
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    you did 'make install' without actual 'make' step ?
    (btw, 'make install' is not such a good idea - think about upgrading and removal of software packages)
    Zabbix 3.0 Network Monitoring book

    Comment

    • anoy
      Junior Member
      • Mar 2008
      • 7

      #3
      just did what is documented?!

      Hi,

      I just did what is documented in the official zabbix manual. As you can see on page 43 in the documentation:

      --> SNIP

      Code:
      Step 4 Configure and compile the source code for your system
      
      Step 5 Make and install everything
      shell> make install
      <-- SNAP

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        well, "configure and compile" part involves actually _compiling_
        Zabbix 3.0 Network Monitoring book

        Comment

        • anoy
          Junior Member
          • Mar 2008
          • 7

          #5
          Error messages are the same

          error messages are the same even running
          Code:
          make
          standalone first. So I think the documentation is correct.

          Comment

          • anoy
            Junior Member
            • Mar 2008
            • 7

            #6
            even so just configuring with
            Code:
            ./configure --enable-server --with-mysql --with-libcurl --prefix=/opt/zabbix_v1.4.4
            (without snmp and ldap) there are still other erros:
            Code:
            Making install in zbxdb
            Making install in zbxdbhigh
            Making install in zbxemail
            Making install in zbxsms
                    source='sms.c' object='sms.o' libtool=no \
                    DEPDIR=.deps depmode=none /usr/bin/posix/sh ../../../depcomp \
                    /usr/bin/cc -DHAVE_CONFIG_H -I. -I. -I../../../include      -g   -I/opt/iexpress/mysql/include/mysql   -I/opt/iexpress/curl/include    -c sms.c
            Error 172: "sms.c", line 231 # Undeclared variable 'CRTSCTS'.
                        options.c_cflag     = old_options.c_cflag | CRTSCTS | CS8 | CLOCAL | CREAD;
                                                                    ^^^^^^^
            *** Error exit code 2
            
            Stop.
            *** Error exit code 1
            
            Stop.
            *** Error exit code 1
            
            Stop.
            *** Error exit code 1

            Comment

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

              #7
              You may safely remove the constant to make ZABBIX compile on your platform.
              Alexei Vladishev
              Creator of Zabbix, Product manager
              New York | Tokyo | Riga
              My Twitter

              Comment

              • anoy
                Junior Member
                • Mar 2008
                • 7

                #8
                removed the constant from sms.c, getting thruw zbxsms and in the next error:

                Code:
                Warning 281: "sms.c", line 188 # Static initializer is not a constant expression, performing runtime initialization.
                    /*  5  */       {number         , NULL          , 0     },      /* Write phone number */
                                     ^^^^^^
                Warning 281: "sms.c", line 190 # Static initializer is not a constant expression, performing runtime initialization.
                    /*  7  */       {message        , NULL          , 0     },      /* Write message */
                                     ^^^^^^^
                        rm -f libzbxsms.a
                        ar cru libzbxsms.a sms.o
                        ranlib libzbxsms.a
                No suffix list.
                No suffix list.
                Making install in zabbix_server
                Making install in alerter
                        rm -f libzbxalerter.a
                        ar cru libzbxalerter.a alerter.o
                        ranlib libzbxalerter.a
                Making install in discoverer
                        rm -f libzbxdiscoverer.a
                        ar cru libzbxdiscoverer.a discoverer.o
                        ranlib libzbxdiscoverer.a
                Making install in housekeeper
                        source='housekeeper.c' object='housekeeper.o' libtool=no \
                        DEPDIR=.deps depmode=none /usr/bin/posix/sh ../../../depcomp \
                        /usr/bin/cc -DHAVE_CONFIG_H -I. -I. -I../../../include      -g   -I/opt/iexpress/mysql/include/mysql   -I/opt/iexpress/curl/include    -c housekeeper.c
                Error 181: "housekeeper.c", line 343 # Expected 0 argument(s) for "int housekeeping_process_log()"; had 1 instead.
                                    housekeeping_process_log(now);
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                Warning 361: "housekeeper.c", line 299 # Value-returning function might end without executing a return statement.
                    int main_housekeeper_loop()
                        ^^^^^^^^^^^^^^^^^^^^^
                *** Error exit code 2
                
                Stop.
                *** Error exit code 1
                
                Stop.
                *** Error exit code 1
                
                Stop.
                *** Error exit code 1
                
                Stop.

                Comment

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

                  #9
                  Your compiler is too smart! You may either switch to gcc or replace:

                  housekeeping_process_log(now);

                  by

                  housekeeping_process_log();
                  Alexei Vladishev
                  Creator of Zabbix, Product manager
                  New York | Tokyo | Riga
                  My Twitter

                  Comment

                  • anoy
                    Junior Member
                    • Mar 2008
                    • 7

                    #10
                    seems to work, but ...

                    Thank you very much Alexei!

                    seems to work now, but is this all I get?:

                    Code:
                    -rwxr-xr-x   1 root       sys         432600 Mar 12 17:45 /opt/zabbix_v1.4.4/sbin/zabbix_agent
                    -rwxr-xr-x   1 root       sys         482004 Mar 12 17:45 /opt/zabbix_v1.4.4/sbin/zabbix_agentd
                    -rwxr-xr-x   1 root       sys         194236 Mar 12 17:45 /opt/zabbix_v1.4.4/sbin/zabbix_get
                    -rwxr-xr-x   1 root       sys         204588 Mar 12 17:45 /opt/zabbix_v1.4.4/sbin/zabbix_sender
                    -rwxr-xr-x   1 root       sys        1379888 Mar 12 17:45 /opt/zabbix_v1.4.4/sbin/zabbix_server
                    I guess I have to create /etc/ files by my own from scratch?

                    Comment

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

                      #11
                      Yes, you are right
                      Alexei Vladishev
                      Creator of Zabbix, Product manager
                      New York | Tokyo | Riga
                      My Twitter

                      Comment

                      • anoy
                        Junior Member
                        • Mar 2008
                        • 7

                        #12
                        if that is the only thing left I'll do it uncomplaining

                        regards

                        Comment

                        • richlv
                          Senior Member
                          Zabbix Certified Trainer
                          Zabbix Certified SpecialistZabbix Certified Professional
                          • Oct 2005
                          • 3112

                          #13
                          well, not from scratch, just copy them from misc/conf and modify as required
                          Zabbix 3.0 Network Monitoring book

                          Comment

                          Working...