martydavis has asked for the wisdom of the Perl Monks concerning the following question:
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>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Making Net::SSH2
by syphilis (Archbishop) on Feb 10, 2015 at 04:15 UTC | |
by martydavis (Initiate) on Feb 10, 2015 at 12:55 UTC | |
by syphilis (Archbishop) on Feb 10, 2015 at 14:11 UTC |