I have a working script using Net::SSH2-0.53 that's hunky-dorey in Komodo but when wrapped with PerlApp it can't open a connection. As I understand from ActiveState, the underlying reason is that the .exe uses Windows (8.1) dynamic loading for any dependent libraries and what I really need to do is recompile Net-SSH2. Great.

I have been going mental compiling. I have followed the procedure laid out in the module for windows. I have built zlib-1.2.8, openssl-1.0.1l, and finally libssh2-1.4.3 successfully but when I run perl Mahefile.PL and dmake, I run into problems (below). Any suggestions will be highly valued.

D:\Net-SSH\Net-SSH2-0.53>perl Makefile.PL lib=d:\Net-SSH\libssh2-1.4.3 +\src\.libs inc=d:\Net-SSH\libssh2-1.4.3\include Set up gcc environment - 4.8.1 Subroutine checklibs redefined at inc/Module/Install/CheckLib.pm line +11. Subroutine assertlibs redefined at inc/Module/Install/CheckLib.pm line + 25. Subroutine _author_side redefined at inc/Module/Install/CheckLib.pm li +ne 39. The libssh2 library is required by this module. If you don't have it, + you can download it from http://www.libssh2.org; you may also need OpenSSL, wh +ich can be obtained from http://www.openssl.org , or libgcrypt, which can be o +btained from http://www.gnupg.org . Debian: sudo aptitude install libssh2-1-dev OpenSUSE: sudo zypper in libssh2-1 libssh2-devel You can pass your libssh2 lib and include dirs (and extra link args) o +n the command line. E.g.: perl Makefile.PL lib=$HOME/libssh2/lib inc=$HOME/libssh2/include \ ldargs="-lz" These can also be set through the LIBSSH2_LIB/LIBSSH2_INCLUDE/LIBSSH2_ +LDARGS environment variables. To build with libgcrypt instead of OpenSSL, pass 'gcrypt' as a paramet +er to Makefile.PL, e.g.: perl Makefile.PL gcrypt If you want to build on Windows, see the file BUILDING.WIN32 in the distribution. Warning (mostly harmless): No library found for -lssl32 Warning (mostly harmless): No library found for -leay32 Generating a dmake-style Makefile Writing Makefile for Net::SSH2 Writing MYMETA.yml and MYMETA.json D:\Net-SSH\Net-SSH2-0.53>dmake Skip blib\lib\Net\SSH2\File.pm (unchanged) Skip blib\lib\Net\SSH2\PublicKey.pm (unchanged) Skip blib\lib\Net\SSH2\Dir.pm (unchanged) Skip blib\lib\Net\SSH2\SFTP.pm (unchanged) Skip blib\lib\Net\SSH2\Listener.pm (unchanged) Skip blib\lib\Net\SSH2\Channel.pm (unchanged) Skip blib\lib\Net\SSH2.pm (unchanged) Running Mkbootstrap for Net::SSH2 () "C:\perl\bin\perl.exe" "-Iinc" -MExtUtils::Command -e chmod -- 644 "SS +H2.bs" c:\mingw\bin\gcc.exe -c -Id:\Net-SSH\libssh2-1.4.3\include -I. + -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUST +OMIZE -DPE RL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME +_T -DHASAT TRIBUTE -fno-strict-aliasing -mms-bitfields -O2 -DVERSION=\" +0.53\" -DXS_VERSION=\"0.53\" "-IC:\Perl\lib\CORE" -DLIBSSH2_WIN32 -DLIBSSH2 +_API= SSH2 .c In file included from C:\Perl\lib\CORE/win32thread.h:4:0, from C:\Perl\lib\CORE/perl.h:2834, from SSH2.xs:8: C:\Perl\lib\CORE/win32.h:297:13: error: conflicting types for 'mkstemp +' extern int mkstemp(const char *path); ^ In file included from C:\Perl\lib\CORE/perl.h:681:0, from SSH2.xs:8: c:\mingw\include\stdlib.h:610:29: note: previous definition of 'mkstem +p' was her e int __cdecl __MINGW_NOTHROW mkstemp( char *__filename_template ) ^ dmake.exe: Error code 129, while making 'SSH2.o' D:\Net-SSH\Net-SSH2-0.53>

In reply to Making Net::SSH2 by martydavis

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.