Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Crypt::SSLeay problem after upgrading to 5.10

by jkeenan1 (Deacon)
on Dec 20, 2007 at 21:58 UTC ( [id://658296]=perlquestion: print w/replies, xml ) Need Help??

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

After upgrading to Perl 5.10 on an Ubuntu Linux box, I went to use a script which, deep inside LWP::UserAgent, uses Crypt::SSLeay. This script worked flawlessly for > 1 year on 5.8. But on 5.10 I got this message.

Crypt::SSLeay not installed: /usr/local/bin/myscript.pl (via LWP) will support https URLs if the Cr +ypt::SSLeay module is installed.

I then tried to use the cpan shell to install Crypt::SSLeay. I got this message:

This host looks like it is running Debian. Crypt::SSLeay needs to be c +ompiled with C headers that the libssl-dev package makes available. P +lease install that package before trying to build this module. (You c +an always deinstall the package afterwards, once Crypt::SSLeay has be +en built). Which SSL install path do you want to use?

Finally, when I went to (re-)install libssl-dev, I got the following message through both apt-get and the Synaptic Package Manager:

[~] 503 $ sudo apt-get install libssl-dev Reading package lists... Done Building dependency tree... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. Since you only requested a single operation it is extremely likely tha +t the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation: The following packages have unmet dependencies: libssl-dev: Depends: zlib1g-dev but it is not going to be installed E: Broken packages [~] 504 $ sudo apt-get install zlib1g-dev Reading package lists... Done Building dependency tree... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. Since you only requested a single operation it is extremely likely tha +t the package is simply not installable and a bug report against that package should be filed. The following information may help to resolve the situation: The following packages have unmet dependencies: zlib1g-dev: Depends: zlib1g (= 1:1.2.3-6ubuntu4) but 1:1.2.3-13ubunt +u2 is to be installed
Suggestions as to how to proceed? Thanks in advance.
Jim Keenan

Replies are listed 'Best First'.
Re: Crypt::SSLeay problem after upgrading to 5.10
by crunchi (Initiate) on Dec 20, 2007 at 22:10 UTC
    Perhaps try to download the source from cpan. Then run perl makefile.PL make make install. Sometimes you can get more useful error messages this way...
      Did not get significantly better results:

      [Crypt-SSLeay-0.57] 511 $ perl Makefile.PL ====================================================================== +== No installed SSL libraries found in any of the following places. /local /local/ssl /opt/ssl /usr /usr/local /usr/local/ssl /usr/local/openssl You will have to either specify a directory location at the following prompt, or rerun the Makefile.PL program and use the --lib switch to specify the path. If the path in question is considered standard on your platform, please consider filing a bug report in order to have it taken into account in a subsequent version of Crypt::SSLeay. This host looks like it is running Debian. Crypt::SSLeay needs to be compiled with C headers that the libssl-dev package makes available. Please install that package before trying to build this module. (You can always deinstall the package afterwards, once Crypt::SSLeay has been built). Which SSL install path do you want to use? /usr/lib /usr/lib does not appear to be an SSL library installation, since the required header files were not found. The build cannot proceed.

      Jim Keenan
Re: Crypt::SSLeay problem after upgrading to 5.10
by eserte (Deacon) on Dec 20, 2007 at 22:53 UTC
    I think you should follow this note in the apt-get message:
    a bug report against that package should be filed
Re: Crypt::SSLeay problem after upgrading to 5.10
by almut (Canon) on Dec 20, 2007 at 23:13 UTC

    I agree with eserte, but if you can't or don't want to wait until the dependency issue is fixed, you could - as a temporary solution - try to build openssl (libssl) from the sources yourself and put it under /usr/local. (You might or might not need to build zlib as well.)  Then, once the deb package issue is sorted out, you would simply rebuild the Perl module the way you tried it now, and delete the temp stuff in /usr/local.

      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
        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).

Re: Crypt::SSLeay problem after upgrading to 5.10
by grinder (Bishop) on Dec 21, 2007 at 09:42 UTC

    Hmm, well, I maintain Crypt::SSLeay and I did take care to check that it builds correctly with 5.10 (well, to be honest, I haven't had the time to check with the official 5.10 build, but I tracked bleadperl since I took over the maintenance).

    The "this looks like a Debian host" message in the output from Makefile.PL is something I added based on feedback from another Debian user, who tracked down the library dependency problem.

    From what I can see here, it doesn't look like Crypt::SSLeay per se is at fault, but rather the 1:1.2.3-6ubuntu4 versus 1:1.2.3-13ubuntu2 issue that needs to be resolved. Nevertheless, if I can be of help, feel free to open a ticket on the RT queue.

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

      Further evidence that this is a dependency problem: I just managed to successfully upgrade on Darwin with 5.10. The upgrade was successful except for this one warning thrown repeatedly during make test:

      t/00-basic......ok 7/12Use of uninitialized value $owner in substituti +on (s///) at /usr/local/lib/perl5/site_perl/5.8.7/darwin-2level/Pod/C +overage.pm line 288.
      Jim Keenan

      Yes, I too believe that this is more of a dependency problem than a problem with the Perl module per se -- but these seem to be endemic with this module. I recall having great difficulty trying to install it on Win32 last year. But I know it was previously working on this very same Ubuntu box with 5.8.

      Jim Keenan
      1. Grinder: I didn't see almut's Dec 21 posting until today. Does that indicate problems in the module?

      2. In the last few weeks I've had to re-install modules that contain XS code on each of three boxes. Often I've had a program fail because some module inside of some other module needed an upgrade -- most frequently, HTML::Parser. I've managed to get all the modules I needed upgraded on all three boxes -- except this case of Crypt::SSLeay on Ubuntu.

      Jim Keenan
Re: Crypt::SSLeay problem after upgrading to 5.10
by Anonymous Monk on Dec 20, 2007 at 23:59 UTC
    I installed 5.10.0, but I installed it as a development version and put it in /opt. I had to reinstall all the modules that I had for 5.8.8. You might have to do the same thing...
      I took it as given that I would have to recompile modules such as Crypt::SSLeay that contain XS code. Term::ReadKey and Devel::Cover, for example, both of which compiled without error on Linux. Crypt::SSLeay was the only one I needed right away that experienced these problems.

      While I'm not averse to filing a bug report with Debian or Ubuntu, I'm puzzled as to what this means:

      zlib1g-dev: Depends: zlib1g (= 1:1.2.3-6ubuntu4) but 1:1.2.3-13ubuntu2 + is to be installed
      ... particularly the to be installed part
        zlib1g (= 1:1.2.3-6ubuntu4) probably refers to Dapper. zlib1g (= 1:1.2.3-13ubuntu2 probably refers to Edgy Eft, which is Ubuntu version 6.10 or thereabouts. It seems that it wants the Edgy version. Agreed, it's puzzling.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-23 06:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found