Ad Widget

Collapse

Trouble building Zabbix 1.8.9 with Postgresql

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • elvar
    Senior Member
    • Feb 2008
    • 226

    #1

    Trouble building Zabbix 1.8.9 with Postgresql

    Hello, I'm trying to build Zabbix 1.8.9 from source on Ubuntu Server 11.10 64bit with Postgresql 9.1. My configure completed successfully and below is my configure arguments...


    PHP Code:
    ./configure --host=x86_64-linux-gnu --build=x86_64-linux-gnu --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-proxy --with-pgsql --enable-agent --with-net-snmp 
    When I run make though I get into trouble. Below is what I see near the end. Any help would be greatly appreciated!

    Kind regards,
    Elvar


    xcrypto/libzbxcrypto.a ../../src/libs/zbxcomms/libzbxcomms.a ../../src/libs/zbxcommshigh/libzbxcommshigh.a ../../src/libs/zbxjson/libzbxjson.a ../../src/libs/zbxexec/libzbxexec.a ../../src/libs/zbxself/libzbxself.a ../../src/libs/zbxserver/libzbxserver.a ../../src/libs/zbxicmpping/libzbxicmpping.a ../../src/libs/zbxdbhigh/libzbxdbhigh.a ../../src/libs/zbxdb/libzbxdb.a -lnetsnmp -lm -lresolv
    ../../src/libs/zbxdb/libzbxdb.a(db.o): In function `zbx_db_close':
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:443: undefined reference to `PQfinish'
    ../../src/libs/zbxdb/libzbxdb.a(db.o): In function `zbx_db_vexecute':
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:815: undefined reference to `PQexec'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:822: undefined reference to `PQresultStatus'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:824: undefined reference to `PQresultErrorMessage'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:824: undefined reference to `PQresultStatus'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:824: undefined reference to `PQresStatus'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:830: undefined reference to `PQstatus'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:836: undefined reference to `PQclear'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:834: undefined reference to `PQcmdTuples'
    ../../src/libs/zbxdb/libzbxdb.a(db.o): In function `zbx_db_fetch':
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:1273: undefined reference to `PQnfields'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:1283: undefined reference to `PQgetisnull'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:1289: undefined reference to `PQgetvalue'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:1290: undefined reference to `PQftype'
    ../../src/libs/zbxdb/libzbxdb.a(db.o): In function `PG_DBfree_result':
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:1388: undefined reference to `PQclear'
    ../../src/libs/zbxdb/libzbxdb.a(db.o): In function `zbx_db_vselect':
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:1119: undefined reference to `PQexec'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:1127: undefined reference to `PQresultStatus'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:1129: undefined reference to `PQresultErrorMessage'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:1129: undefined reference to `PQresultStatus'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:1129: undefined reference to `PQresStatus'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:1136: undefined reference to `PQstatus'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:1139: undefined reference to `PQntuples'
    ../../src/libs/zbxdb/libzbxdb.a(db.o): In function `zbx_db_connect':
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:293: undefined reference to `PQsetdbLogin'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:298: undefined reference to `PQstatus'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:293: undefined reference to `PQsetdbLogin'
    /root/download/zabbix-1.8.9/src/libs/zbxdb/db.c:300: undefined reference to `PQerrorMessage'
    collect2: ld returned 1 exit status
    make[3]: *** [zabbix_proxy] Error 1
    make[3]: Leaving directory `/root/download/zabbix-1.8.9/src/zabbix_proxy'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/root/download/zabbix-1.8.9/src/zabbix_proxy'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/root/download/zabbix-1.8.9/src'
    make: *** [all-recursive] Error 1
    Last edited by elvar; 30-11-2011, 22:47. Reason: Added Postgresql version
  • jeremiah.snapp
    Junior Member
    • Dec 2011
    • 1

    #2
    I had trouble doing this last week too. I'm also installing Zabbix 1.8.9 on Ubuntu 11.10.

    A patch has to be applied before building the Zabbix binaries. I've attached my patch to this post. It was derived from the debian/ubuntu patch for their zabbix server 1.8.5 package which fixed these bugs.

    Ubuntu Bug
    Debian Bug

    I only had to make minor modifications for it to work with 1.8.9.

    Here are my build instructions.

    Code:
    sudo apt-get install build-essential automake1.9 postgresql-server-dev-9.1 libsnmp-dev libcurl3-dev postgresql fping
    
    tar xzvf zabbix-1.8.9.tar.gz
    cd zabbix-1.8.9/
    
    # copy the zabbix-1.8.9-ldap-linker-lp722300.txt here
    patch -p1 < zabbix-1.8.9-ldap-linker-lp722300.txt
    
    ./configure --enable-server --with-pgsql --with-net-snmp --with-libcurl
    sudo make install
    Attached Files
    Last edited by jeremiah.snapp; 08-12-2011, 17:17. Reason: Just added Code tags around my instructions

    Comment

    • elvar
      Senior Member
      • Feb 2008
      • 226

      #3
      Originally posted by jeremiah.snapp
      I had trouble doing this last week too. I'm also installing Zabbix 1.8.9 on Ubuntu 11.10.

      A patch has to be applied before building the Zabbix binaries. I've attached my patch to this post. It was derived from the debian/ubuntu patch for their zabbix server 1.8.5 package which fixed these bugs.

      Ubuntu Bug
      Debian Bug

      I only had to make minor modifications for it to work with 1.8.9.

      Here are my build instructions.

      Code:
      sudo apt-get install build-essential automake1.9 postgresql-server-dev-9.1 libsnmp-dev libcurl3-dev postgresql fping
      
      tar xzvf zabbix-1.8.9.tar.gz
      cd zabbix-1.8.9/
      
      # copy the zabbix-1.8.9-ldap-linker-lp722300.txt here
      patch -p1 < zabbix-1.8.9-ldap-linker-lp722300.txt
      
      ./configure --enable-server --with-pgsql --with-net-snmp --with-libcurl
      sudo make install

      Thanks for the reply! I ended up using mysql but on my next build I'll try out this patch.

      Regards,

      Comment

      Working...