in reply to Re: Crypt::SSLeay problem after upgrading to 5.10
in thread Crypt::SSLeay problem after upgrading to 5.10

I decided to try and follow your suggestion to build OpenSSL from source and did so. I then tried again to install (upgrade, really) Crypt::SSLeay. This time, Crypt::SSLeay detected the presence of OpenSSS -- but could not complete make successfully.

cpan[1]> install Crypt::SSLeay CPAN: Storable loaded ok (v2.18) Going to read /root/.cpan/Metadata Database was generated on Thu, 20 Dec 2007 15:37:59 GMT CPAN: YAML loaded ok (v0.66) Going to read /root/.cpan/build/ ...................................................................... +......DONEFound 3 old builds, restored the state of 3 Running install for module 'Crypt::SSLeay' Running make for D/DL/DLAND/Crypt-SSLeay-0.57.tar.gz CPAN: Digest::SHA loaded ok (v5.45) CPAN: Compress::Zlib loaded ok (v2.008) Checksum for /root/.cpan/sources/authors/id/D/DL/DLAND/Crypt-SSLeay-0. +57.tar.gz ok Scanning cache /root/.cpan/build for sizes ...................................................................... +......DONECrypt-SSLeay-0.57 Crypt-SSLeay-0.57/t Crypt-SSLeay-0.57/Changes Crypt-SSLeay-0.57/lib Crypt-SSLeay-0.57/certs Crypt-SSLeay-0.57/MANIFEST Crypt-SSLeay-0.57/TODO Crypt-SSLeay-0.57/typemap Crypt-SSLeay-0.57/MANIFEST.SKIP Crypt-SSLeay-0.57/eg Crypt-SSLeay-0.57/SSLeay.pm Crypt-SSLeay-0.57/SSLeay.xs Crypt-SSLeay-0.57/README Crypt-SSLeay-0.57/Makefile.PL Crypt-SSLeay-0.57/META.yml Crypt-SSLeay-0.57/eg/lwp-ssl-test Crypt-SSLeay-0.57/eg/net-ssl-test Crypt-SSLeay-0.57/certs/ca-bundle.crt Crypt-SSLeay-0.57/certs/notacakeynopass.pem Crypt-SSLeay-0.57/certs/notacacert.pem Crypt-SSLeay-0.57/lib/Crypt Crypt-SSLeay-0.57/lib/Net Crypt-SSLeay-0.57/lib/Net/SSL.pm Crypt-SSLeay-0.57/lib/Crypt/SSLeay Crypt-SSLeay-0.57/lib/Crypt/SSLeay/MainContext.pm Crypt-SSLeay-0.57/lib/Crypt/SSLeay/Conn.pm Crypt-SSLeay-0.57/lib/Crypt/SSLeay/X509.pm Crypt-SSLeay-0.57/lib/Crypt/SSLeay/Err.pm Crypt-SSLeay-0.57/lib/Crypt/SSLeay/CTX.pm Crypt-SSLeay-0.57/t/00-basic.t Crypt-SSLeay-0.57/t/02-live.t Crypt-SSLeay-0.57/t/01-connect.t CPAN: File::Temp loaded ok (v0.18) CPAN.pm: Going to build D/DL/DLAND/Crypt-SSLeay-0.57.tar.gz ======================================================= Only one OpenSSL installation found at /usr/local/ssl 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? [/usr/local/ssl] BUILD INFORMATION ================================================ ssl library: OpenSSL 0.9.8 in /usr/local/ssl ssl header: openssl/ssl.h libraries: -L/usr/local/ssl/lib -lssl -lcrypto -lgcc include dir: -I/usr/local/ssl/include/openssl ================================================ Checking if your kit is complete... Looks good Note (probably harmless): No library found for -lgcc 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] 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/MainContext.pm blib/lib/Crypt/SSLeay/MainContext.p +m 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/Err.pm blib/lib/Crypt/SSLeay/Err.pm /usr/local/bin/perl /usr/local/lib/perl5/5.10.0/ExtUtils/xsubpp -type +map /usr/local/lib/perl5/5.10.0/ExtUtils/typemap -typemap typemap SS +Leay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c cc -c -I/usr/local/ssl/include/openssl -fno-strict-aliasing -pipe -I/ +usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -D +VERSION=\"0.57\" -DXS_VERSION=\"0.57\" -fPIC "-I/usr/local/lib/perl5/ +5.10.0/i686-linux/CORE" SSLeay.c In file included from SSLeay.xs:25: crypt_ssleay_version.h:1:25: error: openssl/ssl.h: No such file or dir +ectory crypt_ssleay_version.h:2:28: error: openssl/crypto.h: No such file or +directory crypt_ssleay_version.h:3:25: error: openssl/err.h: No such file or dir +ectory crypt_ssleay_version.h:4:26: error: openssl/rand.h: No such file or di +rectory crypt_ssleay_version.h:5:28: error: openssl/pkcs12.h: No such file or +directory SSLeay.xs:43: error: syntax error before '*' token SSLeay.xs: In function 'InfoCallback': SSLeay.xs:48: error: 'where' undeclared (first use in this function) SSLeay.xs:48: error: (Each undeclared identifier is reported only once SSLeay.xs:48: error: for each function it appears in.) SSLeay.xs:48: error: 'SSL_ST_MASK' undeclared (first use in this funct +ion) SSLeay.xs:50: error: 'SSL_ST_CONNECT' undeclared (first use in this fu +nction) SSLeay.xs:52: error: 'SSL_ST_ACCEPT' undeclared (first use in this fun +ction) SSLeay.xs:57: error: 'SSL_CB_LOOP' undeclared (first use in this funct +ion) SSLeay.xs:58: error: 's' undeclared (first use in this function) SSLeay.xs:60: error: 'SSL_CB_ALERT' undeclared (first use in this func +tion) SSLeay.xs:61: error: 'SSL_CB_READ' undeclared (first use in this funct +ion) SSLeay.xs:63: error: 'ret' undeclared (first use in this function) SSLeay.xs:66: error: 'SSL_CB_EXIT' undeclared (first use in this funct +ion) SSLeay.c: In function 'XS_Crypt__SSLeay__CTX_new': SSLeay.c:134: error: 'SSL_CTX' undeclared (first use in this function) SSLeay.c:134: error: 'RETVAL' undeclared (first use in this function) SSLeay.xs:102: error: 'ctx' undeclared (first use in this function) SSLeay.xs:135: error: 'SSL_OP_ALL' undeclared (first use in this funct +ion) SSLeay.xs:137: error: 'SSL_VERIFY_NONE' undeclared (first use in this +function) SSLeay.c: In function 'XS_Crypt__SSLeay__CTX_free': SSLeay.c:194: error: 'SSL_CTX' undeclared (first use in this function) SSLeay.c:194: error: 'ctx' undeclared (first use in this function) SSLeay.c:198: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__CTX_set_cipher_list': SSLeay.c:221: error: 'SSL_CTX' undeclared (first use in this function) SSLeay.c:221: error: 'ctx' undeclared (first use in this function) SSLeay.c:228: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__CTX_use_certificate_file': SSLeay.c:252: error: 'SSL_CTX' undeclared (first use in this function) SSLeay.c:252: error: 'ctx' undeclared (first use in this function) SSLeay.c:260: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__CTX_use_PrivateKey_file': SSLeay.c:284: error: 'SSL_CTX' undeclared (first use in this function) SSLeay.c:284: error: 'ctx' undeclared (first use in this function) SSLeay.c:292: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__CTX_use_pkcs12_file': SSLeay.c:316: error: 'SSL_CTX' undeclared (first use in this function) SSLeay.c:316: error: 'ctx' undeclared (first use in this function) SSLeay.xs:170: error: 'EVP_PKEY' undeclared (first use in this functio +n) SSLeay.xs:170: error: 'pkey' undeclared (first use in this function) SSLeay.xs:171: error: 'X509' undeclared (first use in this function) SSLeay.xs:171: error: 'cert' undeclared (first use in this function) SSLeay.xs:172: error: 'ca' undeclared (first use in this function) SSLeay.xs:173: error: 'PKCS12' undeclared (first use in this function) SSLeay.xs:173: error: 'p12' undeclared (first use in this function) SSLeay.c:331: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__CTX_check_private_key': SSLeay.c:373: error: 'SSL_CTX' undeclared (first use in this function) SSLeay.c:373: error: 'ctx' undeclared (first use in this function) SSLeay.c:379: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__CTX_set_verify': SSLeay.c:403: error: 'SSL_CTX' undeclared (first use in this function) SSLeay.c:403: error: 'ctx' undeclared (first use in this function) SSLeay.c:412: error: syntax error before ')' token SSLeay.xs:212: error: 'SSL_VERIFY_NONE' undeclared (first use in this +function) SSLeay.xs:217: error: 'SSL_VERIFY_PEER' undeclared (first use in this +function) SSLeay.c: In function 'XS_Crypt__SSLeay__Conn_new': SSLeay.c:450: error: 'SSL_CTX' undeclared (first use in this function) SSLeay.c:450: error: 'ctx' undeclared (first use in this function) SSLeay.xs:231: error: 'SSL' undeclared (first use in this function) SSLeay.xs:231: error: 'ssl' undeclared (first use in this function) SSLeay.c:455: error: 'RETVAL' undeclared (first use in this function) SSLeay.c:459: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__Conn_free': SSLeay.c:510: error: 'SSL' undeclared (first use in this function) SSLeay.c:510: error: 'ssl' undeclared (first use in this function) SSLeay.c:514: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__Conn_set_fd': SSLeay.c:537: error: 'SSL' undeclared (first use in this function) SSLeay.c:537: error: 'ssl' undeclared (first use in this function) SSLeay.c:544: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__Conn_connect': SSLeay.c:568: error: 'SSL' undeclared (first use in this function) SSLeay.c:568: error: 'ssl' undeclared (first use in this function) SSLeay.c:574: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__Conn_accept': SSLeay.c:598: error: 'SSL' undeclared (first use in this function) SSLeay.c:598: error: 'ssl' undeclared (first use in this function) SSLeay.c:604: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__Conn_write': SSLeay.c:628: error: 'SSL' undeclared (first use in this function) SSLeay.c:628: error: 'ssl' undeclared (first use in this function) SSLeay.c:640: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__Conn_read': SSLeay.c:690: error: 'SSL' undeclared (first use in this function) SSLeay.c:690: error: 'ssl' undeclared (first use in this function) SSLeay.c:703: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__Conn_get_peer_certificate': SSLeay.c:761: error: 'SSL' undeclared (first use in this function) SSLeay.c:761: error: 'ssl' undeclared (first use in this function) SSLeay.c:762: error: 'X509' undeclared (first use in this function) SSLeay.c:762: error: 'RETVAL' undeclared (first use in this function) SSLeay.c:766: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__Conn_get_verify_result': SSLeay.c:791: error: 'SSL' undeclared (first use in this function) SSLeay.c:791: error: 'ssl' undeclared (first use in this function) SSLeay.c:796: error: syntax error before ')' token SSLeay.xs:373: error: 'X509_V_OK' undeclared (first use in this functi +on) SSLeay.c: In function 'XS_Crypt__SSLeay__Conn_get_shared_ciphers': SSLeay.c:822: error: 'SSL' undeclared (first use in this function) SSLeay.c:822: error: 'ssl' undeclared (first use in this function) SSLeay.c:831: error: syntax error before ')' token SSLeay.xs:383: warning: assignment makes pointer from integer without +a cast SSLeay.c: In function 'XS_Crypt__SSLeay__Conn_get_cipher': SSLeay.c:856: error: 'SSL' undeclared (first use in this function) SSLeay.c:856: error: 'ssl' undeclared (first use in this function) SSLeay.c:862: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__X509_free': SSLeay.c:887: error: 'X509' undeclared (first use in this function) SSLeay.c:887: error: 'cert' undeclared (first use in this function) SSLeay.c:891: error: syntax error before ')' token SSLeay.c: In function 'XS_Crypt__SSLeay__X509_subject_name': SSLeay.c:914: error: 'X509' undeclared (first use in this function) SSLeay.c:914: error: 'cert' undeclared (first use in this function) SSLeay.c:922: error: syntax error before ')' token SSLeay.xs:407: warning: assignment makes pointer from integer without +a cast SSLeay.c: In function 'XS_Crypt__SSLeay__X509_issuer_name': SSLeay.c:950: error: 'X509' undeclared (first use in this function) SSLeay.c:950: error: 'cert' undeclared (first use in this function) SSLeay.c:958: error: syntax error before ')' token SSLeay.xs:419: warning: assignment makes pointer from integer without +a cast SSLeay.c: In function 'XS_Crypt__SSLeay__X509_get_notBeforeString': SSLeay.c:986: error: 'X509' undeclared (first use in this function) SSLeay.c:986: error: 'cert' undeclared (first use in this function) SSLeay.c:992: error: syntax error before ')' token SSLeay.xs:429: error: invalid type argument of '->' SSLeay.c: In function 'XS_Crypt__SSLeay__X509_get_notAfterString': SSLeay.c:1017: error: 'X509' undeclared (first use in this function) SSLeay.c:1017: error: 'cert' undeclared (first use in this function) SSLeay.c:1023: error: syntax error before ')' token SSLeay.xs:437: error: invalid type argument of '->' make: *** [SSLeay.o] Error 1 DLAND/Crypt-SSLeay-0.57.tar.gz /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Failed during this command: DLAND/Crypt-SSLeay-0.57.tar.gz : make NO
Jim Keenan

Replies are listed 'Best First'.
Re^3: Crypt::SSLeay problem after upgrading to 5.10
by almut (Canon) on Dec 21, 2007 at 23:02 UTC
    cc -c  -I/usr/local/ssl/include/openssl -fno-strict-aliasing -pipe -I/usr/local/include
    -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2   -DVERSION=\"0.57\" -DXS_VERSION=\"0.57\"
    -fPIC "-I/usr/local/lib/perl5/5.10.0/i686-linux/CORE"   SSLeay.c
    In file included from SSLeay.xs:25:
    crypt_ssleay_version.h:1:25: error: openssl/ssl.h: No such file or directory
    

    It doesn't find the header(s) because it's looking in /usr/local/ssl/include/openssl/openssl/ssl.h — i.e. one openssl path fragment too much. (The relative path fragment from the #include "openssl/ssl.h" directive is simply being appended to any search paths specified via -I)

    It's probably easiest to just move the openssl include directory into /usr/local/include, as that's already specified on the compiler's command line (-I/usr/local/include).

      No luck.

      Found multiple possibilities for OpenSSL /usr/local (OpenSSL 0.9.8) /usr/local/ssl (OpenSSL 0.9.8) Which SSL install path do you want to use? [/usr/local] BUILD INFORMATION ================================================ ssl library: OpenSSL 0.9.8 in /usr/local ssl header: openssl/ssl.h libraries: -L/usr/local/../lib -lssl -lcrypto -lgcc include dir: -I/usr/local/include/openssl ================================================ Checking if your kit is complete... Looks good Note (probably harmless): No library found for -lgcc 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] 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/MainContext.pm blib/lib/Crypt/SSLeay/MainContext.p +m 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/Err.pm blib/lib/Crypt/SSLeay/Err.pm /usr/local/bin/perl /usr/local/lib/perl5/5.10.0/ExtUtils/xsubpp -type +map /usr/local/lib/perl5/5.10.0/ExtUtils/typemap -typemap typemap SS +Leay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c cc -c -I/usr/local/include/openssl -fno-strict-aliasing -pipe -I/usr/ +local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERS +ION=\"0.57\" -DXS_VERSION=\"0.57\" -fPIC "-I/usr/local/lib/perl5/5.10 +.0/i686-linux/CORE" SSLeay.c Running Mkbootstrap for Crypt::SSLeay () chmod 644 SSLeay.bs rm -f blib/arch/auto/Crypt/SSLeay/SSLeay.so LD_RUN_PATH="/usr/local/../lib" cc -shared -O2 -L/usr/local/lib SSLea +y.o -o blib/arch/auto/Crypt/SSLeay/SSLeay.so \ -L/usr/local/../lib -lssl -lcrypto \ /usr/bin/ld: cannot find -lssl collect2: ld returned 1 exit status make: *** [blib/arch/auto/Crypt/SSLeay/SSLeay.so] Error 1 DLAND/Crypt-SSLeay-0.57.tar.gz /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible Failed during this command: DLAND/Crypt-SSLeay-0.57.tar.gz : make NO

      Jim Keenan