Closed twata1 closed 11 months ago
@sisyphus, For your infomatin.
Can you see if issue GH-425 and the branch related to it, GH-425-cpp-patch, allow it to compile with this C++ compiler?
Thank you for your reply.
I think this issue and GH-425 are similar, although there are differences between Windows and Linux. (I think Openssl 3.0.8 was built with c mode and Perl-5.38.0-rc1 was built with c++ mode and both were build on "x64 Native Tools Command Prompt for VS 2022".)
The compiled results for GH-425-cpp-patch were as follows. I may have missed something.
C:\home\woods5380rc1\p5-net-ssleay-GH-425-cpp-patch>perl Makefile.PL
Do you want to run external tests?
These tests *will* *fail* if you do not have network connectivity. [n]
*** Be sure to use the same compiler and options to compile your OpenSSL, perl,
and Net::SSLeay. Mixing and matching compilers is not supported.
*** Found OpenSSL-3.0.8 installed in C:\build-openssl
Checking if your kit is complete...
Looks good
Generating a nmake-style Makefile
Writing Makefile for Net::SSLeay
Writing MYMETA.yml and MYMETA.json
C:\home\woods5380rc1\p5-net-ssleay-GH-425-cpp-patch>nmake
Microsoft (R) Program Maintenance Utility Version 14.33.31630.0
Copyright (C) Microsoft Corporation. All rights reserved.
cp lib/Net/SSLeay.pod blib\lib\Net\SSLeay.pod
cp lib/Net/SSLeay/Handle.pm blib\lib\Net\SSLeay\Handle.pm
cp lib/Net/SSLeay.pm blib\lib\Net\SSLeay.pm
AutoSplitting blib\lib\Net\SSLeay.pm (blib\lib\auto\Net\SSLeay)
blib\lib\Net\SSLeay.pm: some names are not unique when truncated to 8 characters:
directory blib\lib\auto\Net\SSLeay:
do_https3.al, do_https2.al, do_https4.al, do_https.al truncate to do_https
do_httpx3.al, do_httpx2.al, do_httpx4.al truncate to do_httpx
get_https.al, get_https3.al, get_https4.al, get_http.al, get_http3.al, get_http4.al, get_httpx.al, get_httpx3.al, get_httpx4.al
truncate to get_http
head_https.al, head_https3.al, head_https4.al, head_http.al, head_http3.al, head_http4.al, head_httpx.al, head_httpx3.al, head_h
ttpx4.al truncate to head_htt
post_https.al, post_https3.al, post_https4.al, post_http.al, post_http3.al, post_http4.al, post_httpx.al, post_httpx3.al, post_h
ttpx4.al truncate to post_htt
put_https.al, put_https3.al, put_https4.al, put_http.al, put_http3.al, put_http4.al, put_httpx.al, put_httpx3.al, put_httpx4.al
truncate to put_http
ssl_read_all.al, ssl_read_until.al, ssl_read_CRLF.al truncate to ssl_read
ssl_write_all.al, ssl_write_CRLF.al truncate to ssl_writ
tcp_read_all.al, tcp_read_until.al, tcp_read_CRLF.al truncate to tcp_read
tcp_write_all.al, tcp_write_CRLF.al truncate to tcp_writ
Running Mkbootstrap for SSLeay ()
"C:\perl64\use-cplusplus\5.38.0rc1\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "SSLeay.bs"
"C:\perl64\use-cplusplus\5.38.0rc1\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- SSLeay.bs blib\arch\auto\Net\SS
Leay\SSLeay.bs 644
"C:\perl64\use-cplusplus\5.38.0rc1\bin\perl.exe" "C:\perl64\use-cplusplus\5.38.0rc1\lib\ExtUtils\xsubpp" -typemap C:\perl
64\use-cplusplus\5.38.0rc1\lib\ExtUtils\typemap -typemap C:\home\woods5380rc1\p5-net-ssleay-GH-425-cpp-patch\typemap SSLeay.xs >
SSLeay.xsc
"C:\perl64\use-cplusplus\5.38.0rc1\bin\perl.exe" -MExtUtils::Command -e mv -- SSLeay.xsc SSLeay.c
cl -c -I"C:\build-openssl/include" -DNET_SSLEAY_PERL_VERSION=5038000 -nologo -GF -W3 -MD -TP -EHsc -std:c++20 -DWIN32 -D
_CONSOLE -DNO_STRICT -DWIN64 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS -DPERL_TEXT
MODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -O1 -Zi -GL -fp:precise -DVERSION=\"1.93_01\" -DXS_VERSION=\"1.93_01\" "-IC:\
perl64\use-cplusplus\5.38.0rc1\lib\CORE" -FdSSLeay.pdb SSLeay.c
SSLeay.c
SSLeay.xs(135): warning C4005: '_CRT_SECURE_NO_DEPRECATE': macro redefinition
SSLeay.xs(135): note: '_CRT_SECURE_NO_DEPRECATE' previously declared on the command line
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\wspiapi.h(53): error C2894: templates cannot be declared to have 'C
' linkage
C:\perl64\use-cplusplus\5.38.0rc1\lib\CORE\inline.h(2815): warning C4244: '=': conversion from '__int64' to 'I32', possible loss o
f data
C:\perl64\use-cplusplus\5.38.0rc1\lib\CORE\inline.h(2890): warning C4244: '=': conversion from '__int64' to 'I32', possible loss o
f data
C:\perl64\use-cplusplus\5.38.0rc1\lib\CORE\inline.h(2951): warning C4244: '=': conversion from '__int64' to 'I32', possible loss o
f data
SSLeay.xs(529): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(532): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(544): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(547): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(568): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(579): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(595): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(640): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(691): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(739): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(784): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(825): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(873): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(910): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(964): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(968): warning C4244: 'argument': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(978): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(1039): warning C4018: '<=': signed/unsigned mismatch
SSLeay.xs(1099): warning C4018: '<=': signed/unsigned mismatch
SSLeay.xs(1119): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data
SSLeay.xs(1130): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(1191): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(1200): warning C4267: '=': conversion from 'size_t' to 'unsigned char', possible loss of data
SSLeay.xs(1215): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data
SSLeay.xs(1327): warning C4267: '=': conversion from 'size_t' to 'unsigned char', possible loss of data
SSLeay.xs(1349): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data
SSLeay.xs(1408): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(1661): warning C4996: 'HMAC_Init_ex': Since OpenSSL 3.0
SSLeay.xs(1666): warning C4996: 'HMAC_Init_ex': Since OpenSSL 3.0
SSLeay.xs(1707): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(1769): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(2100): warning C4996: 'TLSv1_method': Since OpenSSL 1.1.0
SSLeay.xs(2111): warning C4996: 'TLSv1_1_method': Since OpenSSL 1.1.0
SSLeay.xs(2122): warning C4996: 'TLSv1_2_method': Since OpenSSL 1.1.0
SSLeay.xs(2304): warning C4244: 'argument': conversion from 'intptr_t' to 'int', possible loss of data
SSLeay.xs(2313): warning C4244: 'argument': conversion from 'intptr_t' to 'int', possible loss of data
SSLeay.xs(2322): warning C4244: 'argument': conversion from 'intptr_t' to 'int', possible loss of data
SSLeay.xs(2521): warning C4244: 'argument': conversion from 'IV' to 'int', possible loss of data
SSLeay.c(3588): warning C4996: 'SSL_use_RSAPrivateKey': Since OpenSSL 3.0
SSLeay.c(3612): warning C4996: 'SSL_use_RSAPrivateKey_ASN1': Since OpenSSL 3.0
SSLeay.c(3636): warning C4996: 'SSL_use_RSAPrivateKey_file': Since OpenSSL 3.0
SSLeay.c(3660): warning C4996: 'SSL_CTX_use_RSAPrivateKey_file': Since OpenSSL 3.0
SSLeay.xs(2812): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
SSLeay.c(6107): warning C4996: 'ENGINE_load_builtin_engines': Since OpenSSL 3.0
SSLeay.c(6121): warning C4996: 'ENGINE_register_all_complete': Since OpenSSL 3.0
SSLeay.c(6139): warning C4996: 'ENGINE_by_id': Since OpenSSL 3.0
SSLeay.c(6161): warning C4996: 'ENGINE_set_default': Since OpenSSL 3.0
SSLeay.c(6179): warning C4996: 'ERR_load_SSL_strings': Since OpenSSL 3.0
SSLeay.c(6193): warning C4996: 'ERR_load_RAND_strings': Since OpenSSL 3.0
SSLeay.xs(3316): warning C4996: 'RAND_pseudo_bytes': Since OpenSSL 1.1.0
SSLeay.c(7006): warning C4996: 'X509_certificate_type': Since OpenSSL 3.0
SSLeay.xs(3533): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(3580): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(3596): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(3612): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(3838): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(3879): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(3910): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(3945): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(4370): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4745): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.c(10547): warning C4996: 'EVP_PKEY_assign': Since OpenSSL 3.0
SSLeay.xs(4811): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4833): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4855): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4885): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4887): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4891): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4893): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(5019): warning C4996: 'MD4': Since OpenSSL 3.0
SSLeay.xs(5037): warning C4996: 'MD5': Since OpenSSL 3.0
SSLeay.xs(5055): warning C4996: 'RIPEMD160': Since OpenSSL 3.0
SSLeay.c(11257): warning C4996: 'TLSv1_method': Since OpenSSL 1.1.0
SSLeay.c(11275): warning C4996: 'TLSv1_server_method': Since OpenSSL 1.1.0
SSLeay.c(11293): warning C4996: 'TLSv1_client_method': Since OpenSSL 1.1.0
SSLeay.c(11315): warning C4996: 'TLSv1_1_method': Since OpenSSL 1.1.0
SSLeay.c(11333): warning C4996: 'TLSv1_1_server_method': Since OpenSSL 1.1.0
SSLeay.c(11351): warning C4996: 'TLSv1_1_client_method': Since OpenSSL 1.1.0
SSLeay.c(11373): warning C4996: 'TLSv1_2_method': Since OpenSSL 1.1.0
SSLeay.c(11391): warning C4996: 'TLSv1_2_server_method': Since OpenSSL 1.1.0
SSLeay.c(11409): warning C4996: 'TLSv1_2_client_method': Since OpenSSL 1.1.0
SSLeay.c(12745): warning C4996: 'SSL_CTX_set_ssl_version': Since OpenSSL 3.0
SSLeay.c(12922): warning C4996: 'SSL_CTX_use_RSAPrivateKey': Since OpenSSL 3.0
SSLeay.c(14202): warning C4996: 'SSL_CTX_set_tmp_dh_callback': Since OpenSSL 3.0
SSLeay.c(14220): warning C4996: 'SSL_set_tmp_dh_callback': Since OpenSSL 3.0
SSLeay.c(14639): warning C4996: 'EC_KEY_new_by_curve_name': Since OpenSSL 3.0
SSLeay.c(14657): warning C4996: 'EC_KEY_free': Since OpenSSL 3.0
SSLeay.c(14699): warning C4996: 'EVP_PKEY_assign': Since OpenSSL 3.0
SSLeay.xs(6120): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(6133): warning C4996: 'EC_KEY_new': Since OpenSSL 3.0
SSLeay.xs(6135): warning C4996: 'EC_KEY_set_group': Since OpenSSL 3.0
SSLeay.xs(6136): warning C4996: 'EC_KEY_generate_key': Since OpenSSL 3.0
SSLeay.xs(6139): warning C4996: 'EC_KEY_free': Since OpenSSL 3.0
SSLeay.xs(6359): warning C4996: 'RSA_new': Since OpenSSL 3.0
SSLeay.xs(6370): warning C4996: 'RSA_free': Since OpenSSL 3.0
SSLeay.xs(6374): warning C4996: 'RSA_generate_key_ex': Since OpenSSL 3.0
SSLeay.xs(6383): warning C4996: 'RSA_free': Since OpenSSL 3.0
SSLeay.xs(6422): warning C4996: 'RSA_get0_key': Since OpenSSL 3.0
SSLeay.xs(6423): warning C4996: 'RSA_get0_factors': Since OpenSSL 3.0
SSLeay.xs(6424): warning C4996: 'RSA_get0_crt_params': Since OpenSSL 3.0
SSLeay.c(15496): warning C4996: 'RSA_free': Since OpenSSL 3.0
SSLeay.c(15656): warning C4996: 'PEM_read_bio_DHparams': Since OpenSSL 3.0
SSLeay.c(16189): warning C4996: 'DH_free': Since OpenSSL 3.0
SSLeay.c(16872): warning C4996: 'EVP_MD_CTX_md': Since OpenSSL 3.0
SSLeay.xs(7492): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
SSLeay.xs(7553): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(7570): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
SSLeay.xs(7603): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
SSLeay.xs(7688): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
SSLeay.xs(7802): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\bin\HostX64\x64\cl.
EXE"' : return code '0x2'
Stop.
C:\home\woods5380rc1\p5-net-ssleay-GH-425-cpp-patch>
Thank you,
Looks like it's down to one error now:
C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um\wspiapi.h(53): error C2894: templates cannot be declared to have 'C
' linkage
Can you try the following: remove extern "C" {
line and the line with the matching }
and see if it compiles without the error.
https://github.com/radiator-software/p5-net-ssleay/blob/5c219ab190192232c2a8a7bef1ff2c5d98d9bdf5/SSLeay.xs#L146-L157
Moving the #includes
outside of extern "C" {
was a fix I found with web search. Since nothing remains within the extern
, I guess the whole extern
can go too. It seems to compile with clang++
version 16.0.2 on a Mac, so it's worth trying.
If it works, hopefully the more knowledgeable people can tell if this is a good idea.
I followed your suggestion and it seems to have compiled successfully.
C:\home\woods5380rc1\p5-net-ssleay-GH-425-cpp-patch>fc /n SSLeay.xs.bak SSLeay.xs
Comparing files SSLeay.xs.bak and SSLEAY.XS
***** SSLeay.xs.bak
146: #ifdef __cplusplus
147: extern "C" {
148: #endif
***** SSLEAY.XS
146: #ifdef __cplusplus
147: #endif
*****
***** SSLeay.xs.bak
155: #ifdef __cplusplus
156: }
157: #endif
***** SSLEAY.XS
154: #ifdef __cplusplus
155: #endif
*****
C:\home\woods5380rc1\p5-net-ssleay-GH-425-cpp-patch>perl Makefile.PL
Do you want to run external tests?
These tests *will* *fail* if you do not have network connectivity. [n]
*** Be sure to use the same compiler and options to compile your OpenSSL, perl,
and Net::SSLeay. Mixing and matching compilers is not supported.
*** Found OpenSSL-3.0.8 installed in C:\build-openssl
Checking if your kit is complete...
Looks good
Generating a nmake-style Makefile
Writing Makefile for Net::SSLeay
Writing MYMETA.yml and MYMETA.json
C:\home\woods5380rc1\p5-net-ssleay-GH-425-cpp-patch>nmake
Microsoft (R) Program Maintenance Utility Version 14.33.31630.0
Copyright (C) Microsoft Corporation. All rights reserved.
cp lib/Net/SSLeay.pod blib\lib\Net\SSLeay.pod
cp lib/Net/SSLeay/Handle.pm blib\lib\Net\SSLeay\Handle.pm
cp lib/Net/SSLeay.pm blib\lib\Net\SSLeay.pm
AutoSplitting blib\lib\Net\SSLeay.pm (blib\lib\auto\Net\SSLeay)
blib\lib\Net\SSLeay.pm: some names are not unique when truncated to 8 characters:
directory blib\lib\auto\Net\SSLeay:
do_https3.al, do_https2.al, do_https4.al, do_https.al truncate to do_https
do_httpx3.al, do_httpx2.al, do_httpx4.al truncate to do_httpx
get_https.al, get_https3.al, get_https4.al, get_http.al, get_http3.al, get_http4.al, get_httpx.al, get_httpx3.al, get_httpx4.al
truncate to get_http
head_https.al, head_https3.al, head_https4.al, head_http.al, head_http3.al, head_http4.al, head_httpx.al, head_httpx3.al, head_h
ttpx4.al truncate to head_htt
post_https.al, post_https3.al, post_https4.al, post_http.al, post_http3.al, post_http4.al, post_httpx.al, post_httpx3.al, post_h
ttpx4.al truncate to post_htt
put_https.al, put_https3.al, put_https4.al, put_http.al, put_http3.al, put_http4.al, put_httpx.al, put_httpx3.al, put_httpx4.al
truncate to put_http
ssl_read_all.al, ssl_read_until.al, ssl_read_CRLF.al truncate to ssl_read
ssl_write_all.al, ssl_write_CRLF.al truncate to ssl_writ
tcp_read_all.al, tcp_read_until.al, tcp_read_CRLF.al truncate to tcp_read
tcp_write_all.al, tcp_write_CRLF.al truncate to tcp_writ
Running Mkbootstrap for SSLeay ()
"C:\perl64\use-cplusplus\5.38.0rc1\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "SSLeay.bs"
"C:\perl64\use-cplusplus\5.38.0rc1\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- SSLeay.bs blib\arch\auto\Net\SS
Leay\SSLeay.bs 644
"C:\perl64\use-cplusplus\5.38.0rc1\bin\perl.exe" "C:\perl64\use-cplusplus\5.38.0rc1\lib\ExtUtils\xsubpp" -typemap C:\perl
64\use-cplusplus\5.38.0rc1\lib\ExtUtils\typemap -typemap C:\home\woods5380rc1\p5-net-ssleay-GH-425-cpp-patch\typemap SSLeay.xs >
SSLeay.xsc
"C:\perl64\use-cplusplus\5.38.0rc1\bin\perl.exe" -MExtUtils::Command -e mv -- SSLeay.xsc SSLeay.c
cl -c -I"C:\build-openssl/include" -DNET_SSLEAY_PERL_VERSION=5038000 -nologo -GF -W3 -MD -TP -EHsc -std:c++20 -DWIN32 -D
_CONSOLE -DNO_STRICT -DWIN64 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS -DPERL_TEXT
MODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS -O1 -Zi -GL -fp:precise -DVERSION=\"1.93_01\" -DXS_VERSION=\"1.93_01\" "-IC:\
perl64\use-cplusplus\5.38.0rc1\lib\CORE" -FdSSLeay.pdb SSLeay.c
SSLeay.c
SSLeay.xs(135): warning C4005: '_CRT_SECURE_NO_DEPRECATE': macro redefinition
SSLeay.xs(135): note: '_CRT_SECURE_NO_DEPRECATE' previously declared on the command line
C:\perl64\use-cplusplus\5.38.0rc1\lib\CORE\inline.h(2815): warning C4244: '=': conversion from '__int64' to 'I32', possible loss o
f data
C:\perl64\use-cplusplus\5.38.0rc1\lib\CORE\inline.h(2890): warning C4244: '=': conversion from '__int64' to 'I32', possible loss o
f data
C:\perl64\use-cplusplus\5.38.0rc1\lib\CORE\inline.h(2951): warning C4244: '=': conversion from '__int64' to 'I32', possible loss o
f data
SSLeay.xs(369): warning C4101: 'i': unreferenced local variable
SSLeay.xs(527): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(530): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(542): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(545): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(566): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(577): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(593): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(638): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(689): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(737): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(782): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(823): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(871): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(908): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(962): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(966): warning C4244: 'argument': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(976): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(1037): warning C4018: '<=': signed/unsigned mismatch
SSLeay.xs(1005): warning C4101: 'n_a': unreferenced local variable
SSLeay.xs(1097): warning C4018: '<=': signed/unsigned mismatch
SSLeay.xs(1063): warning C4101: 'n_a': unreferenced local variable
SSLeay.xs(1117): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data
SSLeay.xs(1128): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(1189): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(1198): warning C4267: '=': conversion from 'size_t' to 'unsigned char', possible loss of data
SSLeay.xs(1213): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data
SSLeay.xs(1160): warning C4101: 'n_a': unreferenced local variable
SSLeay.xs(1325): warning C4267: '=': conversion from 'size_t' to 'unsigned char', possible loss of data
SSLeay.xs(1347): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data
SSLeay.xs(1406): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(1367): warning C4101: 'n_a': unreferenced local variable
SSLeay.xs(1659): warning C4996: 'HMAC_Init_ex': Since OpenSSL 3.0
SSLeay.xs(1664): warning C4996: 'HMAC_Init_ex': Since OpenSSL 3.0
SSLeay.xs(1705): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(1767): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(2098): warning C4996: 'TLSv1_method': Since OpenSSL 1.1.0
SSLeay.xs(2109): warning C4996: 'TLSv1_1_method': Since OpenSSL 1.1.0
SSLeay.xs(2120): warning C4996: 'TLSv1_2_method': Since OpenSSL 1.1.0
SSLeay.xs(2302): warning C4244: 'argument': conversion from 'intptr_t' to 'int', possible loss of data
SSLeay.xs(2311): warning C4244: 'argument': conversion from 'intptr_t' to 'int', possible loss of data
SSLeay.xs(2320): warning C4244: 'argument': conversion from 'intptr_t' to 'int', possible loss of data
SSLeay.xs(2519): warning C4244: 'argument': conversion from 'IV' to 'int', possible loss of data
SSLeay.c(3586): warning C4996: 'SSL_use_RSAPrivateKey': Since OpenSSL 3.0
SSLeay.c(3610): warning C4996: 'SSL_use_RSAPrivateKey_ASN1': Since OpenSSL 3.0
SSLeay.c(3634): warning C4996: 'SSL_use_RSAPrivateKey_file': Since OpenSSL 3.0
SSLeay.c(3658): warning C4996: 'SSL_CTX_use_RSAPrivateKey_file': Since OpenSSL 3.0
SSLeay.xs(2810): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
SSLeay.c(6105): warning C4996: 'ENGINE_load_builtin_engines': Since OpenSSL 3.0
SSLeay.c(6119): warning C4996: 'ENGINE_register_all_complete': Since OpenSSL 3.0
SSLeay.c(6137): warning C4996: 'ENGINE_by_id': Since OpenSSL 3.0
SSLeay.c(6159): warning C4996: 'ENGINE_set_default': Since OpenSSL 3.0
SSLeay.c(6177): warning C4996: 'ERR_load_SSL_strings': Since OpenSSL 3.0
SSLeay.c(6191): warning C4996: 'ERR_load_RAND_strings': Since OpenSSL 3.0
SSLeay.xs(3314): warning C4996: 'RAND_pseudo_bytes': Since OpenSSL 1.1.0
SSLeay.c(7004): warning C4996: 'X509_certificate_type': Since OpenSSL 3.0
SSLeay.xs(3531): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(3578): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(3594): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(3610): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(3836): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(3877): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(3908): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(3943): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(4368): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4743): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.c(10545): warning C4996: 'EVP_PKEY_assign': Since OpenSSL 3.0
SSLeay.xs(4809): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4831): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4853): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4883): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4885): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4889): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4891): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(5017): warning C4996: 'MD4': Since OpenSSL 3.0
SSLeay.xs(5035): warning C4996: 'MD5': Since OpenSSL 3.0
SSLeay.xs(5053): warning C4996: 'RIPEMD160': Since OpenSSL 3.0
SSLeay.c(11255): warning C4996: 'TLSv1_method': Since OpenSSL 1.1.0
SSLeay.c(11273): warning C4996: 'TLSv1_server_method': Since OpenSSL 1.1.0
SSLeay.c(11291): warning C4996: 'TLSv1_client_method': Since OpenSSL 1.1.0
SSLeay.c(11313): warning C4996: 'TLSv1_1_method': Since OpenSSL 1.1.0
SSLeay.c(11331): warning C4996: 'TLSv1_1_server_method': Since OpenSSL 1.1.0
SSLeay.c(11349): warning C4996: 'TLSv1_1_client_method': Since OpenSSL 1.1.0
SSLeay.c(11371): warning C4996: 'TLSv1_2_method': Since OpenSSL 1.1.0
SSLeay.c(11389): warning C4996: 'TLSv1_2_server_method': Since OpenSSL 1.1.0
SSLeay.c(11407): warning C4996: 'TLSv1_2_client_method': Since OpenSSL 1.1.0
SSLeay.c(12743): warning C4996: 'SSL_CTX_set_ssl_version': Since OpenSSL 3.0
SSLeay.c(12920): warning C4996: 'SSL_CTX_use_RSAPrivateKey': Since OpenSSL 3.0
SSLeay.c(14200): warning C4996: 'SSL_CTX_set_tmp_dh_callback': Since OpenSSL 3.0
SSLeay.c(14218): warning C4996: 'SSL_set_tmp_dh_callback': Since OpenSSL 3.0
SSLeay.c(14637): warning C4996: 'EC_KEY_new_by_curve_name': Since OpenSSL 3.0
SSLeay.c(14655): warning C4996: 'EC_KEY_free': Since OpenSSL 3.0
SSLeay.c(14697): warning C4996: 'EVP_PKEY_assign': Since OpenSSL 3.0
SSLeay.xs(6118): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(6131): warning C4996: 'EC_KEY_new': Since OpenSSL 3.0
SSLeay.xs(6133): warning C4996: 'EC_KEY_set_group': Since OpenSSL 3.0
SSLeay.xs(6134): warning C4996: 'EC_KEY_generate_key': Since OpenSSL 3.0
SSLeay.xs(6137): warning C4996: 'EC_KEY_free': Since OpenSSL 3.0
SSLeay.xs(6357): warning C4996: 'RSA_new': Since OpenSSL 3.0
SSLeay.xs(6368): warning C4996: 'RSA_free': Since OpenSSL 3.0
SSLeay.xs(6372): warning C4996: 'RSA_generate_key_ex': Since OpenSSL 3.0
SSLeay.xs(6381): warning C4996: 'RSA_free': Since OpenSSL 3.0
SSLeay.xs(6420): warning C4996: 'RSA_get0_key': Since OpenSSL 3.0
SSLeay.xs(6421): warning C4996: 'RSA_get0_factors': Since OpenSSL 3.0
SSLeay.xs(6422): warning C4996: 'RSA_get0_crt_params': Since OpenSSL 3.0
SSLeay.c(15494): warning C4996: 'RSA_free': Since OpenSSL 3.0
SSLeay.c(15654): warning C4996: 'PEM_read_bio_DHparams': Since OpenSSL 3.0
SSLeay.c(16187): warning C4996: 'DH_free': Since OpenSSL 3.0
SSLeay.c(16870): warning C4996: 'EVP_MD_CTX_md': Since OpenSSL 3.0
SSLeay.xs(7490): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
SSLeay.xs(7551): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(7568): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
SSLeay.xs(7601): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
SSLeay.xs(7686): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
SSLeay.xs(7800): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
"C:\perl64\use-cplusplus\5.38.0rc1\bin\perl.exe" -MExtUtils::Mksymlists -e "Mksymlists('NAME'=>\"Net::SSLeay\", 'DLBASE'
=> 'SSLeay', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
link -out:blib\arch\auto\Net\SSLeay\SSLeay.dll -dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"c:\perl64\u
se-cplusplus\5.38.0rc1\lib\CORE" -machine:AMD64 -subsystem:console,"5.02" SSLeay.obj "C:\perl64\use-cplusplus\5.38.0rc1\lib\COR
E\perl538.lib" "C:\build-openssl\lib\libcrypto.lib" "C:\build-openssl\lib\libssl.lib" "C:\Program Files (x86)\Windows Kits\10\\lib
\10.0.19041.0\\um\x64\crypt32.lib" "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\\lib\x64\old
names.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64\kernel32.lib" "C:\Program Files (x86)\Windows Kits\10
\\lib\10.0.19041.0\\um\x64\user32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64\gdi32.lib" "C:\Program Fi
les (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64\winspool.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x6
4\comdlg32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64\advapi32.lib" "C:\Program Files (x86)\Windows Ki
ts\10\\lib\10.0.19041.0\\um\x64\shell32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64\ole32.lib" "C:\Prog
ram Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64\oleaut32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\
\um\x64\netapi32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64\uuid.lib" "C:\Program Files (x86)\Windows
Kits\10\\lib\10.0.19041.0\\um\x64\ws2_32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64\mpr.lib" "C:\Progr
am Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64\winmm.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\
x64\version.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64\odbc32.lib" "C:\Program Files (x86)\Windows Kit
s\10\\lib\10.0.19041.0\\um\x64\odbccp32.lib" "C:\Program Files (x86)\Windows Kits\10\\lib\10.0.19041.0\\um\x64\comctl32.lib" "C:\P
rogram Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\\lib\x64\msvcrt.lib" "C:\Program Files\Microsoft Vis
ual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\\lib\x64\vcruntime.lib" "C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041
.0\ucrt\x64\ucrt.lib" -def:SSLeay.def
Creating library blib\arch\auto\Net\SSLeay\SSLeay.lib and object blib\arch\auto\Net\SSLeay\SSLeay.exp
Generating code
Finished generating code
if exist blib\arch\auto\Net\SSLeay\SSLeay.dll.manifest mt -nologo -manifest blib\arch\auto\Net\SSLeay\SSLeay.dll.manifest
-outputresource:blib\arch\auto\Net\SSLeay\SSLeay.dll;2
if exist blib\arch\auto\Net\SSLeay\SSLeay.dll.manifest del blib\arch\auto\Net\SSLeay\SSLeay.dll.manifest
"C:\perl64\use-cplusplus\5.38.0rc1\bin\perl.exe" -MExtUtils::Command -e chmod -- 755 blib\arch\auto\Net\SSLeay\SSLeay.dll
C:\home\woods5380rc1\p5-net-ssleay-GH-425-cpp-patch>
And now nmake test
passes!
C:\home\woods5380rc1\p5-net-ssleay-GH-425-cpp-patch>nmake test
Microsoft (R) Program Maintenance Utility Version 14.33.31630.0
Copyright (C) Microsoft Corporation. All rights reserved.
"C:\perl64\use-cplusplus\5.38.0rc1\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- SSLeay.bs blib\arch\auto\Net\SS
Leay\SSLeay.bs 644
"C:\perl64\use-cplusplus\5.38.0rc1\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::S
witches; test_harness(0, 'blib\lib', 'blib\arch')" t\local\*.t t\handle\local\*.t
t\handle\local\05_use.t ..................... ok
t\local\01_pod.t ............................ skipped: Test::Pod 1.41 required for testing pod
t\local\02_pod_coverage.t ................... skipped: These tests are for only for release candidate testing. Enable with RELEASE
_TESTING=1
t\local\03_use.t ............................ 1/1 #
# Testing Net::SSLeay 1.93_01
#
# Perl information:
# Version: '5.038000'
# Executable path: 'C:\perl64\use-cplusplus\5.38.0rc1\bin\perl.exe'
#
# Library version with OpenSSL_version_num():
# OPENSSL_VERSION_NUMBER: '0x30000080'
#
# Library information with SSLeay_version() and OpenSSL_version():
# SSLEAY_VERSION: 'OpenSSL 3.0.8 7 Feb 2023'
# SSLEAY_CFLAGS: 'compiler: cl /Zi /Fdossl_static.pdb /Gs0 /GF /Gy /MD /W3 /wd4090 /nologo /O2 -DL_ENDIAN -DOPENS
SL_PIC'
# SSLEAY_BUILT_ON: 'built on: Sat Feb 11 01:46:34 2023 UTC'
# SSLEAY_PLATFORM: 'platform: VC-WIN64A'
# SSLEAY_DIR: 'OPENSSLDIR: "C:\build-openssl\ssl"'
# OPENSSL_ENGINES_DIR: 'ENGINESDIR: "C:\build-openssl\lib\engines-3"'
# OPENSSL_MODULES_DIR: 'MODULESDIR: "C:\build-openssl\lib\ossl-modules"'
# OPENSSL_CPU_INFO: 'CPUINFO: OPENSSL_ia32cap=0x7fbae3bfffebffff:0x281'
# OPENSSL_VERSION_STRING: '3.0.8'
# OPENSSL_FULL_VERSION_STRING: '3.0.8'
#
# Library version information with OPENSSL_version_*():
# OPENSSL_version_major(): '3'
# OPENSSL_version_minor(): '0'
# OPENSSL_version_patch(): '8'
# OPENSSL_version_pre_release(): ''
# OPENSSL_version_build_metadata(): ''
#
# Library information with OPENSSL_info():
# OPENSSL_INFO_CONFIG_DIR: 'C:\build-openssl\ssl'
# OPENSSL_INFO_ENGINES_DIR: 'C:\build-openssl\lib\engines-3'
# OPENSSL_INFO_MODULES_DIR: 'C:\build-openssl\lib\ossl-modules'
# OPENSSL_INFO_DSO_EXTENSION: '.dll'
# OPENSSL_INFO_DIR_FILENAME_SEPARATOR: '\'
# OPENSSL_INFO_LIST_SEPARATOR: ';'
# OPENSSL_INFO_SEED_SOURCE: 'os-specific'
# OPENSSL_INFO_CPU_SETTINGS: 'OPENSSL_ia32cap=0x7fbae3bfffebffff:0x281'
t\local\03_use.t ............................ ok
t\local\04_basic.t .......................... ok
t\local\05_passwd_cb.t ...................... ok
t\local\06_tcpecho.t ........................ ok
t\local\07_sslecho.t ........................ ok
t\local\08_pipe.t ........................... skipped: fork() not natively supported on this system
t\local\09_ctx_new.t ........................ ok
t\local\10_rand.t ........................... ok
t\local\11_read.t ........................... ok
t\local\15_bio.t ............................ ok
t\local\20_functions.t ...................... ok
t\local\21_constants.t ...................... ok
t\local\22_provider.t ....................... ok
t\local\22_provider_try_load.t .............. ok
t\local\22_provider_try_load_zero_retain.t .. ok
t\local\30_error.t .......................... ok
t\local\31_rsa_generate_key.t ............... ok
t\local\32_x509_get_cert_info.t ............. ok
t\local\33_x509_create_cert.t ............... ok
t\local\34_x509_crl.t ....................... ok
t\local\35_ephemeral.t ...................... skipped: LibreSSL and OpenSSL 1.1.0 removed support for ephemeral/temporary RSA priv
ate keys
t\local\36_verify.t ......................... ok
t\local\37_asn1_time.t ...................... ok
t\local\38_priv-key.t ....................... ok
t\local\39_pkcs12.t ......................... ok
t\local\40_npn_support.t .................... ok
t\local\41_alpn_support.t ................... ok
t\local\42_info_callback.t .................. ok
t\local\43_misc_functions.t ................. ok
t\local\44_sess.t ........................... ok
t\local\45_exporter.t ....................... ok
t\local\46_msg_callback.t ................... ok
t\local\47_keylog.t ......................... ok
t\local\50_digest.t ......................... ok
t\local\61_threads-cb-crash.t ............... ok
t\local\62_threads-ctx_new-deadlock.t ....... ok
t\local\63_ec_key_generate_key.t ............ ok
t\local\64_ticket_sharing.t ................. ok
t\local\65_security_level.t ................. ok
t\local\65_ticket_sharing_2.t ............... ok
t\local\66_curves.t ......................... ok
t\local\kwalitee.t .......................... skipped: These tests are for only for release candidate testing. Enable with RELEASE
_TESTING=1
All tests successful.
Files=45, Tests=2582, 22 wallclock secs ( 0.34 usr + 0.23 sys = 0.58 CPU)
Result: PASS
C:\home\woods5380rc1\p5-net-ssleay-GH-425-cpp-patch>
Thank you!
Pull request #451 was just merged with changes that are discussed in both this issue and issue #425. GCC, Clang and Microsoft C++ compilers should now successfully compile SSLeay.xs. Thanks for your help with this!
I'll close this now and if there's anything further needed, it can be added to the C++ compiler issue in #425 or its own issue.
Hello,
Recently I built Perl-5.38.0-rc1 using C++ mode (USE_CPLUSPLUS = define) on Visual Studio Community 2022 (64-bit). (A rough Perl build procedure can be found at https://github.com/Perl/perl5/issues/16459#issuecomment-1610012808.)
When I try to build Net-SSLeay-1.92 using Perl-5.38.0-rc1, nmake fails as follows.
The versions of OpenSSL and Perl are as follows.
Thank you,