Ad Widget

Collapse

Is it possible to cross compile zabbix-proxy on mips platform?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • armstrongzhao
    Junior Member
    • Oct 2013
    • 6

    #1

    Is it possible to cross compile zabbix-proxy on mips platform?

    I am trying to install the zabbix proxy into a mips board.

    The zabbix source code which I am compiling is 2.2.8.

    I have cross compiled some libs:
    libssh2
    root@ubuntu:/usr/local/mips/buildroot-gcc342/lib# file libssh2.so.1.0.1
    libssh2.so.1.0.1: ELF 32-bit LSB shared object, MIPS, MIPS-II version 1 (SYSV), dynamically linked, not stripped

    fping

    sqlite3

    net-snmp 5.4.4
    root@ubuntu:/usr/local/mips/buildroot-gcc342/sbin# file snmpd
    snmpd: ELF 32-bit LSB executable, MIPS, MIPS-II version 1 (SYSV), dynamically linked (uses shared libs), not stripped
    root@ubuntu:/usr/local/mips/buildroot-gcc342/sbin# file snmptrapd
    snmptrapd: ELF 32-bit LSB executable, MIPS, MIPS-II version 1 (SYSV), dynamically linked (uses shared libs), not stripped

    iksemel-1.4,
    root@ubuntu:/usr/local/mips/buildroot-gcc342/lib# file libiksemel.so.3.1.1
    libiksemel.so.3.1.1: ELF 32-bit LSB shared object, MIPS, MIPS-II version 1 (SYSV), dynamically linked, not stripped

    gd2.0.0,
    root@ubuntu:/usr/local/mips/buildroot-gcc342/lib# file libgd.so.2.0.0
    libgd.so.2.0.0: ELF 32-bit LSB shared object, MIPS, MIPS-II version 1 (SYSV), dynamically linked, not stripped

    My current problem is that, ./configure can not find SSH2 library
    cat: /usr/local/mips/buildroot-gcc342/lib/include/sqlite3.h: No such file or directory
    ./configure: line 11613: test: !=: unary operator expected
    configure: WARNING: Can not find SQLITE_VERSION macro in sqlite3.h header to retrieve SQLite version!
    checking for function sqlite3_open_v2() in sqlite3.h... no
    checking for Zabbix server/proxy database selection... ok
    checking for multirow insert statements... no
    checking for mipsel-linux-pkg-config... no
    checking for pkg-config... /usr/bin/pkg-config
    configure: WARNING: In the future, Autoconf will not detect cross-tools
    whose name does not start with the host triplet. If you think this
    configuration is useful to you, please write to [email protected].
    checking pkg-config is at least version 0.9.0... yes
    checking for net-snmp-config... /usr/local/mips/buildroot-gcc342/sbin
    ./configure: line 12820: /usr/local/mips/buildroot-gcc342/sbin: Is a directory
    ./configure: line 12830: /usr/local/mips/buildroot-gcc342/sbin: Is a directory
    checking for main in -lnetsnmp... yes
    checking for localname in struct snmp_session... yes
    checking for SSH2 support... no
    configure: error: SSH2 library not found

    In fact, I have defined the path.
    root@ubuntu:/var/tmp/zabbix-2.2.8# ./configure --prefix=/usr/local/mips/test --enable-proxy --enable-agent CC=mipsel-linux-gcc --host=mipsel-linux --with-sqlite3=/usr/local/mips/buildroot-gcc342/lib --with-net-snmp=/usr/local/mips/buildroot-gcc342/sbin --with-libcurl=/usr/local/mips/buildroot-gcc342/lib --with-ssh2=/usr/local/mips/buildroot-gcc342/lib

    why libssh2-devel source code can not be downloaded from the ssh2 website? Once I install zabbix on x86 debian,libssh2-1-dev will be installed as well.

    So, how can i cross compile libssh2-devel source code?
    Is it ok to modify configure? I think the error is triggered by the libssh2.h
    if test "x$want_ssh2" = "xyes"; then
    { echo "$as_me:$LINENO: checking for SSH2 support" >&5
    echo $ECHO_N "checking for SSH2 support... $ECHO_C" >&6; }
    if test "x$_libssh2_dir" = "xno"; then
    if test -f /usr/include/libssh2.h; then
    SSH2_CFLAGS=-I/usr/include
    SSH2_LDFLAGS=-L/usr/lib
    SSH2_LIBS="-lssh2"
    found_ssh2="yes"

    # Zabbix minimal major supported version of libssh2:
    minimal_libssh2_major_version=1

    # get the major version
    found_ssh2_version_major=`cat /usr/include/libssh2.h | $EGREP \#define.*LIBSSH2_VERSION_MAJOR | $AWK '{print $3;}'`

    accept_ssh2_version="no"

    if test $found_ssh2_version_major -ge $minimal_libssh2_major_version; then
    accept_ssh2_version="yes"
    fi;

    elif test -f /usr/local/include/libssh2.h; then
    SSH2_CFLAGS=-I/usr/local/include
    SSH2_LDFLAGS=-L/usr/local/lib
    SSH2_LIBS="-lssh2"
    found_ssh2="yes"

    Is
Working...