Ad Widget

Collapse

zabbix 1.7.2 ssh2 compile problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kmradke
    Member
    • Aug 2009
    • 33

    #1

    zabbix 1.7.2 ssh2 compile problem

    Using RHEL5 with libssh2 0.17, get the following compile error:

    checks_ssh.c: In function 'waitsocket':
    checks_ssh.c:64: error: 'LIBSSH2_SESSION_BLOCK_INBOUND' undeclared (first use in this function)
    checks_ssh.c:64: error: (Each undeclared identifier is reported only once
    checks_ssh.c:64: error: for each function it appears in.)
    checks_ssh.c:67: error: 'LIBSSH2_SESSION_BLOCK_OUTBOUND' undeclared (first use in this function)

    I realize 0.17 is old, but it is what is available via yum on that platform. Those defines were released after 0.19.

    For reference, google found this:


    Will a certain version of libssh2 be required?
  • kmradke
    Member
    • Aug 2009
    • 33

    #2
    ./configure --with-ssh2=/path/to/new/ssh2

    doesn't seem to work either. Doesn't find my newly compiled and installed 1.2.1 libraries.

    config.log just says:

    configure:12198: checking for SSH2 support
    configure:12214: result: no
    configure:12318: error: SSH2 library not found

    oddly enough, the configure script appears to only check for the passed in ssh2 directory if you don't specify the --with-ssh2 option...

    Comment

    • kmradke
      Member
      • Aug 2009
      • 33

      #3
      This manual manipulation of the configure script allows it to correctly check for the passed in directory for libssh2:

      Code:
      *** configure.orig      2009-11-13 13:49:22.000000000 -0600
      --- configure   2009-11-16 15:17:53.000000000 -0600
      ***************
      *** 12209,12221 ****
                SSH2_LDFLAGS=-L$/usr/local/lib
                SSH2_LIBS="-lssh2"
                found_ssh2="yes"
      !       else
      !         found_ssh2="no"
      !         { echo "$as_me:$LINENO: result: no" >&5
      ! echo "${ECHO_T}no" >&6; }
      !       fi
      !     else
      !       if test -f $_libssh2_dir/include/libssh2.h; then
                SSH2_CFLAGS=-I$_libssh2_dir/include
                SSH2_LDFLAGS=-L$_libssh2_dir/lib
                SSH2_LIBS="-lssh2"
      --- 12209,12215 ----
                SSH2_LDFLAGS=-L$/usr/local/lib
                SSH2_LIBS="-lssh2"
                found_ssh2="yes"
      !       elif test -f $_libssh2_dir/include/libssh2.h; then
                SSH2_CFLAGS=-I$_libssh2_dir/include
                SSH2_LDFLAGS=-L$_libssh2_dir/lib
                SSH2_LIBS="-lssh2"
      Last edited by kmradke; 16-11-2009, 23:32. Reason: Added code tags

      Comment

      • richlv
        Senior Member
        Zabbix Certified Trainer
        Zabbix Certified SpecialistZabbix Certified Professional
        • Oct 2005
        • 3112

        #4
        please report this on the tracker. looks like two changes might be required - properly supporting libssh2 directory and requiring minimal libssh2 version
        Last edited by richlv; 17-11-2009, 13:33.
        Zabbix 3.0 Network Monitoring book

        Comment

        • primos
          Member
          • Jul 2005
          • 61

          #5
          Libs must be installed in /usr/local, but work only for text type items, numbers allway return 0.

          regards,
          Primož

          Comment

          • kmradke
            Member
            • Aug 2009
            • 33

            #6
            Originally posted by richlv
            please report this on the tracker. looks like two changes might be required - properly supporting libssh2 directory and requiring minimal libssh2 version
            Filed ZBX-1299
            Last edited by kmradke; 17-11-2009, 18:37. Reason: Made ID clickable

            Comment

            • richlv
              Senior Member
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Oct 2005
              • 3112

              #7
              Originally posted by primos
              Libs must be installed in /usr/local, but work only for text type items, numbers allway return 0.

              regards,
              Primož
              btw, that was fixed for 1.8
              Zabbix 3.0 Network Monitoring book

              Comment

              • Arioch
                Junior Member
                • Dec 2009
                • 19

                #8
                This bug still exists in Zabbix 1.8 on RHEL/CentOS 5.4 with libssh2-0.18-9 installed.

                Using --with-ssh2=/usr/lib/libssh2.so or --with-ssh2=/usr/lib/
                Code:
                configure: error: SSH2 library not found
                Using --with-ssh2
                Code:
                checking for SSH2 support... yes
                ...
                ions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables   -I/usr/include/mysql  -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -fasynchronous-unwind-tables -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv     -I/usr/include/rpm -I/usr/local/include -I/usr/include/gdbm -I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE -I. -I/usr/include/net-snmp  -Iusr/include    -MT checks_ssh.o -MD -MP -MF .deps/checks_ssh.Tpo -c -o checks_ssh.o checks_ssh.c
                checks_ssh.c: In function 'waitsocket':
                checks_ssh.c:62: warning: implicit declaration of function 'libssh2_session_block_directions'
                checks_ssh.c:64: error: 'LIBSSH2_SESSION_BLOCK_INBOUND' undeclared (first use in this function)
                checks_ssh.c:64: error: (Each undeclared identifier is reported only once
                checks_ssh.c:64: error: for each function it appears in.)
                checks_ssh.c:67: error: 'LIBSSH2_SESSION_BLOCK_OUTBOUND' undeclared (first use in this function)
                make[3]: *** [checks_ssh.o] Error 1
                make[3]: Leaving directory `/home/nucleus/rpmbuild/BUILD/zabbix-1.8/src/zabbix_server/poller'
                make[2]: *** [all-recursive] Error 1
                make[2]: Leaving directory `/home/nucleus/rpmbuild/BUILD/zabbix-1.8/src/zabbix_server'
                make[1]: *** [all-recursive] Error 1
                make[1]: Leaving directory `/home/nucleus/rpmbuild/BUILD/zabbix-1.8/src'
                make: *** [all-recursive] Error 1
                error: Bad exit status from /var/tmp/rpm-tmp.19515 (%build)
                Last edited by Arioch; 04-01-2010, 14:21. Reason: added libssh2 version

                Comment

                • richlv
                  Senior Member
                  Zabbix Certified Trainer
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Oct 2005
                  • 3112

                  #9
                  Originally posted by Arioch
                  This bug still exists in Zabbix 1.8 on RHEL/CentOS 5.4 with libssh2-0.18-9 installed.
                  ...
                  as noted (http://www.zabbix.com/documentation/...r_requirements), libssh2 version 1.0 or higher is required
                  Zabbix 3.0 Network Monitoring book

                  Comment

                  • edomaur
                    Junior Member
                    • May 2005
                    • 7

                    #10
                    I've installed libssh2 v1.2.2 from sources, in /usr/local/lib, but the bug is still present :

                    --with-ssh2=/usr/local/lib

                    results in the error

                    configure: error: SSH2 library not found

                    Comment

                    • richlv
                      Senior Member
                      Zabbix Certified Trainer
                      Zabbix Certified SpecialistZabbix Certified Professional
                      • Oct 2005
                      • 3112

                      #11
                      you probably installed it in /usr/local (at least i hope so ), try w/o trailing 'lib'
                      Zabbix 3.0 Network Monitoring book

                      Comment

                      • edomaur
                        Junior Member
                        • May 2005
                        • 7

                        #12
                        Originally posted by richlv
                        you probably installed it in /usr/local (at least i hope so ), try w/o trailing 'lib'
                        Nope, it's in /usr/local/lib :-(

                        Comment

                        • richlv
                          Senior Member
                          Zabbix Certified Trainer
                          Zabbix Certified SpecialistZabbix Certified Professional
                          • Oct 2005
                          • 3112

                          #13
                          what configuration flags did you use for it ?
                          Zabbix 3.0 Network Monitoring book

                          Comment

                          • edomaur
                            Junior Member
                            • May 2005
                            • 7

                            #14
                            It was :

                            ./configure --enable-server --enable-agent --with-net-snmp --with-ssh2=/usr/local/lib --with-openipmi --with-libcurl --with-pgsql --with-jabber

                            edit : the OS is a Debian Lenny 32bits, so I had to install manually libssh2 since Lenny still package the 0.18 version.

                            Comment

                            • richlv
                              Senior Member
                              Zabbix Certified Trainer
                              Zabbix Certified SpecialistZabbix Certified Professional
                              • Oct 2005
                              • 3112

                              #15
                              oh, no, what configure flags were used for libssh2 compilation
                              Zabbix 3.0 Network Monitoring book

                              Comment

                              Working...