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

I was hoping someone could help me decipher why the Crypt::SSLeay install is failing under strawberry perl on a windows machine.

I installed the Binary OpenSSL in C:\OpenSSL and when trying to install Crypt::SSLeay get the following:
cpan> install Crypt::SSLeay Running install for module 'Crypt::SSLeay' Running make for D/DL/DLAND/Crypt-SSLeay-0.57.tar.gz Checksum for C:\strawberry\cpan\sources\authors\id\D\DL\DLAND\Crypt-SS +Leay-0.57.tar.gz ok Scanning cache C:\strawberry\cpan\build for sizes ...................................................................... +......DONE CPAN.pm: Going to build D/DL/DLAND/Crypt-SSLeay-0.57.tar.gz ======================================================= Only one OpenSSL installation found at c:\openssl Consider running 'perl Makefile.PL --default' the next time Crypt::SSLeay is upgraded to select this directory automatically thereby avoiding the following prompt. ======================================================= Which SSL install path do you want to use? [c:\openssl] Assuming Vanilla/Strawberry Perl installation BUILD INFORMATION ================================================ ssl library: OpenSSL 0.9.8 in c:\openssl ssl header: openssl/ssl.h libraries: -Lc:\openssl\lib\MinGW -lssleay32 -llibeay32 include dir: -Ic:\openssl\include ================================================ Checking if your kit is complete... Looks good Writing Makefile for Crypt::SSLeay The test suite can attempt to connect to public servers to ensure that the code is working properly. If you are behind a strict firewall or have no network connectivity, these tests may fail (through no fault of the code). Do you want to run the live tests (y/N) ? [N] y cp lib/Crypt/SSLeay/X509.pm blib\lib\Crypt\SSLeay\X509.pm cp lib/Net/SSL.pm blib\lib\Net\SSL.pm cp SSLeay.pm blib\lib\Crypt\SSLeay.pm cp lib/Crypt/SSLeay/Conn.pm blib\lib\Crypt\SSLeay\Conn.pm cp lib/Crypt/SSLeay/CTX.pm blib\lib\Crypt\SSLeay\CTX.pm cp lib/Crypt/SSLeay/MainContext.pm blib\lib\Crypt\SSLeay\MainContext.p +m cp lib/Crypt/SSLeay/Err.pm blib\lib\Crypt\SSLeay\Err.pm C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp + -typemap C:\strawberry\perl\lib\ExtUtils\typemap -typemap typemap SSLeay.xs > SSLeay.xsc && C:\strawberry\perl\bin\pe +rl.exe -MExtUtils::Command -e mv SSLeay.xsc SSLeay .c gcc -c -IC:\strawberry\c\include -s -O2 -DWIN32 -DHAVE_DES_FCRY +PT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fn o-strict-aliasing -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\"0.57\" + -DXS_VERSION=\"0.57\" "-IC:\strawberry\perl\lib \CORE" SSLeay.c Running Mkbootstrap for Crypt::SSLeay () C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e chmod 644 SSLea +y.bs C:\strawberry\perl\bin\perl.exe -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"Crypt::SSLeay\", 'DLBASE' => 'SSLeay', ' +DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" dlltool --def SSLeay.def --output-exp dll.exp g++ -o blib\arch\auto\Crypt\SSLeay\SSLeay.dll -Wl,--base-file -Wl,dll. +base -mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C :\strawberry\c\lib" SSLeay.o -Wl,--image-base,0x322a0000 C:\strawberr +y\perl\lib\CORE\libperl510.a C:\strawberry\c\lib\l ibmsvcrt.a C:\strawberry\c\lib\libmoldname.a C:\strawberry\c\lib\libke +rnel32.a C:\strawberry\c\lib\libuser32.a C:\strawb erry\c\lib\libgdi32.a C:\strawberry\c\lib\libwinspool.a C:\strawberry\ +c\lib\libcomdlg32.a C:\strawberry\c\lib\libadvapi3 2.a C:\strawberry\c\lib\libshell32.a C:\strawberry\c\lib\libole32.a C: +\strawberry\c\lib\liboleaut32.a C:\strawberry\c\li b\libnetapi32.a C:\strawberry\c\lib\libuuid.a C:\strawberry\c\lib\libw +s2_32.a C:\strawberry\c\lib\libmpr.a C:\strawberry \c\lib\libwinmm.a C:\strawberry\c\lib\libversion.a C:\strawberry\c\lib +\libodbc32.a C:\strawberry\c\lib\libodbccp32.a dll .exp SSLeay.o:SSLeay.c:(.text+0x57): undefined reference to `SSL_alert_desc +_string_long' SSLeay.o:SSLeay.c:(.text+0x61): undefined reference to `SSL_alert_type +_string_long' SSLeay.o:SSLeay.c:(.text+0xda): undefined reference to `SSL_state_stri +ng_long' SSLeay.o:SSLeay.c:(.text+0x134): undefined reference to `SSL_state_str +ing_long' SSLeay.o:SSLeay.c:(.text+0x18d): undefined reference to `SSL_state_str +ing_long' SSLeay.o:SSLeay.c:(.text+0x246): undefined reference to `ERR_get_error +' SSLeay.o:SSLeay.c:(.text+0x2dd): undefined reference to `ERR_get_error +' SSLeay.o:SSLeay.c:(.text+0x2f7): undefined reference to `ERR_error_str +ing' SSLeay.o:SSLeay.c:(.text+0x40a): undefined reference to `RAND_load_fil +e' SSLeay.o:SSLeay.c:(.text+0x429): undefined reference to `SSLv2_client_ +method' SSLeay.o:SSLeay.c:(.text+0x431): undefined reference to `SSL_CTX_new' SSLeay.o:SSLeay.c:(.text+0x453): undefined reference to `SSL_CTX_ctrl' SSLeay.o:SSLeay.c:(.text+0x45b): undefined reference to `SSL_CTX_set_d +efault_verify_paths' SSLeay.o:SSLeay.c:(.text+0x46f): undefined reference to `SSL_CTX_set_v +erify' SSLeay.o:SSLeay.c:(.text+0x519): undefined reference to `OPENSSL_add_a +ll_algorithms_noconf' SSLeay.o:SSLeay.c:(.text+0x51e): undefined reference to `SSL_load_erro +r_strings' SSLeay.o:SSLeay.c:(.text+0x523): undefined reference to `ERR_load_cryp +to_strings' SSLeay.o:SSLeay.c:(.text+0x528): undefined reference to `SSL_library_i +nit' SSLeay.o:SSLeay.c:(.text+0x548): undefined reference to `RAND_load_fil +e' SSLeay.o:SSLeay.c:(.text+0x573): undefined reference to `RAND_seed' SSLeay.o:SSLeay.c:(.text+0x581): undefined reference to `SSLv23_client +_method' SSLeay.o:SSLeay.c:(.text+0x591): undefined reference to `SSLv3_client_ +method' SSLeay.o:SSLeay.c:(.text+0x69e): undefined reference to `SSL_CTX_free' SSLeay.o:SSLeay.c:(.text+0x87f): undefined reference to `SSL_CTX_set_c +ipher_list' SSLeay.o:SSLeay.c:(.text+0xb5c): undefined reference to `SSL_CTX_use_c +ertificate_file' SSLeay.o:SSLeay.c:(.text+0xe8c): undefined reference to `SSL_CTX_use_P +rivateKey_file' SSLeay.o:SSLeay.c:(.text+0x11f7): undefined reference to `d2i_PKCS12_f +p' SSLeay.o:SSLeay.c:(.text+0x1252): undefined reference to `PKCS12_parse +' SSLeay.o:SSLeay.c:(.text+0x1277): undefined reference to `SSL_CTX_use_ +certificate' SSLeay.o:SSLeay.c:(.text+0x1285): undefined reference to `X509_free' SSLeay.o:SSLeay.c:(.text+0x1297): undefined reference to `PKCS12_free' SSLeay.o:SSLeay.c:(.text+0x1408): undefined reference to `SSL_CTX_use_ +PrivateKey' SSLeay.o:SSLeay.c:(.text+0x1416): undefined reference to `EVP_PKEY_fre +e' SSLeay.o:SSLeay.c:(.text+0x1547): undefined reference to `SSL_CTX_chec +k_private_key' SSLeay.o:SSLeay.c:(.text+0x17cf): undefined reference to `SSL_CTX_set_ +verify' SSLeay.o:SSLeay.c:(.text+0x1876): undefined reference to `SSL_CTX_load +_verify_locations' SSLeay.o:SSLeay.c:(.text+0x188e): undefined reference to `SSL_CTX_set_ +verify' SSLeay.o:SSLeay.c:(.text+0x19de): undefined reference to `SSL_new' SSLeay.o:SSLeay.c:(.text+0x19e9): undefined reference to `SSL_set_conn +ect_state' SSLeay.o:SSLeay.c:(.text+0x1a0c): undefined reference to `SSL_ctrl' SSLeay.o:SSLeay.c:(.text+0x1b3d): undefined reference to `SSL_set_info +_callback' SSLeay.o:SSLeay.c:(.text+0x1b98): undefined reference to `SSL_set_fd' SSLeay.o:SSLeay.c:(.text+0x1cbe): undefined reference to `SSL_free' SSLeay.o:SSLeay.c:(.text+0x1e99): undefined reference to `SSL_set_fd' SSLeay.o:SSLeay.c:(.text+0x20c7): undefined reference to `SSL_connect' SSLeay.o:SSLeay.c:(.text+0x22e7): undefined reference to `SSL_accept' SSLeay.o:SSLeay.c:(.text+0x2563): undefined reference to `SSL_write' SSLeay.o:SSLeay.c:(.text+0x26d0): undefined reference to `SSL_write' SSLeay.o:SSLeay.c:(.text+0x29f1): undefined reference to `SSL_read' SSLeay.o:SSLeay.c:(.text+0x2d33): undefined reference to `SSL_get_peer +_certificate' SSLeay.o:SSLeay.c:(.text+0x2ee2): undefined reference to `SSL_get_veri +fy_result' SSLeay.o:SSLeay.c:(.text+0x30bf): undefined reference to `SSL_get_shar +ed_ciphers' SSLeay.o:SSLeay.c:(.text+0x32c6): undefined reference to `SSL_get_curr +ent_cipher' SSLeay.o:SSLeay.c:(.text+0x32ce): undefined reference to `SSL_CIPHER_g +et_name' SSLeay.o:SSLeay.c:(.text+0x34ae): undefined reference to `X509_free' SSLeay.o:SSLeay.c:(.text+0x3605): undefined reference to `X509_get_sub +ject_name' SSLeay.o:SSLeay.c:(.text+0x3617): undefined reference to `X509_NAME_on +eline' SSLeay.o:SSLeay.c:(.text+0x363a): undefined reference to `CRYPTO_free' SSLeay.o:SSLeay.c:(.text+0x37d5): undefined reference to `X509_get_iss +uer_name' SSLeay.o:SSLeay.c:(.text+0x37e7): undefined reference to `X509_NAME_on +eline' SSLeay.o:SSLeay.c:(.text+0x380a): undefined reference to `CRYPTO_free' collect2: ld returned 1 exit status dmake.EXE: Error code 129, while making 'blib\arch\auto\Crypt\SSLeay\ +SSLeay.dll' DLAND/Crypt-SSLeay-0.57.tar.gz C:\strawberry\c\bin\dmake.EXE -- NOT OK

Replies are listed 'Best First'.
Re: Crypt:SSLeay Install problem under Strawberry Perl
by grinder (Bishop) on Jun 17, 2008 at 20:11 UTC

    There's something a bit weird in the initial compile:

    gcc -c -IC:\strawberry\c\include -s -O2 -DWIN32 -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX -s -O2 -DVERSION=\"0.57\" -DXS_VERSION=\"0.57\" "-IC:\strawberry\perl\lib\CORE" SSLeay.c

    ... because I don't see a switch like -Ic:\openssl\include but then I don't understand how it manages to compile SSLeay.c without error.

    From the CPAN shell you could try doing a look Crypt::SSLeay and then do a classic perl Makefile.PL and dmake, and see if you see a compiler switch that includes the OpenSSL include directory. At which point I would expect saner results.

    • another intruder with the mooring in the heart of the Perl

      Hey that worked, I learned something new the look command. It all worked like that so thanks.
      hi I have installed openssl 0.9.8b and try to install Net_SSLeay 1.30.i userd following steps perl Makefile.PL dmake then also i got error as dmake: Error code 129, while making 'blib\arch\auto\Net\SSLeay\SSLeay.dll' please give me some solution for this

        Please show us the lines before that as well, otherwise we cannot help you.