Ad Widget

Collapse

1.8.2 compile issue with libssh2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • davidpe
    Junior Member
    • Mar 2007
    • 18

    #1

    1.8.2 compile issue with libssh2

    I'm compiling zabbix 1.8.2 with libssh2, version 1.2.4, and I'm getting the following error message:

    poller/libzbxpoller.a(checks_ssh.o): In function `waitsocket':
    /tmp/zabbix-1.8.2/src/zabbix_server/poller/checks_ssh.c:62: undefined reference to `libssh2_session_block_directions'
    collect2: ld returned 1 exit status
    make[3]: *** [zabbix_server] Error 1
    make[3]: Leaving directory `/tmp/zabbix-1.8.2/src/zabbix_server'
    make[2]: *** [install-recursive] Error 1
    make[2]: Leaving directory `/tmp/zabbix-1.8.2/src/zabbix_server'
    make[1]: *** [install-recursive] Error 1
    make[1]: Leaving directory `/tmp/zabbix-1.8.2/src'
    make: *** [install-recursive] Error 1

    libssh2 is installed in /usr/local/libssh2 and I'm using the following zabbix compile options: ./configure --prefix=/data/zabbix-1.8.2 --enable-server --with-mysql --with-net-snmp --with-libcurl --with-openipmi --with-jabber --with-ssh2=/usr/local/libssh2

    Any ideas what might be the issue? Thanks
  • richlv
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Oct 2005
    • 3112

    #2
    are you sure the dev headers of libssh2 that zabbix finds are 1.2.4 ? quick google reveals "function libssh2_session_block_directions() only is available with libssh2 version 1.0 and later.", so i suspect you have older dev headers actually.
    Zabbix 3.0 Network Monitoring book

    Comment

    • stephenvau
      Junior Member
      • Apr 2010
      • 3

      #3
      I got the same error, and this was with libssl 1.2.5. I'm running debian lenny, which does have an old version of libssl2, but I have compiled zabbix with 1.2.5

      Comment

      • erikgreen
        Junior Member
        • Sep 2010
        • 9

        #4
        Same problem here

        I'm having the same issue.

        It seems that if an older version of ssh2 is installed system wide, Zabbix tries to link against it even if it's given the location of a newer (post 1.0) libssh2 version on the configure command line. Probably due to the search order of library directories in the configure-generated make files.

        Does Zabbix expect that the older version of the library be removed? This isn't possible for us, Red hat uses the older version in their current distribution and we have to keep it for standards reasons...

        Erik

        Comment

        • erikgreen
          Junior Member
          • Sep 2010
          • 9

          #5
          Yeah

          Confirmed a workaround.

          In the makefile for src/zabbix_server, you can change the CCLD line to be:

          CCLD=$(CC) -L/ssh2/include/dir/lib


          Obviously put your post 1.0 version of libssh2 in the -L parameter, make sure you're pointing to the dir where the actual lib is, and it'll link.

          The Makefile is re-generated when you run configure, so if something stuffs up just clean things up and re-run it. Of course, you have to re-edit the Makefile anytime you reconfigure...


          Erik


          PS: Forgot to mention, I had the same problem with 1.8.3, not 1.8.2 per the thread title.
          Last edited by erikgreen; 14-09-2010, 18:17.

          Comment

          Working...