bgi has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I want to use the Net::SSH2 Package...but this depends on the "libssh2" library...which depends on openSSL!

Soo, because im a bit nooby in those compile and build stuff i need help!!

What I know so far: Compiling of libssh2 is possible with mingw and msys... "./configure" runned succesfully, but "make" command gave some errors:

hostkey.c:416: error: syntax error before string constant hostkey.c:426: error: syntax error before '*' token hostkey.c: In function `libssh2_hostkey_methods': hostkey.c:429: error: `_libssh2_hostkey_methods' undeclared (first use + in this function) hostkey.c:429: error: (Each undeclared identifier is reported only onc +e hostkey.c:429: error: for each function it appears in.) hostkey.c: At top level: hostkey.c:438: error: syntax error before "const" hostkey.c:439: error: syntax error before '*' token hostkey.c: In function `libssh2_hostkey_hash': hostkey.c:441: error: `hash_type' undeclared (first use in this functi +on) hostkey.c:447: error: `LIBSSH2_HOSTKEY_HASH_SHA1' undeclared (first us +e in this function) hostkey.c:448: error: `session' undeclared (first use in this function +) hostkey.c:451: error: `NULL' undeclared (first use in this function) make[2]: *** [hostkey.lo] Error 1 make[1]: *** [all] Error 2 make: *** [all-recursive] Error 1
what to do?

Replies are listed 'Best First'.
Re: SSH2 Module on Windows
by tachyon-II (Chaplain) on May 19, 2008 at 11:12 UTC

    You will need to be a bit more specific. For anyone to offer help they will need to know about your OS (which flavour of Win32), your version of Perl, your compiler (MinGW), your version of make (make, nmake, dmake, gmake)....

    As far as compiling and building stuff goes there is lots of scope for errors but (besides basic incompatibility problems) probably the most common reason for problems is the C compiler not being able to find the necessary header and library files. The first error or two in the compiler error output is usually the most relevant - once it looses the plot it looses the plot. What you have posted does not look like the begining of the error trace to me, it looks like the last bit. This is not typically very useful.

Re: SSH2 Module on Windows
by Anonymous Monk on May 19, 2008 at 11:14 UTC
      Hi,

      thx for your fast replies....using ppm is not as easy as you propably think: the module depends on libssh2, so is need to install that first (or is it possible that libssh2 is already included in the ppm package?)

      My very first thought was to contact libssh2 support, but the only thing i found was a read-only mailing list (lol)

      But ok, I think its my last chance to contact their support (if i found it), give a few log-files and hope for help...
        using ppm is easy, also very easy to try out
        the module depends on libssh2, so is need to install that first (or is it possible that libssh2 is already included in the ppm package?)

        There's no need to install libssh2. The ppm package doesn't actually contain libssh2, but it was built against a static libssh2 library - so all of the libssh2 functionality has been built into the ppm package.

        Cheers,
        Rob
Re: SSH2 Module on Windows
by Anonymous Monk on May 19, 2008 at 11:12 UTC
    Contact libssh2/openssl support for help compiling their products.