-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Net-SSLeay-1.92: Seems to fail when "nmake" using "C++ mode Perl-5.38.0-rc1" and OpenSSL 3.0.8 #438
Comments
@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. The compiled results for GH-425-cpp-patch were as follows.
Thank you, |
Looks like it's down to one error now:
Can you try the following: remove Lines 146 to 157 in 5c219ab
Moving the 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.
And now
Thank you! |
'extern "C" {}' block has wrapped Perl XS standard includes since the beginning. The earliest version found from the net is Net_SSLeay.pm version 0.4 in which the following was already present: #ifdef __cplusplus extern "C" { #endif #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #ifdef __cplusplus } #endif This has been carried over since then, until the recent SSLeay.xs updates to allow compilation with a C++ compiler caused a compilation failure. Recent GCC and Clang C++ compilers do not care about the 'extern "C"' wrapper but Visual Studio Community 2022 flagged the following error (see GH-438): 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 When 'extern "C" {}' is removed completely, the compilation succeeds. This makes sense since apparently the purpose of 'extern "C" {}' is to wrap one's own functions instead of headers included from elsewhere. Those headers should have their own 'extern "C" {}' definitions, if any are needed.
'extern "C" {}' block has wrapped Perl XS standard includes since the beginning. The earliest version found from the net is Net_SSLeay.pm version 0.4 in which the following was already present: #ifdef __cplusplus extern "C" { #endif #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #ifdef __cplusplus } #endif This has been carried over since then, until the recent SSLeay.xs updates to allow compilation with a C++ compiler caused a compilation failure. Recent GCC and Clang C++ compilers do not care about the 'extern "C"' wrapper but Visual Studio Community 2022 flagged the following error (see GH-438): 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 When 'extern "C" {}' is removed completely, the compilation succeeds. This makes sense since apparently the purpose of 'extern "C" {}' is to wrap one's own functions instead of headers included from elsewhere. Those headers should have their own 'extern "C" {}' definitions, if any are needed.
'extern "C" {}' block has wrapped Perl XS standard includes since the beginning. The earliest version found from the net is Net_SSLeay.pm version 0.4 in which the following was already present: #ifdef __cplusplus extern "C" { #endif #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #ifdef __cplusplus } #endif This has been carried over since then, until the recent SSLeay.xs updates to allow compilation with a C++ compiler caused a compilation failure. Recent GCC and Clang C++ compilers do not care about the 'extern "C"' wrapper but Visual Studio Community 2022 flagged the following error (see GH-438): 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 When 'extern "C" {}' is removed completely, the compilation succeeds. This makes sense since apparently the purpose of 'extern "C" {}' is to wrap one's own functions instead of headers included from elsewhere. Those headers should have their own 'extern "C" {}' definitions, if any are needed.
'extern "C" {}' block has wrapped Perl XS standard includes since the beginning. The earliest version found from the net is Net_SSLeay.pm version 0.4 in which the following was already present: #ifdef __cplusplus extern "C" { #endif #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #ifdef __cplusplus } #endif This has been carried over since then, until the recent SSLeay.xs updates to allow compilation with a C++ compiler caused a compilation failure. Recent GCC and Clang C++ compilers do not care about the 'extern "C"' wrapper but Visual Studio Community 2022 flagged the following error (see GH-438): 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 When 'extern "C" {}' is removed completely, the compilation succeeds. This makes sense since apparently the purpose of 'extern "C" {}' is to wrap one's own functions instead of headers included from elsewhere. Those headers should have their own 'extern "C" {}' definitions, if any are needed.
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 Perl/perl5#16459 (comment).)
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,
The text was updated successfully, but these errors were encountered: