-
Notifications
You must be signed in to change notification settings - Fork 45
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
GH-454 Makefile.PL, XS and installation fixes #455
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cherry-picked with conflict resolution by hvn from PR 188 commit 4ecea05
Fix additional cases with code before variable declarations. These were added before the longer commit by bulk88 which fixed a lot of previously existing cases. Note that Perl 5.35.5 and later relax this requirement because 5.35.5 and later versions use some of C99 (C standard ISO/IEC 9899:1999) features. Gcc and Clang flag -Werror=declaration-after-statement is especially mentioned as something that should only be used with Perl versions earlier than 5.35.5. https://perldoc.perl.org/5.35.5/perldelta#Configuration-and-Compilation SSLeay.xs currently avoids code before declarations.
-dates to day 1 commit cb98af3 Fixed some compiler warnings. Courtesy kmx. Fixed a problem with Win32 detection. Courtesy kmx. git-svn-id: r334 Committer: Mike McCauley <[email protected]> 2012-04-02 04:38:39 ----------------- this caused ----------------- C:\sources\p5-net-ssleay>perl Makefile.PL Do you want to run external tests? These tests *will* *fail* if you do not have network connectivity. [n] y *** Found OpenSSL-1.1.1g installed in C:\Program Files\OpenSSL-Win32 *** Be sure to use the same compiler and options to compile your OpenSSL, perl, and Net::SSLeay. Mixing and matching compilers is not supported. Warning (mostly harmless): No library found for -llibeay32 Warning (mostly harmless): No library found for -lssleay32 Generating a gmake-style Makefile Writing Makefile for Net::SSLeay ------------------- With Shining Light precompiled OpenSSL and eventual there is a link failure since the lib file paths dont exist that are given to EUMM and EUMM eventually puts in MKF then fed to link.exe cmd line, since the $dir loop kept spinning and push new paths into %opts even though in an earlier iteration the .lib file was found on disk -fix a CC warning too about redefinition, perl core provides this flag automatic nowadays if the VC version is new enough to need this
The current versions of Shining Light OpenSSL MSI installer use installation paths that are not in the list of prefixes tested by Makefile.PL. At the time of writing, the MSI installers are Win64OpenSSL-1_1_1w.msi, Win64OpenSSL-3_0_12.msi, Win64OpenSSL-3_1_4.msi and Win64OpenSSL-3_2_0.msi. The 32bit versions are named as Win32OpenSSL-1_1_1w.msi, etc. The exe installers seem to use the same locations as the msi installers. Caveats: static linking seems to require linking against libcrypto_static and libssl_static. The existing static compilation flag in Makefile.PL currently searches for libraries with a different path, instead of setting up linking to against specially named libraries. In other words, static linking seems to have changed and may change in the future. If you need static linking, you likely need to modify Makefile.PL to suit your needs. When both 32bit and 64bit Shining Light OpenSSL versions are installed, Makefile.PL prefix guessing can choose wrong prefix. In this case it's currently easiser to set OPENSSL_PREFIX environment variable.
With Linux and macOS, for example, compiling OpenSSL and Net::SSLeay with gcc and clang appears to work these days. It's even possible to compile Net::SSLeay with a C++ compiler and link it against OpenSSL compiled with a C compiler. On some other platforms it may still be required to use matching compiler and flags, but it seems not to be universally required anymore.
…ssl header files in a non-standard location.
h-vn
added
bug
Something isn't working
enhancement
New feature or request
tech-debt
Technical debt
labels
Jan 1, 2024
This was referenced Jan 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-pick and update commits from pull request #188 by bulk88. All changes in #188 should now be addressed. Also cherry-pick installation instruction fixes to README in pull request #444 by viviparous. Fix and model some of the code in
SSLeay.xs
added after PR #188 to match corrections in the pull request.Net::SSLeay now compiles against Shining Light OpenSSL 1.1.1w, 3.0.12, 3.1.4 and 3.2.0 packages.
Makefile.PL
now includes the OpenSSL installation paths these packages use.Closes #188, closes #444 and closes #454