Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

cpan module installation in strawberry perl

by bsshetty17 (Acolyte)
on Oct 10, 2016 at 10:14 UTC ( #1173641=perlquestion: print w/replies, xml ) Need Help??

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

Hi, I have installed strawberry perl version 5.24.0.1. I am trying to install few CPAN modules like Net::SFTP etc with command "cpan Net::SFTP". when i try this .t exits at dmake with error code 129.

I am using windows server 2008 r2 deployed in a vm environment. and 64bit perl is installed. Please help in resolving the problem.

  • Comment on cpan module installation in strawberry perl

Replies are listed 'Best First'.
Re: cpan module installation in strawberry perl
by marto (Cardinal) on Oct 10, 2016 at 10:21 UTC

      Check out this relevant link , the top reply also had a similar issue on Windows, and was able to fix it by modifying the config.

      Here's another possible solution in a different thread involving an issue with date and time settings.

Re: cpan module installation in strawberry perl
by syphilis (Archbishop) on Oct 11, 2016 at 06:18 UTC
    I am trying to install few CPAN modules like Net::SFTP

    Instead use Net::SFTP::Foreign (with the Net::SSH2 backend).
    It should install cleanly and easily on Strawberry Perl:
    cpan -i Net::SFTP::Foreign::Backend::Net_SSH2
    It uses the libssh2 C library (which ships with Strawberry Perl).
    I use Net::SFTP::Foreign on Windows quite a bit and find it to be very good.

    Cheers,
    Rob
Re: cpan module installation in strawberry perl
by dasgar (Priest) on Oct 12, 2016 at 04:26 UTC

    It would have been more helpful if you could have provided more text from the error message. When I tried installing Net::SFTP on a system using portable Strawberry Perl, my attempt failed at the same point as the post from Cow1337killr. In particular, I got something similar to this excerpt from Cow1337killr's post:

    dmake.exe: Error code 129, while making 'Curve25519.o' AJGB/Crypt-Curve25519-0.05.tar.gz C:\STRAWB~1\c\bin\dmake.exe -- NOT OK Stopping: 'install' failed for 'Crypt::Curve25519'. Failed during this command: AJGB/Crypt-Curve25519-0.05.tar.gz : make NO

    Doing a little checking on the Crypt::Curve25519 module (which appears to be the source of the issue), there doesn't seem to be any tests that passed in the mswin32 column of its CPAN Testers matrix. Also, it looks like someone has already filed a bug report on this issue - and for whatever reason, there doesn't seem to be a response yet from the module's author.

    If you're not willing to wait for the module's author to fix this issue and are not interested in figuring out a patch for this issue yourself, then it looks like using Net::SFTP may not be an option. Of course, syphilis shared an alternative solution in his post.

      dmake.exe: Error code 129, while making 'Curve25519.o'

      The problem lies with the symbol "OUT".
      Consider this C program:
      #include <windows.h> int main(void) { int OUT = 7; return 0; }
      If you attempt to compile that program on Windows, you get:
      try.c: In function 'main': try.c:4:10: error: expected identifier or '(' before '=' token int OUT = 7; ^
      I think that's a pretty good indication that OUT is a special symbol on Windows.
      The program builds fine if windows.h is not included but, of course, windows.h is included for the xs file.

      Simplest solution would be to replace the symbol "OUT" with something that's not going to clash.
      (I'll add that to the bug report unless someone else beats me to it.)

      Cheers,
      Rob
Re: cpan module installation in strawberry perl
by Cow1337killr (Monk) on Oct 11, 2016 at 00:52 UTC

    I was unable to install the module.

    C:\path to my folder\Perl scripts>cpan Loading internal null logger. Install Log::Log4perl for logging messag +es cpan shell -- CPAN exploration and modules installation (v2.14) Enter 'h' for help. cpan> h Display Information ( +ver 2.14) command argument description a,b,d,m WORD or /REGEXP/ about authors, bundles, distributions, mod +ules i WORD or /REGEXP/ about any of the above ls AUTHOR or GLOB about files in the author's directory (with WORD being a module, bundle or author name or a distribution name of the form AUTHOR/DISTRIBUTION) Download, Test, Make, Install... get download clean make clean make make (implies get) look open subshell in dist +directory test make test (implies make) readme display these README f +iles install make install (implies test) perldoc display POD documentat +ion Upgrade installed modules r WORDs or /REGEXP/ or NONE report updates for some/matchin +g/all upgrade WORDs or /REGEXP/ or NONE upgrade some/matching/all modul +es Pragmas force CMD try hard to do command fforce CMD try harder notest CMD skip testing Other h,? display this menu ! perl-code eval a perl comma +nd o conf [opt] set and query options q quit the cpan she +ll reload cpan load CPAN.pm again reload index load newer indice +s autobundle Snapshot recent latest CPAN uploa +ds cpan> install Net::SFTP Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz Fetching with LWP: http://cpan.strawberryperl.com/modules/02packages.details.txt.gz Fetching with LWP: http://cpan.strawberryperl.com/modules/03modlist.data.gz Database was generated on Wed, 05 Oct 2016 03:13:43 GMT Updating database file ... Done! Running install for module 'Net::SFTP' Fetching with LWP: http://cpan.strawberryperl.com/authors/id/D/DB/DBROBINS/Net-SFTP-0.10. +tar.gz Fetching with LWP: http://cpan.strawberryperl.com/authors/id/D/DB/DBROBINS/CHECKSUMS Checksum for C:\STRAWB~1\cpan\sources\authors\id\D\DB\DBROBINS\Net-SFT +P-0.10.tar.gz ok Scanning cache C:\STRAWB~1\cpan\build for sizes ...................................................................... +.....-DONE DEL(1/6): C:\STRAWB~1\cpan\build\Type-Tiny-1.000005-k7jv4E DEL(2/6): C:\STRAWB~1\cpan\build\Type-Tie-0.009-1AL1_9 DEL(3/6): C:\STRAWB~1\cpan\build\Hash-FieldHash-0.14-1AvrZF DEL(4/6): C:\STRAWB~1\cpan\build\Devel-Caller-2.06-EDFLN7 DEL(5/6): C:\STRAWB~1\cpan\build\Devel-LexAlias-0.05-Kl44YI DEL(6/6): C:\STRAWB~1\cpan\build\Type-Tiny-XS-0.012-BAZAfF Configuring D/DB/DBROBINS/Net-SFTP-0.10.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Warning: prerequisite Net::SSH::Perl 1.24 not found. Generating a dmake-style Makefile Writing Makefile for Net::SFTP Writing MYMETA.yml and MYMETA.json DBROBINS/Net-SFTP-0.10.tar.gz C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK Running make for D/DB/DBROBINS/Net-SFTP-0.10.tar.gz ---- Unsatisfied dependencies detected during ---- ---- DBROBINS/Net-SFTP-0.10.tar.gz ---- Net::SSH::Perl [requires] Running install for module 'Net::SSH::Perl' Fetching with LWP: http://cpan.strawberryperl.com/authors/id/S/SC/SCHWIGON/Net-SSH-Perl-2 +.01.tar.gz Fetching with LWP: http://cpan.strawberryperl.com/authors/id/S/SC/SCHWIGON/CHECKSUMS Checksum for C:\STRAWB~1\cpan\sources\authors\id\S\SC\SCHWIGON\Net-SSH +-Perl-2.01.tar.gz ok Configuring S/SC/SCHWIGON/Net-SSH-Perl-2.01.tar.gz with Makefile.PL This is Net::SSH::Perl. As of version 1.00, Net::SSH::Perl supports both the SSH1 and SSH2 protocols natively. The two protocols have different module prerequisitives, so you need to decide which protocol(s) you plan to use. If you use one or the other, only those modules for your chosen protocol will be installed; if you choose both, all of the supporting modules will be installed. Please choose the protocols you'd like to use from the following list ("Both" is the default). [1] SSH1 [2] SSH2 [3] Both SSH1 and SSH2 Which protocol(s) do you plan to use? [3] Checking for optional modules Digest::BubbleBabble is required if you want to generate bubble babble key fingerprints with pssh-keygen. Would you like to install it? (y/n) [y] Checking if your kit is complete... Looks good Warning: prerequisite Crypt::Curve25519 0.05 not found. Warning: prerequisite Crypt::DH 0.01 not found. Warning: prerequisite Digest::BubbleBabble 0.01 not found. Warning: prerequisite String::CRC32 1.2 not found. Generating a dmake-style Makefile Writing Makefile for Net::SSH::Perl Writing MYMETA.yml and MYMETA.json SCHWIGON/Net-SSH-Perl-2.01.tar.gz C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK Running make for S/SC/SCHWIGON/Net-SSH-Perl-2.01.tar.gz ---- Unsatisfied dependencies detected during ---- ---- SCHWIGON/Net-SSH-Perl-2.01.tar.gz ---- Crypt::Curve25519 [requires] Crypt::DH [requires] Digest::BubbleBabble [requires,optional] String::CRC32 [requires] Running install for module 'Crypt::Curve25519' Fetching with LWP: http://cpan.strawberryperl.com/authors/id/A/AJ/AJGB/Crypt-Curve25519-0 +.05.tar.gz Fetching with LWP: http://cpan.strawberryperl.com/authors/id/A/AJ/AJGB/CHECKSUMS Checksum for C:\STRAWB~1\cpan\sources\authors\id\A\AJ\AJGB\Crypt-Curve +25519-0.05.tar.gz ok Configuring A/AJ/AJGB/Crypt-Curve25519-0.05.tar.gz with Makefile.PL Checking if your kit is complete... Looks good MakeMaker (v7.18) Warning (non-fatal): Target 'dynamic' depends on targets in skipped se +ction 'dynamic_lib' Warning (non-fatal): Target 'static' depends on targets in skipped sec +tion 'static_lib' Generating a dmake-style Makefile Writing Makefile for Crypt::Curve25519::curve25519donna Generating a dmake-style Makefile Writing Makefile for Crypt::Curve25519 "\x{0084}" does not map to cp437 at C:/Strawberry/perl/site/lib/ExtUti +ls/MakeMaker.pm line 1269. "\x{0084}" does not map to cp437 at C:/Strawberry/perl/site/lib/ExtUti +ls/MakeMaker.pm line 1269. "\x{0084}" does not map to cp437 at C:/Strawberry/perl/site/lib/ExtUti +ls/MakeMaker.pm line 1269. "\x{0084}" does not map to cp437 at C:/Strawberry/perl/site/lib/ExtUti +ls/MakeMaker.pm line 1269. "\x{0084}" does not map to cp437 at C:/Strawberry/perl/site/lib/ExtUti +ls/MakeMaker.pm line 1269. Writing MYMETA.yml and MYMETA.json AJGB/Crypt-Curve25519-0.05.tar.gz C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK Running make for A/AJ/AJGB/Crypt-Curve25519-0.05.tar.gz cp lib/Crypt/Curve25519.pm blib\lib\Crypt\Curve25519.pm AutoSplitting blib\lib\Crypt\Curve25519.pm (blib\lib\auto\Crypt\Curve2 +5519) cd curve25519-donna-master && dmake LIBPERL_A="libperl.a" LINKTY +PE="dynamic" OPTIMIZE="-s -O2" PREFIX="C:\S TRAWB~1\perl\site" PASTHRU_DEFINE=" " PASTHRU_INC="-I. " gcc -c -I. -m32 -s -O2 -DVERSION=\"\" -DXS_VERSION=\ +"\" "-IC:\STRAWB~1\perl\lib\CORE" curve25519-donna. c ar cr curve25519-donna.a curve25519-donna.o rem curve25519-donna.a Running Mkbootstrap for Curve25519 () "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 +"Curve25519.bs" "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonemp +ty -- Curve25519.bs blib\arch\auto\Crypt\Curve25519\Cu rve25519.bs 644 "C:\Strawberry\perl\bin\perl.exe" "C:\Strawberry\perl\lib\ExtUtils\xsu +bpp" -typemap C:\STRAWB~1\perl\lib\ExtUtils\typemap Curve25519.xs > Curve25519.xsc "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e mv -- Curve25 +519.xsc Curve25519.c gcc -c -I. -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT +_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-alias ing -mms-bitfields -s -O2 -DVERSION=\"0.05\" -DXS_VERSION=\ +"0.05\" "-IC:\STRAWB~1\perl\lib\CORE" Curve25519.c Curve25519.xs: In function 'XS_Crypt__Curve25519_curve25519': Curve25519.xs:47:26: error: expected identifier or '(' before '[' toke +n unsigned char OUT[32]; ^ Curve25519.xs:78:29: error: expected expression before ',' token curve25519_donna(OUT, csk, bp); ^ In file included from C:\STRAWB~1\perl\lib\CORE/perl.h:5554:0, from Curve25519.xs:2: C:\STRAWB~1\perl\lib\CORE/pp.h:475:58: error: expected expression befo +re ')' token #define mXPUSHp(p,l) STMT_START { EXTEND(sp,1); mPUSHp((p), (l)); } S +TMT_END ^ C:\STRAWB~1\perl\lib\CORE/pp.h:451:28: note: in definition of macro 'P +USHs' #define PUSHs(s) (*++sp = (s)) ^ C:\STRAWB~1\perl\lib\CORE/pp.h:468:27: note: in expansion of macro 'ne +wSVpvn_flags' #define mPUSHp(p,l) PUSHs(newSVpvn_flags((p), (l), SVs_TEMP)) ^ C:\STRAWB~1\perl\lib\CORE/pp.h:475:49: note: in expansion of macro 'mP +USHp' #define mXPUSHp(p,l) STMT_START { EXTEND(sp,1); mPUSHp((p), (l)); } S +TMT_END ^ Curve25519.xs:80:9: note: in expansion of macro 'mXPUSHp' mXPUSHp(OUT, 32); ^ dmake.exe: Error code 129, while making 'Curve25519.o' AJGB/Crypt-Curve25519-0.05.tar.gz C:\STRAWB~1\c\bin\dmake.exe -- NOT OK Stopping: 'install' failed for 'Crypt::Curve25519'. Failed during this command: AJGB/Crypt-Curve25519-0.05.tar.gz : make NO cpan> q Lockfile removed. C:\path to my folder\Perl scripts>perl -v This is perl 5, version 24, subversion 0 (v5.24.0) built for MSWin32-x +86-multi-thread-64int Copyright 1987-2016, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge. C:\path to my folder\Perl scripts>

      Your forward progress seems to be stopped right now at a place that's not far from the beginning. When I see

      C:\path to my folder\Perl scripts>

      with spaces in the path, I think it's just waiting to break. I might start over without spaces.

        I edited the output from the Windows command line window using Notepad++, replacing my real path with this made-up path name.

        Everyone's path is different. As long as my machine knows where Strawberry Perl is, it matters not what particular path I execute my scripts from, as long as they can find the files that they need. In this case, it is just an installation.

        I showed my attempt to install this module, because the original author of this thread was using Strawberry Perl and so do I, so our installations are virtually the same. In fact, I used Sandboxie, so as not to affect my real installation.

Re: cpan module installation in strawberry perl
by Aldebaran (Curate) on Oct 11, 2016 at 04:44 UTC

    I see a couple things that might not be working here, so let me say that it's really important in Perl to get every keystroke correct, including capitalization.

    I use strawberry perl, and to invoke cpan, I simply type

    cpan

    No 'sudo' here. Many treatments show that. To install a module:

    install Net::SFTP

    There's a lot of SFTP stuff of cpan that is out-of-date. Read what they recommend as newest. Hope this helps

Re: cpan module installation in strawberry perl
by bsshetty17 (Acolyte) on Oct 12, 2016 at 10:31 UTC

    Thanks everyone for your time/suggestions.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1173641]
Approved by Discipulus
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (1)
As of 2022-05-22 17:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (81 votes). Check out past polls.

    Notices?