radiator-software / p5-net-ssleay

Net-SSLeay: Perl bindings for OpenSSL and LibreSSL
https://metacpan.org/release/Net-SSLeay
Artistic License 2.0
31 stars 46 forks source link

Net-SSLeay-1.92: Seems to fail when "nmake" using "C++ mode Perl-5.38.0-rc1" and OpenSSL 3.0.8 #438

Closed twata1 closed 11 months ago

twata1 commented 1 year ago

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.

C:\home\woods5380rc1\Net-SSLeay-1.92>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\Net-SSLeay-1.92>nmake

Microsoft (R) Program Maintenance Utility Version 14.33.31630.0
Copyright (C) Microsoft Corporation.  All rights reserved.

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
cp lib/Net/SSLeay/Handle.pm blib\lib\Net\SSLeay\Handle.pm
cp lib/Net/SSLeay.pod blib\lib\Net\SSLeay.pod
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\Net-SSLeay-1.92\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"  -nologo -GF -W3 -MD -TP -EHsc -std:c++20 -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -D_CR
T_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_
IMPLICIT_SYS -O1 -Zi -GL -fp:precise    -DVERSION=\"1.92\"  -DXS_VERSION=\"1.92\"  "-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(431): error C2664: 'void Perl_av_push(PerlInterpreter *,AV *,SV *)': cannot convert argument 2 from 'void *' to 'AV *'
SSLeay.xs(431): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
C:\perl64\use-cplusplus\5.38.0rc1\lib\CORE\proto.h(316): note: see declaration of 'Perl_av_push'
SSLeay.xs(522): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(525): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(537): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(540): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(561): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(572): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(588): warning C4267: 'argument': conversion from 'size_t' to 'I32', possible loss of data
SSLeay.xs(602): error C2440: '=': cannot convert from 'void *' to 'SSL *'
SSLeay.xs(602): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
SSLeay.xs(633): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(684): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(732): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(777): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(818): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(866): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(903): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(938): error C2664: 'SV *Perl_newSVpv(PerlInterpreter *,const char *const ,const STRLEN)': cannot convert argument 2 from
 'void *' to 'const char *const '
SSLeay.xs(938): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
C:\perl64\use-cplusplus\5.38.0rc1\lib\CORE\proto.h(3010): note: see declaration of 'Perl_newSVpv'
SSLeay.xs(938): error C2660: 'Perl_sv_2mortal': function does not take 1 arguments
C:\perl64\use-cplusplus\5.38.0rc1\lib\CORE\proto.h(4288): note: see declaration of 'Perl_sv_2mortal'
SSLeay.xs(957): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(961): warning C4244: 'argument': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(1029): warning C4018: '<=': signed/unsigned mismatch
SSLeay.xs(1089): warning C4018: '<=': signed/unsigned mismatch
SSLeay.xs(1109): warning C4244: '=': conversion from '__int64' to 'int', possible loss of data
SSLeay.xs(1120): warning C4267: '+=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(1181): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(1190): warning C4267: '=': conversion from 'size_t' to 'unsigned char', possible loss of data
SSLeay.xs(1205): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data
SSLeay.xs(1317): warning C4267: '=': conversion from 'size_t' to 'unsigned char', possible loss of data
SSLeay.xs(1339): warning C4267: 'argument': conversion from 'size_t' to 'unsigned int', possible loss of data
SSLeay.xs(1398): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(1641): error C2664: 'void TRACE(int,char *,...)': cannot convert argument 2 from 'const char [27]' to 'char *'
SSLeay.xs(1641): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
SSLeay.xs(233): note: see declaration of 'TRACE'
SSLeay.xs(1651): warning C4996: 'HMAC_Init_ex': Since OpenSSL 3.0
SSLeay.xs(1656): warning C4996: 'HMAC_Init_ex': Since OpenSSL 3.0
SSLeay.xs(1697): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(1739): error C2440: 'initializing': cannot convert from 'void *' to 'simple_cb_data_t *'
SSLeay.xs(1739): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
SSLeay.xs(1759): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(1889): error C2664: 'void TRACE(int,char *,...)': cannot convert argument 2 from 'const char [22]' to 'char *'
SSLeay.xs(1889): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
SSLeay.xs(233): note: see declaration of 'TRACE'
SSLeay.xs(1902): error C2664: 'void TRACE(int,char *,...)': cannot convert argument 2 from 'const char [25]' to 'char *'
SSLeay.xs(1902): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
SSLeay.xs(233): note: see declaration of 'TRACE'
SSLeay.xs(1904): error C2664: 'void TRACE(int,char *,...)': cannot convert argument 2 from 'const char [36]' to 'char *'
SSLeay.xs(1904): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
SSLeay.xs(233): note: see declaration of 'TRACE'
SSLeay.xs(1907): error C2664: 'void TRACE(int,char *,...)': cannot convert argument 2 from 'const char [24]' to 'char *'
SSLeay.xs(1907): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
SSLeay.xs(233): note: see declaration of 'TRACE'
SSLeay.xs(1909): error C2664: 'void TRACE(int,char *,...)': cannot convert argument 2 from 'const char [11]' to 'char *'
SSLeay.xs(1909): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
SSLeay.xs(233): note: see declaration of 'TRACE'
SSLeay.xs(2088): warning C4996: 'TLSv1_method': Since OpenSSL 1.1.0
SSLeay.xs(2097): warning C4996: 'TLSv1_1_method': Since OpenSSL 1.1.0
SSLeay.xs(2108): warning C4996: 'TLSv1_2_method': Since OpenSSL 1.1.0
SSLeay.xs(2290): warning C4244: 'argument': conversion from 'intptr_t' to 'int', possible loss of data
SSLeay.xs(2299): warning C4244: 'argument': conversion from 'intptr_t' to 'int', possible loss of data
SSLeay.xs(2308): warning C4244: 'argument': conversion from 'intptr_t' to 'int', possible loss of data
SSLeay.xs(2507): warning C4244: 'argument': conversion from 'IV' to 'int', possible loss of data
SSLeay.c(3574): warning C4996: 'SSL_use_RSAPrivateKey': Since OpenSSL 3.0
SSLeay.c(3598): warning C4996: 'SSL_use_RSAPrivateKey_ASN1': Since OpenSSL 3.0
SSLeay.c(3622): warning C4996: 'SSL_use_RSAPrivateKey_file': Since OpenSSL 3.0
SSLeay.c(3646): warning C4996: 'SSL_CTX_use_RSAPrivateKey_file': Since OpenSSL 3.0
SSLeay.xs(2798): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
SSLeay.c(6093): warning C4996: 'ENGINE_load_builtin_engines': Since OpenSSL 3.0
SSLeay.c(6107): warning C4996: 'ENGINE_register_all_complete': Since OpenSSL 3.0
SSLeay.c(6125): warning C4996: 'ENGINE_by_id': Since OpenSSL 3.0
SSLeay.c(6147): warning C4996: 'ENGINE_set_default': Since OpenSSL 3.0
SSLeay.c(6165): warning C4996: 'ERR_load_SSL_strings': Since OpenSSL 3.0
SSLeay.c(6179): warning C4996: 'ERR_load_RAND_strings': Since OpenSSL 3.0
SSLeay.xs(3302): warning C4996: 'RAND_pseudo_bytes': Since OpenSSL 1.1.0
SSLeay.c(6992): warning C4996: 'X509_certificate_type': Since OpenSSL 3.0
SSLeay.xs(3519): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(3566): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(3582): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(3598): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.c(7636): warning C4996: 'X509_CRL_get_lastUpdate': Since OpenSSL 1.1.0
SSLeay.c(7656): warning C4996: 'X509_CRL_get_nextUpdate': Since OpenSSL 1.1.0
SSLeay.xs(3790): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(3831): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(3862): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(3897): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(4046): error C2440: '=': cannot convert from 'void *' to 'stack_st_GENERAL_NAME *'
SSLeay.xs(4046): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
SSLeay.xs(4120): error C2440: '=': cannot convert from 'void *' to 'stack_st_DIST_POINT *'
SSLeay.xs(4120): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
SSLeay.xs(4133): warning C4996: 'ASN1_STRING_data': Since OpenSSL 1.1.0
SSLeay.xs(4167): error C2440: '=': cannot convert from 'void *' to 'AUTHORITY_INFO_ACCESS *'
SSLeay.xs(4167): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
SSLeay.xs(4174): warning C4996: 'ASN1_STRING_data': Since OpenSSL 1.1.0
SSLeay.xs(4193): error C2440: '=': cannot convert from 'void *' to 'EXTENDED_KEY_USAGE *'
SSLeay.xs(4193): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
SSLeay.xs(4216): error C2440: '=': cannot convert from 'void *' to 'ASN1_BIT_STRING *'
SSLeay.xs(4216): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
SSLeay.xs(4235): error C2440: '=': cannot convert from 'void *' to 'ASN1_BIT_STRING *'
SSLeay.xs(4235): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
SSLeay.xs(4299): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4524): warning C4996: 'ASN1_STRING_data': Since OpenSSL 1.1.0
SSLeay.xs(4644): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.c(10316): warning C4996: 'EVP_PKEY_assign': Since OpenSSL 3.0
SSLeay.xs(4703): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4725): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4747): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4777): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4779): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4783): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4785): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(4909): warning C4996: 'MD4': Since OpenSSL 3.0
SSLeay.xs(4927): warning C4996: 'MD5': Since OpenSSL 3.0
SSLeay.xs(4945): warning C4996: 'RIPEMD160': Since OpenSSL 3.0
SSLeay.c(10997): warning C4996: 'TLSv1_method': Since OpenSSL 1.1.0
SSLeay.c(11015): warning C4996: 'TLSv1_server_method': Since OpenSSL 1.1.0
SSLeay.c(11033): warning C4996: 'TLSv1_client_method': Since OpenSSL 1.1.0
SSLeay.c(11054): warning C4996: 'TLSv1_1_method': Since OpenSSL 1.1.0
SSLeay.c(11072): warning C4996: 'TLSv1_1_server_method': Since OpenSSL 1.1.0
SSLeay.c(11090): warning C4996: 'TLSv1_1_client_method': Since OpenSSL 1.1.0
SSLeay.c(11112): warning C4996: 'TLSv1_2_method': Since OpenSSL 1.1.0
SSLeay.c(11130): warning C4996: 'TLSv1_2_server_method': Since OpenSSL 1.1.0
SSLeay.c(11148): warning C4996: 'TLSv1_2_client_method': Since OpenSSL 1.1.0
SSLeay.c(12484): warning C4996: 'SSL_CTX_set_ssl_version': Since OpenSSL 3.0
SSLeay.c(12661): warning C4996: 'SSL_CTX_use_RSAPrivateKey': Since OpenSSL 3.0
SSLeay.c(13941): warning C4996: 'SSL_CTX_set_tmp_dh_callback': Since OpenSSL 3.0
SSLeay.c(13959): warning C4996: 'SSL_set_tmp_dh_callback': Since OpenSSL 3.0
SSLeay.c(14378): warning C4996: 'EC_KEY_new_by_curve_name': Since OpenSSL 3.0
SSLeay.c(14396): warning C4996: 'EC_KEY_free': Since OpenSSL 3.0
SSLeay.c(14438): warning C4996: 'EVP_PKEY_assign': Since OpenSSL 3.0
SSLeay.xs(6006): warning C4244: '=': conversion from 'IV' to 'int', possible loss of data
SSLeay.xs(6019): warning C4996: 'EC_KEY_new': Since OpenSSL 3.0
SSLeay.xs(6021): warning C4996: 'EC_KEY_set_group': Since OpenSSL 3.0
SSLeay.xs(6022): warning C4996: 'EC_KEY_generate_key': Since OpenSSL 3.0
SSLeay.xs(6025): warning C4996: 'EC_KEY_free': Since OpenSSL 3.0
SSLeay.xs(6228): warning C4996: 'RSA_new': Since OpenSSL 3.0
SSLeay.xs(6240): warning C4996: 'RSA_free': Since OpenSSL 3.0
SSLeay.xs(6244): warning C4996: 'RSA_generate_key_ex': Since OpenSSL 3.0
SSLeay.xs(6254): warning C4996: 'RSA_free': Since OpenSSL 3.0
SSLeay.c(15146): warning C4996: 'RSA_free': Since OpenSSL 3.0
SSLeay.c(15206): error C2664: 'X509_CRL *d2i_X509_CRL_bio(BIO *,X509_CRL **)': cannot convert argument 2 from 'void *' to 'X509_CR
L **'
SSLeay.c(15206): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
C:\build-openssl\include\openssl/x509.h(611): note: see declaration of 'd2i_X509_CRL_bio'
SSLeay.c(15234): error C2664: 'X509_REQ *d2i_X509_REQ_bio(BIO *,X509_REQ **)': cannot convert argument 2 from 'void *' to 'X509_RE
Q **'
SSLeay.c(15234): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
C:\build-openssl\include\openssl/x509.h(613): note: see declaration of 'd2i_X509_REQ_bio'
SSLeay.c(15262): error C2664: 'X509 *d2i_X509_bio(BIO *,X509 **)': cannot convert argument 2 from 'void *' to 'X509 **'
SSLeay.c(15262): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
C:\build-openssl\include\openssl/x509.h(609): note: see declaration of 'd2i_X509_bio'
SSLeay.c(15306): error C2664: 'DH *PEM_read_bio_DHparams(BIO *,DH **,pem_password_cb (__cdecl *),void *)': cannot convert argument
 2 from 'void *' to 'DH **'
