Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Net-SSH2 on Windows with Perl 5.14

by bogi (Initiate)
on Sep 11, 2015 at 08:03 UTC ( #1141649=note: print w/replies, xml ) Need Help??


in reply to Re: Net-SSH2 on Windows with Perl 5.14
in thread Net-SSH2 on Windows with Perl 5.14

Original poster asked how to build Net::SSH2 on Windows using Active State Perl 5.14. It is nice to have some few repositories holding pre-compiled ppds. But wouldn't it be even nicer to have an easy instruction how to build it on Active perl in general?

Recently there has been a development release which has some essential features I would like to test like KeepAlive packets and unfortunately, I am not able to build it :-( Even not after trying to compile and studying the internet for several days now. Either I am the only one in the world who is trying or only I am dumb ...

So, please: If there is any wisdom out there: Please share it!

Deserately kind regards,
Bogi

  • Comment on Re^2: Net-SSH2 on Windows with Perl 5.14

Replies are listed 'Best First'.
Re^3: Net-SSH2 on Windows with Perl 5.14
by salva (Abbot) on Sep 11, 2015 at 08:30 UTC
    Hi bogi, I am one of the maintainers.

    You are right, installing Net::SSH2 on ActiveState Perl on Windows is pretty difficult. A document explaining how to do it exists on the distribution but to be honest, I wasn't able to successfully follow it myself.

    So, anybody willing to volunteer to improve that would be really welcome in the project!!!

    BTW, the keep-alive functionality in libssh2 is still quite buggy, and if you use it you risk breaking the connection.

      You are right, installing Net::SSH2 on ActiveState Perl on Windows is pretty difficult. A document explaining how to do it exists on the distribution but to be honest, I wasn't able to successfully follow it myself.

      :) Well step 1 is wrong :D for all perls you want http://mingw-w64.sourceforge.net/ its the better compiler

      Also, the latest strawberryperl comes bundled with libssh2 and all the prereqs including the compiler, also the module, and the better compiler ...

      So if you want to install it into ActivePerl, install strawberryperlportable, so you get all the prerequisites pre compile..... then use the activeperl...perl.exe to run Makefile.PL and compile the thing specifically for activeperl .... copy some .dlls and you're done

      Actually that just more of the same busywork, http://www.sisyphusion.tk/ppm/Net-SSH2.ppd has already gone through all those steps and provided binaries

      I did not know that there are instructions on the distribution itself, i.e. ActiveState Perl?!

      I only know about the BUILDING.WIN32 in the github repo (https://github.com/rkitover/net-ssh2), which, when following, end up in a perl 5.8.8 under MinGW ...

      Do you have a pointer for me of the ActiveState instructions?

        I did not know that there are instructions on the distribution itself, i.e. ActiveState Perl?! I only know about the BUILDING.WIN32 in the github repo (https://github.com/rkitover/net-ssh2), which, when following, end up in a perl 5.8.8 under MinGW ... Do you have a pointer for me of the ActiveState instructions?

        Its the same file :) why do you want to compile everything from source? Most of the time that is just a hassle, so you go to looking for binaries from the devs/maintainers so you only have to compile the perl side of things

        Easiest path (since strawberryperl folks already compiled the prerequisites)

        Go to http://strawberryperl.com/releases.html and get a portablezip edition, unzip it, then

        run "portableshell.bat"

        download/unzip Net-SSH2... then chdir to that directory in the portableshell window

        Then edit Makefile.PL essentially as per https://github.com/rkitover/net-ssh2/blob/master/BUILDING.WIN32 , set basic http://gcc.gnu.org/onlinedocs/gcc/Environment-Variables.html

        $ENV{LIBRARY_PATH}='strawberry-perl-5.22.0.1-64bit-portable/c/lib'; $ENV{C_INCLUDE_PATH}='strawberry-perl-5.22.0.1-64bit-portable/c/includ +e';

        so gcc... knows how to find libssh2.h/libssh2.a

        Then run ....fullpathtoactivestate\bin\perl.exe Makefile.PL

        The whole trick of it most of the time is simple "%PATH%" manipulation

        Post details if you get stuck

        links like these talk about it or link to links that talk about it... most of it is "sh configure ... make" or "perl Makefile.PL... make" ... A Guide To Installing Modules...copy/paste

Re^3: Net-SSH2 on Windows with Perl 5.14
by Anonymous Monk on Sep 11, 2015 at 08:07 UTC

    But wouldn't it be even nicer to have an easy instruction how to build it on Active perl in general? ... So, please: If there is any wisdom out there: Please share it!

    If you encounter an error message, share the message, you have been wisdomed :D

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1141649]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2018-12-19 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many stories does it take before you've heard them all?







    Results (83 votes). Check out past polls.

    Notices?