Ad Widget

Collapse

Im cry : Zabbix 1.4-1.6 Compile Error in Solaris 10(sparc,64)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DGK
    Junior Member
    • Oct 2008
    • 8

    #1

    Im cry : Zabbix 1.4-1.6 Compile Error in Solaris 10(sparc,64)

    Hi!.

    Problem in the following

    Server SunFire V100 (Solaris 10, SPARC, 64bit)
    Mysql 4 (standard delivery)

    my .profile
    Code:
    LD_LIBRARY_PATH=/usr/openwin/lib:/usr/dt/lib:/usr/lib:/etc/lib:/usr/ccs/lib:/usr/local/bin:/usr/sfw/lib:/usr/local/lib:/usr/ucb:/usr/sfw/bin:/usr/lib:/bin:/etc:/usr/ccs/bin:/usr/openwin/bin:/Ora10/bin:/opt/bin:/usr/local/bin:/usr/local/lib:/usr/sfw/lib
    export LD_LIBRARY_PATH
    PATH=$PATH:/usr/ucb:/usr/sfw/bin:/usr/lib:/bin:/etc:/usr/ccs/bin:/usr/openwin/bin:/Ora10/bin:/opt/bin:/usr/local/bin:/usr/local/lib:/usr/sfw/lib
    export PATH



    FAILED
    ./configure - enable-server - enable-agent - with-mysql - with-libcurl

    error: main in-lmysqlclient... no


    OK
    ./configure - enable-server - enable-agent --with-mysql=/usr/sfw/lib/libmysqlclient.so - with-libcurl


    MAKE

    Code:
    make install
    Making install in src
    Making install in libs
    Making install in zbxcrypto
    Making install in zbxcommon
    Making install in zbxlog
    Making install in zbxnix
    Making install in zbxconf
    Making install in zbxsysinfo
    Making install in common
    Making install in simple
    Making install in solaris
    Making install in zbxplugin
    Making install in zbxsys
    Making install in zbxcomms
    Making install in zbxjson
    Making install in zbxdb
    if gcc-DHAVE_CONFIG_H-I.-I.-I../../../include-g-O2-MT db.o-MD-MP-MF " .deps/db. Tpo "-c-o db.o db.c; \
    then mv-f " .deps/db. Tpo " " .deps/db. Po "; else rm-f " .deps/db. Tpo "; exit 1; fi
    db.c: In function ` zbx_db_connect ':
    db.c:87: error: ` CLIENT_MULTI_STATEMENTS' undeclared (first use in this function)
    db.c:87: error: (Each undeclared identifier is reported only once
    db.c:87: error: for each function it appears in.)
    *** Error code 1
    make: Fatal error: Command failed for target ` db.o '
    Current working directory/inst/zabbix-1.6/src/libs/zbxdb
    *** Error code 1
    The following command caused the error:
    failcom ='exit 1 '; \
    for f in x $MAKEFLAGS; do \
      case $f in \
        * = * | - [! k] *);; \
        *k *) failcom ='fail=yes';; \
      esac; \
    done; \
    dot_seen=no; \
    target = ` echo install-recursive | sed s/-recursive // `; \
    list ='zbxcrypto zbxcommon zbxlog zbxnix zbxconf zbxsysinfo zbxplugin zbxsys zbxcomms zbxjson zbxdb zbxdbcache zbxdbhigh zbxemail zbxsms zbxserver zbxicmpping '; for subdir in $list; do \
      echo " Making $target in $subdir "; \
      if test "$subdir" = "."; then \
        dot_seen=yes; \
        local_target = " $ target-am "; \
      else \
        local_target = " $ target "; \
      fi; \
      (cd $subdir && make $local_target) \
      || eval $failcom; \
    done; \
    if test "$dot_seen" = "no"; then \
      make "$target-am" || exit 1; \
    fi; test-z "$fail"
    make: Fatal error: Command failed for target ` install-recursive '
    Current working directory/inst/zabbix-1.6/src/libs
    *** Error code 1
    The following command caused the error:
    failcom ='exit 1 '; \
    for f in x $MAKEFLAGS; do \
      case $f in \
        * = * | - [! k] *);; \
        *k *) failcom ='fail=yes';; \
      esac; \
    done; \
    dot_seen=no; \
    target = ` echo install-recursive | sed s/-recursive // `; \
    list ='libs zabbix_server '; for subdir in $list; do \
      echo " Making $target in $subdir "; \
      if test "$subdir" = "."; then \
        dot_seen=yes; \
        local_target = " $ target-am "; \
      else \
        local_target = " $ target "; \
      fi; \
      (cd $subdir && make $local_target) \
      || eval $failcom; \
    done; \
    if test "$dot_seen" = "no"; then \
      make "$target-am" || exit 1; \
    fi; test-z "$fail"
    make: Fatal error: Command failed for target ` install-recursive '
    Current working directory/inst/zabbix-1.6/src
    *** Error code 1
    The following command caused the error:
    failcom ='exit 1 '; \
    for f in x $MAKEFLAGS; do \
      case $f in \
        * = * | - [! k] *);; \
        *k *) failcom ='fail=yes';; \
      esac; \
    done; \
    dot_seen=no; \
    target = ` echo install-recursive | sed s/-recursive // `; \
    list ='src create misc upgrades'; for subdir in $list; do \
      echo " Making $target in $subdir "; \
      if test "$subdir" = "."; then \
        dot_seen=yes; \
        local_target = " $ target-am "; \
      else \
        local_target = " $ target "; \
      fi; \
      (cd $subdir && make $local_target) \
      || eval $failcom; \
    done; \
    if test "$dot_seen" = "no"; then \
      make "$target-am" || exit 1; \
    fi; test-z "$fail"
    make: Fatal error: Command failed for target ` install-recursive '
    In Linux Redhat 5 the line works:
    ./configure - enable-server - enable-agent - with-mysql - with-libcurl

    Why in Solaris it is necessary to specify a way to a file libmysqlcilent.so
    I think, what from this make install - comes to the end unsuccessfully?

    Help me please!
    Last edited by DGK; 07-10-2008, 05:35.
  • DGK
    Junior Member
    • Oct 2008
    • 8

    #2
    one problem solved

    Edit file mysql_config :
    replace xarch=v9 to xarch=v8

    ./configure - enable-server - enable-agent - with-mysql - with-libcurl


    cp /opt/mysql/mysql/include/* /inst/zabbix-1.6/include

    MAKE INSTALL
    Code:
     make install
    Making install in src
    Making install in libs
    Making install in zbxcrypto
    Making install in zbxcommon
    Making install in zbxlog
    Making install in zbxnix
    Making install in zbxconf
    Making install in zbxsysinfo
    Making install in common
    Making install in simple
    Making install in solaris
    Making install in zbxplugin
    Making install in zbxsys
    Making install in zbxcomms
    Making install in zbxjson
    Making install in zbxdb
    Making install in zbxdbcache
    Making install in zbxdbhigh
    Making install in zbxemail
    Making install in zbxsms
    Making install in zbxserver
    Making install in zbxicmpping
    Making install in zabbix_agent
    test -z "/zabbix/sbin" || /inst/zabbix-1.6/install-sh -d "/zabbix/sbin"
      ../.././install-sh -c 'zabbix_agent' '/zabbix/sbin/zabbix_agent'
      ../.././install-sh -c 'zabbix_agentd' '/zabbix/sbin/zabbix_agentd'
    Making install in zabbix_get
    test -z "/zabbix/sbin" || /inst/zabbix-1.6/install-sh -d "/zabbix/sbin"
      ../.././install-sh -c 'zabbix_get' '/zabbix/sbin/zabbix_get'
    Making install in zabbix_sender
    test -z "/zabbix/sbin" || /inst/zabbix-1.6/install-sh -d "/zabbix/sbin"
      ../.././install-sh -c 'zabbix_sender' '/zabbix/sbin/zabbix_sender'
    Making install in zabbix_server
    Making install in alerter
    Making install in dbsyncer
    Making install in discoverer
    Making install in housekeeper
    Making install in httppoller
    Making install in nodewatcher
    Making install in pinger
    Making install in poller
    Making install in timer
    Making install in trapper
    Making install in utils
    Making install in watchdog
    Making install in escalator
    gcc  -g -O2  -L/usr/sfw/lib -L/usr/local/mysql/lib -L/usr/local/mysql/include -L/usr/include/mysql -o zabbix_server -L/opt/mysql/mysql/lib    -L/usr/local/lib -lcurl -L/usr/local/lib -L/usr/local/pgsql/lib -L/usr/lib -L/usr/openwin/lib -L/usr/local/ssl/lib -L/usr/local/BerkeleyDB.4.2/lib -L/usr/X11R6/lib -lidn -lssl -lcrypto -lrt -lsocket -lnsl -lz zabbix_server-actions.o  zabbix_server-operations.o  zabbix_server-events.o zabbix_server-zlog.o  zabbix_server-server.o alerter/libzbxalerter.a  dbsyncer/libzbxdbsyncer.a  discoverer/libzbxdiscoverer.a  pinger/libzbxpinger.a  poller/libzbxpoller.a  housekeeper/libzbxhousekeeper.a  timer/libzbxtimer.a  trapper/libzbxtrapper.a  nodewatcher/libzbxnodewatcher.a  utils/libzbxutils.a  httppoller/libzbxhttppoller.a  watchdog/libzbxwatchdog.a  escalator/libzbxescalator.a  ../../src/libs/zbxsysinfo/libzbxserversysinfo.a  ../../src/libs/zbxsysinfo/solaris/libspecsysinfo.a  ../../src/libs/zbxsysinfo/common/libcommonsysinfo.a  ../../src/libs/zbxsysinfo/simple/libsimplesysinfo.a  ../../src/libs/zbxlog/libzbxlog.a  ../../src/libs/zbxnix/libzbxnix.a  ../../src/libs/zbxsys/libzbxsys.a  ../../src/libs/zbxconf/libzbxconf.a  ../../src/libs/zbxemail/libzbxemail.a  ../../src/libs/zbxsms/libzbxsms.a  ../../src/libs/zbxdbhigh/libzbxdbhigh.a  ../../src/libs/zbxdb/libzbxdb.a  ../../src/libs/zbxdbcache/libzbxdbcache.a  ../../src/libs/zbxcommon/libzbxcommon.a  ../../src/libs/zbxcrypto/libzbxcrypto.a  ../../src/libs/zbxcomms/libzbxcomms.a  ../../src/libs/zbxjson/libzbxjson.a  ../../src/libs/zbxserver/libzbxserver.a  ../../src/libs/zbxicmpping/libzbxicmpping.a    -lmysqlclient    -lcurl -lkvm -lm -lresolv -lnsl -lkstat -lsocket
    ld: warning: file /usr/local/mysql/lib/libz.a(inflate.o): wrong ELF class: ELFCLASS64
    ld: warning: file /usr/lib/libmysqlclient.a(libmysql.o): wrong ELF class: ELFCLASS64
    Undefined                       first referenced
     symbol                             in file
    mysql_fetch_row                     ../../src/libs/zbxdb/libzbxdb.a(db.o)
    mysql_query                         ../../src/libs/zbxdb/libzbxdb.a(db.o)
    mysql_errno                         ../../src/libs/zbxdb/libzbxdb.a(db.o)
    mysql_error                         ../../src/libs/zbxdb/libzbxdb.a(db.o)
    mysql_close                         ../../src/libs/zbxdb/libzbxdb.a(db.o)
    mysql_insert_id                     ../../src/libs/zbxdb/libzbxdb.a(db.o)
    mysql_free_result                   zabbix_server-actions.o
    mysql_next_result                   ../../src/libs/zbxdb/libzbxdb.a(db.o)
    mysql_store_result                  ../../src/libs/zbxdb/libzbxdb.a(db.o)
    mysql_init                          ../../src/libs/zbxdb/libzbxdb.a(db.o)
    mysql_select_db                     ../../src/libs/zbxdb/libzbxdb.a(db.o)
    mysql_affected_rows                 ../../src/libs/zbxdb/libzbxdb.a(db.o)
    mysql_real_connect                  ../../src/libs/zbxdb/libzbxdb.a(db.o)
    mysql_field_count                   ../../src/libs/zbxdb/libzbxdb.a(db.o)
    ld: fatal: Symbol referencing errors. No output written to zabbix_server
    collect2: ld returned 1 exit status
    *** Error code 1
    make: Fatal error: Command failed for target `zabbix_server'
    Current working directory /inst/zabbix-1.6/src/zabbix_server
    *** Error code 1
    The following command caused the error:
    failcom='exit 1'; \
    for f in x $MAKEFLAGS; do \
      case $f in \
        *=* | --[!k]*);; \
        *k*) failcom='fail=yes';; \
      esac; \
    done; \
    dot_seen=no; \
    target=`echo install-recursive | sed s/-recursive//`; \
    list='alerter  dbsyncer  discoverer  housekeeper  httppoller  nodewatcher  pinger  poller  timer  trapper  utils  watchdog  escalator'; for subdir in $list; do \
      echo "Making $target in $subdir"; \
      if test "$subdir" = "."; then \
        dot_seen=yes; \
        local_target="$target-am"; \
      else \
        local_target="$target"; \
      fi; \
      (cd $subdir && make  $local_target) \
      || eval $failcom; \
    done; \
    if test "$dot_seen" = "no"; then \
      make  "$target-am" || exit 1; \
    fi; test -z "$fail"
    make: Fatal error: Command failed for target `install-recursive'
    Current working directory /inst/zabbix-1.6/src/zabbix_server
    *** Error code 1
    The following command caused the error:
    failcom='exit 1'; \
    for f in x $MAKEFLAGS; do \
      case $f in \
        *=* | --[!k]*);; \
        *k*) failcom='fail=yes';; \
      esac; \
    done; \
    dot_seen=no; \
    target=`echo install-recursive | sed s/-recursive//`; \
    list='libs  zabbix_agent  zabbix_get  zabbix_sender    zabbix_server'; for subdir in $list; do \
      echo "Making $target in $subdir"; \
      if test "$subdir" = "."; then \
        dot_seen=yes; \
        local_target="$target-am"; \
      else \
        local_target="$target"; \
      fi; \
      (cd $subdir && make  $local_target) \
      || eval $failcom; \
    done; \
    if test "$dot_seen" = "no"; then \
      make  "$target-am" || exit 1; \
    fi; test -z "$fail"
    make: Fatal error: Command failed for target `install-recursive'
    Current working directory /inst/zabbix-1.6/src
    *** Error code 1
    The following command caused the error:
    failcom='exit 1'; \
    for f in x $MAKEFLAGS; do \
      case $f in \
        *=* | --[!k]*);; \
        *k*) failcom='fail=yes';; \
      esac; \
    done; \
    dot_seen=no; \
    target=`echo install-recursive | sed s/-recursive//`; \
    list='src  create  misc  upgrades'; for subdir in $list; do \
      echo "Making $target in $subdir"; \
      if test "$subdir" = "."; then \
        dot_seen=yes; \
        local_target="$target-am"; \
      else \
        local_target="$target"; \
      fi; \
      (cd $subdir && make  $local_target) \
      || eval $failcom; \
    done; \
    if test "$dot_seen" = "no"; then \
      make  "$target-am" || exit 1; \
    fi; test -z "$fail"
    make: Fatal error: Command failed for target `install-recursive'

    Comment

    • Tenzer
      Senior Member
      • Nov 2007
      • 316

      #3
      The following lines tell that you have a 32-bit vs. 64-bit conflict:

      ld: warning: file /usr/local/mysql/lib/libz.a(inflate.o): wrong ELF class: ELFCLASS64
      ld: warning: file /usr/lib/libmysqlclient.a(libmysql.o): wrong ELF class: ELFCLASS64

      You probably have a 64-bit MySQL client installed, but since the Zabbix server only runs in 32-bit, they won't compile. You should use a 32-bit MySQL client instead.

      Comment

      • DGK
        Junior Member
        • Oct 2008
        • 8

        #4
        ALL OK!

        reinstall mysql to 32bit

        ./configure - enable-server - enable-agent --with-mysql=/usr/sfw/lib/libmysqlclient.so - with-libcurl

        cp /opt/mysql/mysql/include/* /inst/zabbix-1.6/include

        make install
        Last edited by DGK; 08-10-2008, 03:07. Reason: all ok

        Comment

        Working...