Ad Widget

Collapse

zabbix 1.1 solaris 9 compile problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nickfixit
    Junior Member
    • Jan 2005
    • 6

    #1

    zabbix 1.1 solaris 9 compile problems

    Does anyone have some pre-compiled agents for solaris 9 sun4u that they could post?

    I started out using the pre-compiled 1.0 agents which worked fine but wanted to upgrade with the following results.

    Making all in src/zabbix_agent
    gmake[1]: Entering directory `/export/home/source/zabbix-1.1alpha4/src/zabbix_agent'
    gcc -o ../../bin/zabbix_agent -static -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
    sysinfo.c: In function `UPTIME':
    sysinfo.c:2006: error: `reutrn' undeclared (first use in this function)
    sysinfo.c:2006: error: (Each undeclared identifier is reported only once
    sysinfo.c:2006: error: for each function it appears in.)
    sysinfo.c:2006: error: parse error before numeric constant
    ../../include/snprintf.c: In function `vasprintf':
    ../../include/snprintf.c:815: warning: implicit declaration of function `vsnprintf'
    ../../include/snprintf.c: At top level:
    ../../include/snprintf.c:161: warning: 'dopr' defined but not used
    gmake[1]: *** [all] Error 1
    gmake[1]: Leaving directory `/export/home/source/zabbix-1.1alpha4/src/zabbix_agent'
    gmake: *** [all] Error 1

    I assume that reutrn was supposed to be return but then get

    Making all in src/zabbix_agent
    gmake[1]: Entering directory `/export/home/source/zabbix-1.1alpha4/src/zabbix_agent'
    gcc -o ../../bin/zabbix_agent -static -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
    sysinfo.c: In function `process':
    sysinfo.c:320: warning: 'function_str' might be used uninitialized in this function
    ../../include/snprintf.c: In function `vasprintf':
    ../../include/snprintf.c:815: warning: implicit declaration of function `vsnprintf'
    ../../include/snprintf.c: At top level:
    ../../include/snprintf.c:161: warning: 'dopr' defined but not used
    Undefined first referenced
    symbol in file
    socket /var/tmp//cchmsbas.o
    getpeername /var/tmp//ccf6SdQZ.o
    recv /var/tmp//cchmsbas.o
    kstat_close /var/tmp//cchmsbas.o
    gethostbyname /var/tmp//cchmsbas.o
    send /var/tmp//cchmsbas.o
    inet_ntoa /var/tmp//ccf6SdQZ.o
    kstat_lookup /var/tmp//cchmsbas.o
    kstat_read /var/tmp//cchmsbas.o
    kstat_open /var/tmp//cchmsbas.o
    kstat_data_lookup /var/tmp//cchmsbas.o
    connect /var/tmp//cchmsbas.o
    ld: fatal: Symbol referencing errors. No output written to ../../bin/zabbix_agent
    collect2: ld returned 1 exit status
    gmake[1]: *** [all] Error 1
    gmake[1]: Leaving directory `/export/home/source/zabbix-1.1alpha4/src/zabbix_agent'
    gmake: *** [all] Error 1


    Any ideas or suggestions welcome.

    Now I have started it just iritating.

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

    #2
    Are you using --enable-static flag? It doesn't work under Solaris.
    Alexei Vladishev
    Creator of Zabbix, Product manager
    New York | Tokyo | Riga
    My Twitter

    Comment

    • nickfixit
      Junior Member
      • Jan 2005
      • 6

      #3
      I tried the static switch out of curiousity when nothing else worked. I had already seen the note saying it would not work and I can confirm it dosn't.

      Thanks for the thought though.

      Any more?

      Comment

      • nickfixit
        Junior Member
        • Jan 2005
        • 6

        #4
        Sorry you were right.

        I was working on several things at the same time and then posted the wrong error. The one above is the error produced by using the static flag.

        My apologies for wasting your time.

        The getopt.h or getopt.c does not exist anywhere on the system. Is this a net-snmp or a zabbix component?

        Making all in src/zabbix_agent
        gmake[1]: Entering directory `/export/home/source/zabbix-1.1alpha4/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 -lkstat -lsocket
        sysinfo.c: In function `process':
        sysinfo.c:320: warning: 'function_str' might be used uninitialized in this function
        ../../include/snprintf.c: In function `vasprintf':
        ../../include/snprintf.c:815: warning: implicit declaration of function `vsnprintf'
        ../../include/snprintf.c: At top level:
        ../../include/snprintf.c:161: warning: 'dopr' defined but not used
        gcc -o ../../bin/zabbix_agentd -g -O2 -I../../include zabbix_agentd.c sysinfo.c stats.c interfaces.c diskdevices.c cpustat.c ../../include/log.c ../../include/cfg.c ../../include/security.c ../../include/pid.c ../../include/snprintf.c ../../include/md5.c -Wall -lnsl -lkstat -lsocket
        sysinfo.c: In function `process':
        sysinfo.c:320: warning: 'function_str' might be used uninitialized in this function
        stats.c: In function `collect_statistics':
        stats.c:83: warning: implicit declaration of function `collect_stats_cpustat'
        ../../include/snprintf.c: In function `vasprintf':
        ../../include/snprintf.c:815: warning: implicit declaration of function `vsnprintf'
        ../../include/snprintf.c: At top level:
        ../../include/snprintf.c:161: warning: 'dopr' defined but not used
        gmake[1]: Leaving directory `/export/home/source/zabbix-1.1alpha4/src/zabbix_agent'
        Making all in src/zabbix_sender
        gmake[1]: Entering directory `/export/home/source/zabbix-1.1alpha4/src/zabbix_sender'
        gcc -o ../../bin/zabbix_sender -g -O2 -I../../include ../../include/snprintf.c zabbix_sender.c -lnsl -lkstat -lsocket
        gmake[1]: Leaving directory `/export/home/source/zabbix-1.1alpha4/src/zabbix_sender'
        Making all in src/zabbix_server
        gmake[1]: Entering directory `/export/home/source/zabbix-1.1alpha4/src/zabbix_server'
        gcc -o ../../bin/zabbix_server -g -O2 -I../../include -I/usr/local/mysql/include/mysql -I/usr/local/include server.c ../../include/db.c ../../include/functions.c ../../include/expression.c ../../include/cfg.c ../../include/log.c ../../include/security.c ../../include/pid.c ../../include/email.c ../../include/snprintf.c ../zabbix_agent/sysinfo.c ../../include/md5.c ../../include/zlog.c alerter.c pinger.c housekeeper.c checks_simple.c checks_snmp.c checks_agent.c checks_internal.c -Wall -lnsl -lkstat -lsocket -L/usr/local/mysql/lib/mysql -lmysqlclient -lm -lz -L/usr/local/lib -lnetsnmp -lcrypto
        In file included from /usr/local/include/net-snmp/net-snmp-includes.h:68,
        from checks_snmp.h:36,
        from server.c:61:
        /usr/local/include/net-snmp/utilities.h:31:20: getopt.h: No such file or directory
        server.c: In function `tcp_listen':
        server.c:1204: warning: implicit declaration of function `bzero'
        ../../include/snprintf.c: In function `vasprintf':
        ../../include/snprintf.c:815: warning: implicit declaration of function `vsnprintf'
        ../../include/snprintf.c: At top level:
        ../../include/snprintf.c:161: warning: 'dopr' defined but not used
        ../zabbix_agent/sysinfo.c: In function `process':
        ../zabbix_agent/sysinfo.c:320: warning: 'function_str' might be used uninitialized in this function
        In file included from /usr/local/include/net-snmp/net-snmp-includes.h:68,
        from checks_snmp.h:36,
        from checks_snmp.c:20:
        /usr/local/include/net-snmp/utilities.h:31:20: getopt.h: No such file or directory
        gmake[1]: *** [all] Error 1
        gmake[1]: Leaving directory `/export/home/source/zabbix-1.1alpha4/src/zabbix_server'
        gmake: *** [all] Error 1

        Comment

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

          #5
          Seems to be a net-snmp problem. Do you need SNMP support? If no, then do not use --with-net-snmp and everything will be fine.

          Otherwise try to replace getopt.h by unistd.h or stdlib.h. This is what Google whispered to me.
          Alexei Vladishev
          Creator of Zabbix, Product manager
          New York | Tokyo | Riga
          My Twitter

          Comment

          • nickfixit
            Junior Member
            • Jan 2005
            • 6

            #6
            zabbix 1.1 solaris 9

            Still had problems so I tried your CVS and then downloaded your alpha5 version. The CVS and alpha5 without net-snmp give the following problem.

            Undefined first referenced
            symbol in file
            hstrerror /var/tmp//cc40wBX4.o

            Further details:

            zabbix-1.1alpha5#./configure --with-mysql=/usr/local/mysql --without-net-snmp


            :/export/home/source/zabbix-1.1alpha5#gmake
            Making all in src/zabbix_agent
            gmake[1]: Entering directory `/export/home/source/zabbix-1.1alpha5/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 -lkstat -lsocket
            sysinfo.c: In function `process':
            sysinfo.c:320: warning: 'function_str' might be used uninitialized in this function
            ../../include/snprintf.c: In function `vasprintf':
            ../../include/snprintf.c:815: warning: implicit declaration of function `vsnprintf'
            ../../include/snprintf.c: At top level:
            ../../include/snprintf.c:161: warning: 'dopr' defined but not used
            gcc -o ../../bin/zabbix_agentd -g -O2 -I../../include zabbix_agentd.c sysinfo.c stats.c interfaces.c diskdevices.c cpustat.c ../../include/log.c ../../include/cfg.c ../../include/security.c ../../include/pid.c ../../include/snprintf.c ../../include/md5.c -Wall -lnsl -lkstat -lsocket
            sysinfo.c: In function `process':
            sysinfo.c:320: warning: 'function_str' might be used uninitialized in this function
            ../../include/snprintf.c: In function `vasprintf':
            ../../include/snprintf.c:815: warning: implicit declaration of function `vsnprintf'
            ../../include/snprintf.c: At top level:
            ../../include/snprintf.c:161: warning: 'dopr' defined but not used
            gmake[1]: Leaving directory `/export/home/source/zabbix-1.1alpha5/src/zabbix_agent'
            Making all in src/zabbix_sender
            gmake[1]: Entering directory `/export/home/source/zabbix-1.1alpha5/src/zabbix_sender'
            gcc -o ../../bin/zabbix_sender -g -O2 -I../../include ../../include/snprintf.c zabbix_sender.c -lnsl -lkstat -lsocket
            gmake[1]: Leaving directory `/export/home/source/zabbix-1.1alpha5/src/zabbix_sender'
            Making all in src/zabbix_server
            gmake[1]: Entering directory `/export/home/source/zabbix-1.1alpha5/src/zabbix_server'
            gcc -o ../../bin/zabbix_server -g -O2 -I../../include -I/usr/local/mysql/include/mysql server.c ../../include/db.c ../../include/functions.c ../../include/expression.c ../../include/cfg.c ../../include/log.c ../../include/security.c ../../include/pid.c ../../include/email.c ../../include/snprintf.c ../zabbix_agent/sysinfo.c ../../include/md5.c ../../include/zlog.c alerter.c pinger.c housekeeper.c checks_simple.c checks_snmp.c checks_agent.c checks_internal.c -Wall -lnsl -lkstat -lsocket -L/usr/local/mysql/lib/mysql -lmysqlclient -lm -lz
            server.c: In function `tcp_listen':
            server.c:1194: warning: implicit declaration of function `bzero'
            ../../include/snprintf.c: In function `vasprintf':
            ../../include/snprintf.c:815: warning: implicit declaration of function `vsnprintf'
            ../../include/snprintf.c: At top level:
            ../../include/snprintf.c:161: warning: 'dopr' defined but not used
            ../zabbix_agent/sysinfo.c: In function `process':
            ../zabbix_agent/sysinfo.c:320: warning: 'function_str' might be used uninitialized in this function
            Undefined first referenced
            symbol in file
            hstrerror /var/tmp//cc40wBX4.o
            ld: fatal: Symbol referencing errors. No output written to ../../bin/zabbix_server
            collect2: ld returned 1 exit status
            gmake[1]: *** [all] Error 1
            gmake[1]: Leaving directory `/export/home/source/zabbix-1.1alpha5/src/zabbix_server'
            gmake: *** [all] Error 1


            Thanks again for your help.

            Nick

            Comment

            Working...