Subject: | Build failures on Windows 7 (VC 2013) - doesn't properly link to OpenSSL |
This does not appear to be a duplicate of RT #100610.
When building on Windows 7 under MSVC 2013, Net::SSLeay fails to compile because it does not attempt to link against the OpenSSL libraries. My OPENSSL_PREFIX is C:\openssl, in C:\openssl are the libeay32.dll, libssl32.dll, and ssleay32.dll, and in C:\openssl\lib are the libeay32.lib and ssleay32.lib. Running `perl Makefile.PL` gives the following output:
cpan[2]> test Net::SSLeay
...snip....
*** Found OpenSSL-1.0.1j installed in C:\openssl
*** Be sure to use the same compiler and options to compile your OpenSSL, perl,
and Net::SSLeay. Mixing and matching compilers is not supported.
Do you want to run external tests?
These tests *will* *fail* if you do not have network connectivity. [n]
Checking if your kit is complete...
Looks good
Warning (mostly harmless): No library found for -llibeay32
Warning (mostly harmless): No library found for -lssleay32
Generating a nmake-style Makefile
Writing Makefile for Net::SSLeay
Writing MYMETA.yml and MYMETA.json
MIKEM/Net-SSLeay-1.66.tar.gz
C:\cpantest\perl5201\bin\perl.exe Makefile.PL -- OK
Then, running `nmake`:
link -out:blib\arch\auto\Net\SSLeay\SSLeay.dll -dll -nologo -nodefaultli
b -debug -opt:ref,icf -ltcg -libpath:"c:\cpantest\perl5201\lib\CORE" -machine:
AMD64 "/manifestdependency:type='Win32' name='Microsoft.Windows.Common-Controls'
version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' l
anguage='*'" SSLeay.obj "C:\cpantest\perl5201\lib\CORE\perl520.lib" "C:\Progra
m Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\amd64\oldnames.lib" "C:\Progra
m Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64\kernel32.lib" "C:\Program File
s (x86)\Windows Kits\8.1\lib\winv6.3\um\x64\user32.lib" "C:\Program Files (x86)\
Windows Kits\8.1\lib\winv6.3\um\x64\gdi32.lib" "C:\Program Files (x86)\Windows K
its\8.1\lib\winv6.3\um\x64\winspool.lib" "C:\Program Files (x86)\Windows Kits\8.
1\lib\winv6.3\um\x64\comdlg32.lib" "C:\Program Files (x86)\Windows Kits\8.1\lib\
winv6.3\um\x64\advapi32.lib" "C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.
3\um\x64\shell32.lib" "C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x6
4\ole32.lib" "C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64\oleaut3
2.lib" "C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64\netapi32.lib"
"C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64\uuid.lib" "C:\Progr
am Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64\ws2_32.lib" "C:\Program Files
(x86)\Windows Kits\8.1\lib\winv6.3\um\x64\mpr.lib" "C:\Program Files (x86)\Wind
ows Kits\8.1\lib\winv6.3\um\x64\winmm.lib" "C:\Program Files (x86)\Windows Kits\
8.1\lib\winv6.3\um\x64\version.lib" "C:\Program Files (x86)\Windows Kits\8.1\lib
\winv6.3\um\x64\odbc32.lib" "C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3
\um\x64\odbccp32.lib" "C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x6
4\comctl32.lib" "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\amd6
4\msvcrt.lib" -def:SSLeay.def
Creating library blib\arch\auto\Net\SSLeay\SSLeay.lib and object blib\arch\au
to\Net\SSLeay\SSLeay.exp
SSLeay.obj : error LNK2001: unresolved external symbol SSL_SESSION_free
SSLeay.obj : error LNK2001: unresolved external symbol SSL_set_client_CA_list
SSLeay.obj : error LNK2001: unresolved external symbol ASN1_ENUMERATED_get
SSLeay.obj : error LNK2001: unresolved external symbol SSL_SESSION_set_timeout
SSLeay.obj : error LNK2001: unresolved external symbol SSL_get_verify_result
And the errors continue for some hundreds of lines. Manually going into the directory and adding the libraries "C:\openssl\lib\libeay32.lib" "C:\openssl\lib\ssleay32.lib" to that command allows it to successfully link.
Unfortunately, my smoke tester will not allow me to submit a CPAN Testers report because it thinks external libraries are not installed. In lieu of a proper report, I've attached a build log and a Makefile.
Subject: | Makefile |
Message body not shown because it is not plain text.
Subject: | Net-SSLeay-1.66-1419088400.log |
Message body not shown because it is not plain text.