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

Re^2: errno in XS not propagating to $! - breaks Net::SSLeay

by nobull (Friar)
on Feb 15, 2008 at 17:56 UTC ( [id://668200]=note: print w/replies, xml ) Need Help??


in reply to Re: errno in XS not propagating to $! - breaks Net::SSLeay
in thread errno in XS not propagating to $! - breaks Net::SSLeay

The compiler that built ActivePerl and your compiler use different C runtime libraries - and that *can* definitely be nasty - though, mostly, it's not an issue. And I think it's quite possibly *not* an issue here.

I've confirmed that the perl.exe process has two CRTL DLLs loaded: msvcr71.dll (7.10.6030.0000) and msvcrt.dll (7.00.2600.2180).

I surmise that both of these export errno and perl58.dll is linking to one and the Net/SSLeay.dll is linking to the other. Thus setting errno in Net/SSLeay.dll does not alter the value of $! in Perl. Indeed now I write this I seem to recall having heard of this exact issue elsewhere.

Anyway, none of this will help you much - except perhaps for the notion that your problem lies with Test::Exception, rather than Net::SSLeay per se.

Thanks, but having placed diagnostic prints of errno and $! just before the and after the return from the XS code and I'm sure I've isolated (and circumvented) this problem. I think it will turn out to be the first of many getting Net::SSLeay to work (see Legacy use of splice() as lvalue).

  • Comment on Re^2: errno in XS not propagating to $! - breaks Net::SSLeay

Replies are listed 'Best First'.
Re^3: errno in XS not propagating to $! - breaks Net::SSLeay
by syphilis (Archbishop) on Feb 16, 2008 at 18:05 UTC
    Finally built Net-SSLeay-1.32 by replacing the existing Makefile.PL with
    use ExtUtils::MakeMaker; WriteMakefile( NAME => 'Net::SSLeay', VERSION_FROM => 'lib/Net/SSLeay.pm', );
    I then ran perl Makefile.PL INC="-IC:/path/to/ssl/include" LIBS="-LC:/path/to/ssl/lib -lssl -lcrypto" followed by dmake.

    Because of the unusual directory structure of the test suite dmake test wouldn't run, so I opted to run the test suite by running perl -Mblib tests.txt where tests.txt contained:
    use warnings; use Test::Harness; my @files = qw ( t/external/08_external.t t/handle/external/10_destroy.t t/handle/external/50_external.t t/handle/local/05_use.t t/local/00_ptr_cast.t t/local/01_pod.t t/local/02_pod_coverage.t t/local/03_use.t t/local/04_basic.t t/local/05_passwd_cb.t t/local/06_tcpecho.t t/local/07_sslecho.t t/local/08_pipe.t t/local/15_bio.t t/local/20_autoload.t t/local/30_error.t t/local/31_rsa_generate_key.t t/local/35_ephemeral.t t/local/50_digest.t t/local/kwalitee.t ); for(@files) {$_ = 'C:/_32/comp/Net-SSLeay-1.32/' . $_} Test::Harness::runtests(@files);
    That throws up one error (test 3 of t/handle/external/10_destroy.t):
    C:/_32/comp/Net-SSLeay-1.32/t/handle/external/10_destroy.....NOK 3# +Failed test 'correct response' # at C:/_32/comp/Net-SSLeay-1.32/t/handle/external/10_destroy.t line + 36. # undef # doesn't match '(?s-xim:^HTTP/1)' C:/_32/comp/Net-SSLeay-1.32/t/handle/external/10_destroy.....ok 5/6# L +ooks like you failed 1 test of 6.
    There were no other failures. Which test was failing for you ?

    Cheers,
    Rob

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-19 06:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found