SSLeay.c(15306): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
C:\build-openssl\include\openssl/pem.h(469): note: see declaration of 'PEM_read_bio_DHparams'
SSLeay.c(15350): error C2664: 'X509_CRL *PEM_read_bio_X509_CRL(BIO *,X509_CRL **,pem_password_cb (__cdecl *),void *)': cannot conv
ert argument 2 from 'void *' to 'X509_CRL **'
SSLeay.c(15350): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
C:\build-openssl\include\openssl/pem.h(440): note: see declaration of 'PEM_read_bio_X509_CRL'
SSLeay.c(15394): error C2664: 'X509 *PEM_read_bio_X509(BIO *,X509 **,pem_password_cb (__cdecl *),void *)': cannot convert argument
 2 from 'void *' to 'X509 **'
SSLeay.c(15394): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
C:\build-openssl\include\openssl/pem.h(436): note: see declaration of 'PEM_read_bio_X509'
SSLeay.c(15767): error C2664: 'X509_REQ *PEM_read_bio_X509_REQ(BIO *,X509_REQ **,pem_password_cb (__cdecl *),void *)': cannot conv
ert argument 2 from 'void *' to 'X509_REQ **'
SSLeay.c(15767): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast
C:\build-openssl\include\openssl/pem.h(438): note: see declaration of 'PEM_read_bio_X509_REQ'
SSLeay.c(15839): warning C4996: 'DH_free': Since OpenSSL 3.0
SSLeay.c(16543): warning C4996: 'EVP_MD_CTX_md': Since OpenSSL 3.0
SSLeay.xs(7345): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
SSLeay.xs(7406): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data
SSLeay.xs(7423): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
SSLeay.xs(7456): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
SSLeay.xs(7541): warning C4267: 'argument': conversion from 'size_t' to 'long', possible loss of data
SSLeay.xs(7581): error C2664: 'void TRACE(int,char *,...)': cannot convert argument 2 from 'const char [47]' to 'char *'
SSLeay.xs(7581): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
SSLeay.xs(233): note: see declaration of 'TRACE'
SSLeay.xs(7598): error C2664: 'void TRACE(int,char *,...)': cannot convert argument 2 from 'const char [17]' to 'char *'
SSLeay.xs(7598): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
SSLeay.xs(233): note: see declaration of 'TRACE'
SSLeay.xs(7611): error C2664: 'void TRACE(int,char *,...)': cannot convert argument 2 from 'const char [57]' to 'char *'
SSLeay.xs(7611): note: Conversion from string literal loses const qualifier (see /Zc:strictStrings)
SSLeay.xs(233): note: see declaration of 'TRACE'
SSLeay.xs(7655): 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\Net-SSLeay-1.92>

