Warning: This post is long and no speel chicked :)
XS extension dlls export a single entrypoint of the form: boot_package_name. In order for that to be exported, a .def file containg that information must be supplied to the linker. If you look in the directory where you built the package, you should see it. And it should look like this:
C:\Perl510\packages\Crypt-SSLeay-0.57>type ssleay.def
LIBRARY "SSLeay"
EXPORTS
boot_Crypt__SSLeay
_boot_Crypt__SSLeay = boot_Crypt__SSLeay
The error message you listed above is indicative that the dll was built without that information and so that entrypoint was not exported and so could not be found.
But I am surprised you are getting that far. When I try to build it using the makefile produced by makefile.pl I get:
C:\Perl510\packages\Crypt-SSLeay-0.57>nmake
Microsoft (R) Program Maintenance Utility Version 7.00.9466
Copyright (C) Microsoft Corporation. All rights reserved.
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:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils/xsubpp -typemap C:\
+Perl\lib\ExtUtils\typemap -typemap typemap SSLeay.xs > SSLeay.xsc &&
+ C:\Perl\bin\perl.exe -MExtUtils::Command -e mv SSLeay.xsc SSLeay.c
cl -c -Ic:\openssl\include -nologo -Gf -W3 -MD -Zi -DNDEBUG
+-O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DNO_HASH_SEED -
+DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT
+_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"0.57\" -DXS_VERSION=\"0
+.57\" "-IC:\Perl\lib\CORE" SSLeay.c
cl : Command line warning D4029 : optimization is not available in the
+ standard edition compiler
SSLeay.c
SSLeay.xs(294) : warning C4018: '>' : signed/unsigned mismatch
SSLeay.xs(298) : warning C4018: '>=' : signed/unsigned mismatch
SSLeay.xs(301) : warning C4018: '>' : signed/unsigned mismatch
SSLeay.xs(333) : warning C4018: '>' : signed/unsigned mismatch
SSLeay.xs(341) : warning C4018: '>' : signed/unsigned mismatch
SSLeay.xs(349) : warning C4018: '<' : signed/unsigned mismatch
Running Mkbootstrap for Crypt::SSLeay ()
C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod 644 SSLeay.b
+s
C:\Perl\bin\perl.exe -MExtUtils::Mksymlists -e "Mksymlists('N
+AME'=>\"Crypt::SSLeay\", 'DLBASE' => 'SSLeay', 'DL_FUNCS' => { }, 'F
+UNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
**************************************************
link -out:blib\arch\auto\Crypt\SSLeay\SSLeay.dll
-dll -nologo -nodefaultlib -debug -opt:ref,icf
-libpath:"C:\Perl\lib\CORE"
-machine:x86 SSLeay.obj
C:\Perl\lib\CORE\perl58.lib
c:\cl\lib\oldnames.lib
c:\cl\lib\kernel32.lib
c:\cl\lib\user32.lib
c:\cl\lib\gdi32.lib
c:\cl\lib\winspool.lib
c:\cl\lib\comdlg32.lib
c:\cl\lib\advapi32.lib
c:\cl\lib\shell32.lib
c:\cl\lib\ole32.lib
c:\cl\lib\oleaut32.lib
c:\cl\lib\netapi32.lib
c:\cl\lib\uuid.lib
c:\cl\lib\ws2_32.lib
c:\cl\lib\mpr.lib
c:\cl\lib\winmm.lib
c:\cl\lib\version.lib
c:\cl\lib\odbc32.lib
c:\cl\lib\odbccp32.lib
c:\cl\lib\msvcrt.lib
-def:SSLeay.def
*****************************************************
Creating library blib\arch\auto\Crypt\SSLeay\SSLeay.lib and object
+blib\arch\auto\Crypt\SSLeay\SSLeay.exp
SSLeay.obj : error LNK2019: unresolved external symbol _ERR_error_stri
+ng referenced in function _XS_Crypt__SSLeay__Err_get_error_string
SSLeay.obj : error LNK2019: unresolved external symbol _ERR_get_error
+referenced in function _XS_Crypt__SSLeay__Err_get_error_string
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_CTX_set_ve
+rify referenced in function _XS_Crypt__SSLeay__CTX_new
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_CTX_set_de
+fault_verify_paths referenced in function _XS_Crypt__SSLeay__CTX_new
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_CTX_ctrl r
+eferenced in function _XS_Crypt__SSLeay__CTX_new
SSLeay.obj : error LNK2019: unresolved external symbol _SSLv2_client_m
+ethod referenced in function _XS_Crypt__SSLeay__CTX_new
SSLeay.obj : error LNK2019: unresolved external symbol _SSLv3_client_m
+ethod referenced in function _XS_Crypt__SSLeay__CTX_new
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_CTX_new re
+ferenced in function _XS_Crypt__SSLeay__CTX_new
SSLeay.obj : error LNK2019: unresolved external symbol _SSLv23_client_
+method referenced in function _XS_Crypt__SSLeay__CTX_new
SSLeay.obj : error LNK2019: unresolved external symbol _RAND_seed refe
+renced in function _XS_Crypt__SSLeay__CTX_new
SSLeay.obj : error LNK2019: unresolved external symbol _RAND_load_file
+ referenced in function _XS_Crypt__SSLeay__CTX_new
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_library_in
+it referenced in function _XS_Crypt__SSLeay__CTX_new
SSLeay.obj : error LNK2019: unresolved external symbol _ERR_load_crypt
+o_strings referenced in function _XS_Crypt__SSLeay__CTX_new
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_load_error
+_strings referenced in function _XS_Crypt__SSLeay__CTX_new
SSLeay.obj : error LNK2019: unresolved external symbol _OPENSSL_add_al
+l_algorithms_noconf referenced in function _XS_Crypt__SSLeay__CTX_new
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_CTX_free r
+eferenced in function _XS_Crypt__SSLeay__CTX_free
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_CTX_set_ci
+pher_list referenced in function _XS_Crypt__SSLeay__CTX_set_cipher_li
+st
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_CTX_use_ce
+rtificate_file referenced in function _XS_Crypt__SSLeay__CTX_use_cert
+ificate_file
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_CTX_use_Pr
+ivateKey_file referenced in function _XS_Crypt__SSLeay__CTX_use_Priva
+teKey_file
SSLeay.obj : error LNK2019: unresolved external symbol _PKCS12_free re
+ferenced in function _XS_Crypt__SSLeay__CTX_use_pkcs12_file
SSLeay.obj : error LNK2019: unresolved external symbol _X509_free refe
+renced in function _XS_Crypt__SSLeay__CTX_use_pkcs12_file
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_CTX_use_ce
+rtificate referenced in function _XS_Crypt__SSLeay__CTX_use_pkcs12_fi
+le
SSLeay.obj : error LNK2019: unresolved external symbol _EVP_PKEY_free
+referenced in function _XS_Crypt__SSLeay__CTX_use_pkcs12_file
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_CTX_use_Pr
+ivateKey referenced in function _XS_Crypt__SSLeay__CTX_use_pkcs12_fil
+e
SSLeay.obj : error LNK2019: unresolved external symbol _PKCS12_parse r
+eferenced in function _XS_Crypt__SSLeay__CTX_use_pkcs12_file
SSLeay.obj : error LNK2019: unresolved external symbol _d2i_PKCS12_fp
+referenced in function _XS_Crypt__SSLeay__CTX_use_pkcs12_file
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_CTX_check_
+private_key referenced in function _XS_Crypt__SSLeay__CTX_check_priva
+te_key
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_CTX_load_v
+erify_locations referenced in function _XS_Crypt__SSLeay__CTX_set_ver
+ify
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_set_fd ref
+erenced in function _XS_Crypt__SSLeay__Conn_new
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_set_info_c
+allback referenced in function _XS_Crypt__SSLeay__Conn_new
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_ctrl refer
+enced in function _XS_Crypt__SSLeay__Conn_new
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_set_connec
+t_state referenced in function _XS_Crypt__SSLeay__Conn_new
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_new refere
+nced in function _XS_Crypt__SSLeay__Conn_new
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_alert_type
+_string_long referenced in function _InfoCallback
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_alert_desc
+_string_long referenced in function _InfoCallback
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_state_stri
+ng_long referenced in function _InfoCallback
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_free refer
+enced in function _XS_Crypt__SSLeay__Conn_free
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_connect re
+ferenced in function _XS_Crypt__SSLeay__Conn_connect
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_accept ref
+erenced in function _XS_Crypt__SSLeay__Conn_accept
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_write refe
+renced in function _XS_Crypt__SSLeay__Conn_write
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_read refer
+enced in function _XS_Crypt__SSLeay__Conn_read
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_get_peer_c
+ertificate referenced in function _XS_Crypt__SSLeay__Conn_get_peer_ce
+rtificate
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_get_verify
+_result referenced in function _XS_Crypt__SSLeay__Conn_get_verify_res
+ult
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_get_shared
+_ciphers referenced in function _XS_Crypt__SSLeay__Conn_get_shared_ci
+phers
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_CIPHER_get
+_name referenced in function _XS_Crypt__SSLeay__Conn_get_cipher
SSLeay.obj : error LNK2019: unresolved external symbol _SSL_get_curren
+t_cipher referenced in function _XS_Crypt__SSLeay__Conn_get_cipher
SSLeay.obj : error LNK2019: unresolved external symbol _CRYPTO_free re
+ferenced in function _XS_Crypt__SSLeay__X509_subject_name
SSLeay.obj : error LNK2019: unresolved external symbol _X509_NAME_onel
+ine referenced in function _XS_Crypt__SSLeay__X509_subject_name
SSLeay.obj : error LNK2019: unresolved external symbol _X509_get_subje
+ct_name referenced in function _XS_Crypt__SSLeay__X509_subject_name
SSLeay.obj : error LNK2019: unresolved external symbol _X509_get_issue
+r_name referenced in function _XS_Crypt__SSLeay__X509_issuer_name
blib\arch\auto\Crypt\SSLeay\SSLeay.dll : fatal error LNK1120: 50 unres
+olved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.
Amd if you take a look at the link command line that I wrapped and put between ***s above, you'll see that nowhere were ssleay32.lib or libeay32.lib mentioned. This despite the fact that makefile.pl noted the following information:
BUILD INFORMATION
================================================
ssl library: OpenSSL 0.9.8 in c:\openssl
ssl header: openssl/ssl.h
libraries: -Lc:\openssl\lib -lssleay32 -llibeay32
include dir: -Ic:\openssl\include
================================================
Now that may be because I just installed the latest version of openssl and it doesn't contain those libraries in that path. It contains libraries in paths below that:
c:\OpenSSL\lib>dir /s
Volume in drive C has no label.
Volume Serial Number is BCCA-B4CC
Directory of c:\OpenSSL\lib
2008-03-28 23:12 <DIR> .
2008-03-28 23:12 <DIR> ..
2008-03-28 23:12 <DIR> Builder5
2008-03-28 23:12 <DIR> MinGW
2008-03-28 23:12 <DIR> VC
0 File(s) 0 bytes
Directory of c:\OpenSSL\lib\Builder5
2008-03-28 23:12 <DIR> .
2008-03-28 23:12 <DIR> ..
2007-10-22 17:50 387,584 libeay32.lib
2007-10-22 17:50 30,720 ssleay32.lib
2 File(s) 418,304 bytes
Directory of c:\OpenSSL\lib\MinGW
2008-03-28 23:12 <DIR> .
2008-03-28 23:12 <DIR> ..
2007-10-22 17:50 2,268,690 libeay32.a
2007-10-22 17:50 186,013 libeay32.def
2007-10-22 17:50 169,454 ssleay32.a
2007-10-22 17:50 14,089 ssleay32.def
4 File(s) 2,638,246 bytes
Directory of c:\OpenSSL\lib\VC
2008-03-28 23:12 <DIR> .
2008-03-28 23:12 <DIR> ..
2007-10-22 07:10 664,514 libeay32MD.lib
2007-10-22 07:23 664,514 libeay32MDd.lib
2007-10-22 07:16 664,514 libeay32MT.lib
2007-10-22 07:29 664,514 libeay32MTd.lib
2007-10-22 07:10 52,184 ssleay32MD.lib
2007-10-22 07:23 52,184 ssleay32MDd.lib
2007-10-22 07:16 52,184 ssleay32MT.lib
2007-10-22 07:29 52,184 ssleay32MTd.lib
2008-03-28 23:12 <DIR> static
8 File(s) 2,866,792 bytes
Directory of c:\OpenSSL\lib\VC\static
2008-03-28 23:12 <DIR> .
2008-03-28 23:12 <DIR> ..
2007-10-22 07:13 3,910,220 libeay32MD.lib
2007-10-22 07:26 3,910,690 libeay32MDd.lib
2007-10-22 07:19 3,908,664 libeay32MT.lib
2007-10-22 07:32 3,909,154 libeay32MTd.lib
2007-10-22 07:13 663,258 ssleay32MD.lib
2007-10-22 07:26 663,302 ssleay32MDd.lib
2007-10-22 07:20 662,856 ssleay32MT.lib
2007-10-22 07:33 662,904 ssleay32MTd.lib
8 File(s) 18,291,048 bytes
Total Files Listed:
22 File(s) 24,214,390 bytes
14 Dir(s) 11,938,512,896 bytes free
And if I c&p the link command from above and add references to
c:\OpenSSL\lib\VC\libeay32MT.lib
c:\OpenSSL\lib\VC\ssleay32MT.lib
it now builds and tests correctly.
Then the problem is that when I type nmake install, it insists installing the files into my perl 5.8 directory rather than Perl5.10. despite that I used perl510 when runninh makefile.pl:
C:\Perl510\packages\Crypt-SSLeay-0.57>perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration
+:
Platform:
osname=MSWin32, osvers=5.00, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
useithreads=define, usemultiplicity=define
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=und
+ef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D
+_CONSOLE -DNO_STRICT -
optimize='-MD -Zi -DNDEBUG -O1',
cppflags='-DWIN32'
ccversion='12.00.8804', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64
+', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -l
+ibpath:"C:\Perl510\lib
libpth=\lib
libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
+ comdlg32.lib advapi3
perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool
+.lib comdlg32.lib adv
libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl510.lib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:
+ref,icf -libpath:"C:\
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS
USE_LARGE_FILES USE_PERLIO USE_SITECUSTOMIZE
Locally applied patches:
ActivePerl Build 1000 [283192] Beta
perl-current@32448
Built under MSWin32
Compiled at Nov 22 2007 14:37:48
@INC:
c:/perl510/lib
c:/perl510/site/lib
.
And have ensured that neither my path, nor environment have any mention of my perl5.8 direcotries. Where it picks that information up from is beyond my powers of reasoning. Trying to backtrack and unwind the whole makefile.pl/EU::MM fiasco is just to difficult.
It is just easier to do thing manually:
C:\Perl510\packages\Crypt-SSLeay-0.57>del *.obj *.dll
C:\Perl510\packages\Crypt-SSLeay-0.57>
cl -MT -LD -I c:\perl510\lib\CORE\ -I c:\openssl\include\ -DWIN32 SSLe
+ay.c
ssleay.def perl510.lib libeay32mt.lib ssleay32mt.lib
-link -LIBPATH:c:\cl\lib\ -LIBPATH:c:\perl510\lib\CORE\ -LIBPATH:c:\Op
+enSSL\lib\vc\
Microsoft (R) 32-bit C/C++ Standard Compiler Version 13.00.9466 for 80
+x86
Copyright (C) Microsoft Corporation 1984-2001. All rights reserved.
SSLeay.c
Microsoft (R) Incremental Linker Version 7.00.9466
Copyright (C) Microsoft Corporation. All rights reserved.
/out:SSLeay.dll
/dll
/implib:SSLeay.lib
-LIBPATH:c:\cl\lib\
-LIBPATH:c:\perl510\lib\CORE\
-LIBPATH:c:\OpenSSL\lib\vc\
/def:ssleay.def
SSLeay.obj
perl510.lib
libeay32mt.lib
ssleay32mt.lib
Creating library SSLeay.lib and object SSLeay.exp
C:\Perl510\packages\Crypt-SSLeay-0.57>md \perl510\site\lib\auto\Crypt\
+SSLeay
C:\Perl510\packages\Crypt-SSLeay-0.57>copy SSLeay.dll \perl510\site\li
+b\auto\Crypt\SSLeay
1 file(s) copied.
C:\Perl510\packages\Crypt-SSLeay-0.57>md \perl510\site\lib\Crypt
C:\Perl510\packages\Crypt-SSLeay-0.57>copy SSLeay.pm \perl510\site\lib
+\Crypt
1 file(s) copied.
C:\Perl510\packages\Crypt-SSLeay-0.57>xcopy /s lib \Perl510\site
lib\Crypt\SSLeay\Conn.pm
lib\Crypt\SSLeay\CTX.pm
lib\Crypt\SSLeay\Err.pm
lib\Crypt\SSLeay\MainContext.pm
lib\Crypt\SSLeay\X509.pm
lib\Net\SSL.pm
6 File(s) copied
C:\Perl510\packages\Crypt-SSLeay-0.57>\Perl510\bin\perl5.10.0.exe -MCr
+ypt::SSLeay -wle"print $Crypt::SSLeay::VERSION"
0.57
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|