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

I need to install Crypt::OpenSSL::PBKDF2 using cpan, however it requires libssl-dev, which I don't know how to install on Windows 7. I'm running Strawberry Perl because ActivePerl doesn't have PBKDF2 available on Windows.
  • Comment on How to install libssl-dev for Strawberry Perl on Windows

Replies are listed 'Best First'.
Re: How to install libssl-dev for Strawberry Perl on Windows
by syphilis (Archbishop) on Nov 18, 2015 at 11:28 UTC
    I need to install Crypt::OpenSSL::PBKDF2 using cpan

    The Makefile.PL that ships with Crypt::OpenSSL::PBKDF2 needs amending for Strawberry Perl.
    In that Makefile.PL, change the line:
    LIBS => ['-lcrypto -lssl '], # e.g., '-lm'
    to:
    LIBS => ['-leay32 -lssl32 '],
    With that change in place, Crypt::OpenSSL::PBKDF2 then builds, tests and installs fine for me on Strawberry Perl 5.22.0 (and should do the same on other versions of Strawberry Perl).

    Cheers,
    Rob
      I've tried, but fails with another error:
      PS C:\Users\Admin> cpan Loading internal null logger. Install Log::Log4perl for lo cpan shell -- CPAN exploration and modules installation (v Enter 'h' for help. cpan> install Crypt::OpenSSL::PBKDF2 Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz Fetching with LWP: http://cpan.strawberryperl.com/modules/02packages.details. Fetching with LWP: http://cpan.strawberryperl.com/modules/03modlist.data.gz Database was generated on Tue, 17 Nov 2015 16:00:44 GMT Updating database file ... Done! Running install for module 'Crypt::OpenSSL::PBKDF2' Checksum for C:\STRAWB~1\cpan\sources\authors\id\S\SK\SKUP Scanning cache C:\STRAWB~1\cpan\build for sizes .......................................................... Configuring S/SK/SKUPSY/OpenSSL/Crypt-OpenSSL-PBKDF2-0.04. Checking if your kit is complete... Looks good Warning (mostly harmless): No library found for -lcrypto Warning (mostly harmless): No library found for -lssl Generating a dmake-style Makefile Writing Makefile for Crypt::OpenSSL::PBKDF2 Writing MYMETA.yml and MYMETA.json SKUPSY/OpenSSL/Crypt-OpenSSL-PBKDF2-0.04.tar.gz C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK Running make for S/SK/SKUPSY/OpenSSL/Crypt-OpenSSL-PBKDF2- cp PBKDF2.pm blib\lib\Crypt\OpenSSL\PBKDF2.pm AutoSplitting blib\lib\Crypt\OpenSSL\PBKDF2.pm (blib\lib\a Running Mkbootstrap for Crypt::OpenSSL::PBKDF2 () "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e c "C:\Strawberry\perl\bin\perl.exe" "C:\Strawberry\perl\lib\ map" -typemap "typemap" PBKDF2.xs > PBKDF2.xsc && "C:\Str .xsc PBKDF2.c Please specify prototyping behavior for PBKDF2.xs (see per gcc -c -I. -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPE S -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 rl\lib\CORE" PBKDF2.c "C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"Crypt::OpenSSL::PBKDF2\", 'D ORTS' => { }, 'DL_VARS' => []);" dlltool --def PBKDF2.def --output-exp dll.exp g++ -o blib\arch\auto\Crypt\OpenSSL\PBKDF2\PBKDF2.xs.dll - ORE" -L"C:\STRAWB~1\c\lib" PBKDF2.o "C:\STRAWB~1\perl\li moldname.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libkerne STRAWB~1\c\x86_64-w64-mingw32\lib\libgdi32.a" "C:\STRAWB~1 -w64-mingw32\lib\libcomdlg32.a" "C:\STRAWB~1\c\x86_64-w64- ib\libshell32.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\lib "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libnetapi32.a" "C:\S _64-w64-mingw32\lib\libws2_32.a" "C:\STRAWB~1\c\x86_64-w64 ibwinmm.a" "C:\STRAWB~1\c\x86_64-w64-mingw32\lib\libversio RAWB~1\c\x86_64-w64-mingw32\lib\libodbccp32.a" "C:\STRAWB~ PBKDF2.o:PBKDF2.c:(.text+0x1fe): undefined reference to `S PBKDF2.o:PBKDF2.c:(.text+0x203): undefined reference to `E PBKDF2.o:PBKDF2.c:(.text+0x228): undefined reference to `P PBKDF2.o:PBKDF2.c:(.text+0x24a): undefined reference to `E PBKDF2.o:PBKDF2.c:(.text+0x35c): undefined reference to `E PBKDF2.o:PBKDF2.c:(.text+0x365): undefined reference to `E PBKDF2.o:PBKDF2.c:(.text+0x54a): undefined reference to `S PBKDF2.o:PBKDF2.c:(.text+0x54f): undefined reference to `E PBKDF2.o:PBKDF2.c:(.text+0x574): undefined reference to `P PBKDF2.o:PBKDF2.c:(.text+0x596): undefined reference to `E PBKDF2.o:PBKDF2.c:(.text+0x67a): undefined reference to `E PBKDF2.o:PBKDF2.c:(.text+0x683): undefined reference to `E collect2.exe: error: ld returned 1 exit status dmake.exe: Error code 129, while making 'blib\arch\auto\C SKUPSY/OpenSSL/Crypt-OpenSSL-PBKDF2-0.04.tar.gz C:\STRAWB~1\c\bin\dmake.exe -- NOT OK Stopping: 'install' failed for 'Crypt::OpenSSL::PBKDF2'. Failed during this command: SKUPSY/OpenSSL/Crypt-OpenSSL-PBKDF2-0.04.tar.gz: make NO
        I've tried, but fails with another error

        Making cpan/cpanm/cpanp use a modified Makefile.PL may be tricky.
        I can still see (in the output you posted):
        Warning (mostly harmless): No library found for -lcrypto Warning (mostly harmless): No library found for -lssl
        Those warnings will come form the original Makefile.PL, but you won't get them if the Makefile.PL is amended as I indicated.

        One way is to cd to the directory of a previous cpan build and:
        1) run dmake realclean
        2) amend the Makefile.PL
        3) run perl Makefile.PL
        4) run dmake test
        5) run dmake install

        Updates follow:
        Step 4 is not really necessary - but it's a good idea to check that the tests pass.

        I thought that the cpan output would indicate the location of the build directory, but I don't see it in the output you posted.
        But the output you posted seems to be corrupted, so I checked the output that *I* get on my machine ... and I still don't see that information being presented.

        It seems that your cpan builds are being done in C:\STRAWB~1\cpan\build - so look for a Crypt-OpenSSL-PBKDF2-0.04-xxxxxx directory in that folder.

        Cheers,
        Rob
Re: How to install libssl-dev for Strawberry Perl on Windows
by Anonymous Monk on Nov 18, 2015 at 09:05 UTC