The versions of OpenSSL and Perl are as follows.

C:\home\woods5380rc1\Net-SSLeay-1.92>openssl version
OpenSSL 3.0.8 7 Feb 2023 (Library: OpenSSL 3.0.8 7 Feb 2023)

C:\home\woods5380rc1\Net-SSLeay-1.92>
C:\home\woods5380rc1\Net-SSLeay-1.92>perl -V
Summary of my perl5 (revision 5 version 38 subversion 0) configuration:

  Platform:
    osname=MSWin32
    osvers=6.3.9600
    archname=MSWin32-x64-multi-thread
    uname=''
    config_args='undef'
    hint=recommended
    useposix=true
    d_sigaction=undef
    useithreads=define
    usemultiplicity=define
    use64bitint=define
    use64bitall=undef
    uselongdouble=undef
    usemymalloc=n
    default_inc_excludes_dot=define
  Compiler:
    cc='cl'
    ccflags ='-nologo -GF -W3 -MD -TP -EHsc -std:c++20 -DWIN32 -D_CONSOLE -DNO_STRICT -DWIN64 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NO
NSTDC_NO_DEPRECATE -D_WINSOCK_DEPRECATED_NO_WARNINGS  -DPERL_TEXTMODE_SCRIPTS -DMULTIPLICITY -DPERL_IMPLICIT_SYS'
    optimize='-O1 -Zi -GL -fp:precise'
    cppflags='-DWIN32'
    ccversion='19.33.31630'
    gccversion=''
    gccosandvers=''
    intsize=4
    longsize=4
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=undef
    longlongsize=8
    d_longdbl=define
    longdblsize=8
    longdblkind=0
    ivtype='__int64'
    ivsize=8
    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 -ltcg  -libpath:"c:\perl64\use-cplusplus\5.38.0rc1\lib\CORE"  -machine:AMD
64 -subsystem:console,"5.02"'
    libpth="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.33.31629\\lib\x64"
    libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
  netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib vcruntime.lib uc
rt.lib
    perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32
.lib  netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.lib vcruntime.li
b ucrt.lib
    libc=ucrt.lib
    so=dll
    useshrplib=true
    libperl=perl538.lib
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_win32.xs
    dlext=dll
    d_dlsymun=undef
    ccdlflags=' '
    cccdlflags=' '
    lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg  -libpath:"c:\perl64\use-cplusplus\5.38.0rc1\lib\CORE"  -machi
ne:AMD64 -subsystem:console,"5.02"'

Characteristics of this binary (from libperl):
  Compile-time options:
    HAS_LONG_DOUBLE
    HAS_TIMES
    HAVE_INTERP_INTERN
    MULTIPLICITY
    PERLIO_LAYERS
    PERL_COPY_ON_WRITE
    PERL_DONT_CREATE_GVSV
    PERL_HASH_FUNC_SIPHASH13
    PERL_HASH_USE_SBOX32
    PERL_IMPLICIT_SYS
    PERL_MALLOC_WRAP
    PERL_OP_PARENT
    PERL_PRESERVE_IVUV
    PERL_USE_SAFE_PUTENV
    USE_64_BIT_INT
    USE_ITHREADS
    USE_LARGE_FILES
    USE_LOCALE
    USE_LOCALE_COLLATE
    USE_LOCALE_CTYPE
    USE_LOCALE_NUMERIC
    USE_LOCALE_TIME
    USE_PERLIO
    USE_PERL_ATOF
    USE_THREAD_SAFE_LOCALE
  Locally applied patches:
    RC1
  Built under MSWin32
  Compiled at Jun 17 2023 23:17:04
  %ENV:
    PERL5LIB="C:\home\woods5380rc1\perl5\lib\perl5"
    PERL_LOCAL_LIB_ROOT="C:\home\woods5380rc1\perl5"
    PERL_MB_OPT="--install_base "C:\\home\\woods5380rc1\\perl5""
    PERL_MM_OPT="INSTALL_BASE=C:\\home\\woods5380rc1\\perl5"
  @INC:
    C:\home\woods5380rc1\perl5\lib\perl5/MSWin32-x64-multi-thread
    C:\home\woods5380rc1\perl5\lib\perl5
    C:/perl64/use-cplusplus/5.38.0rc1/lib

C:\home\woods5380rc1\Net-SSLeay-1.92>

Thank you,

twata1 commented 1 year ago

@sisyphus, For your infomatin.

h-vn commented 1 year ago

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?

twata1 commented 1 year ago

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,

h-vn commented 1 year ago

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.

twata1 commented 1 year ago

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!

h-vn commented 11 months ago

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!

h-vn commented 11 months ago

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.