Skip to content

Commit

Permalink
Don't automatically detect libssl/libcrypto with ExtUtils::PkgConfig
Browse files Browse the repository at this point in the history
This reverts da6292e.

The automatic detection of libssl/libcrypto with pkg-config conflicts
with the OPENSSL_PREFIX method of specifying where Makefile.PL should
look for libssl/libcrypto. The one known failure case at the moment is
when OPENSSL_PREFIX points to a copy of OpenSSL that has compression
enabled, but pkg-config points to a copy of OpenSSL that doesn't have
compression enabled - this causes "-lz" to be omitted from the list of
options passed to the linker, causing a compilation failure. There may
be other failure cases.

The automatic detection of libssl/libcrypto is a very useful feature, so
we'll find and fix all the edge cases and bring it back in time for
Net-SSLeay 1.96.

Fixes radiator-software#465.
  • Loading branch information
chrisnovakovic committed Jan 6, 2024
1 parent 5982bc5 commit 415feb3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
13 changes: 12 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
Revision history for Perl extension Net::SSLeay.

1.94_04 2024-01-05
????
- Remove support for automatic detection of libssl/libcrypto via pkg-config
with ExtUtils::PkgConfig if it is installed, due to the compiler and linker
options provided by pkg-config being used unconditionally (which is
incompatible with the OPENSSL_PREFIX detection method). The implementation of
this was merged in time for developer release 1.93_03 and therefore hasn't
been included in a stable release yet, so this doesn't represent a breaking
change to the way in which libssl/libcrypto are detected by Makefile.PL. This
is, however, a very useful feature, and we intend to bring it back in time
for Net-SSLeay 1.96 after ironing out the remaining bugs.

1.93_04 2024-01-05
- Use -DOPENSSL_API_COMPAT=908 when compiling SSLeay.xs to
suppress OpenSSL deprecation warnings.
- Expose a number of functions that were added in recent
Expand Down
7 changes: 1 addition & 6 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -319,12 +319,7 @@ EOM
@{ $opts->{lib_links} } = map { $_ =~ s/32\b//g } @{ $opts->{lib_links} } if $Config{use64bitall};
}
else {
if ( eval { require ExtUtils::PkgConfig; ExtUtils::PkgConfig->VERSION('1.16') } && ExtUtils::PkgConfig->exists('openssl') ) {
push @{ $opts->{lib_links} }, map { s/^-l//; $_ } split(' ', ExtUtils::PkgConfig->libs_only_l('openssl'));
}
else {
push @{ $opts->{lib_links} }, qw( ssl crypto z );
}
push @{ $opts->{lib_links} }, qw( ssl crypto z );

if (($Config{cc} =~ /aCC/i) && $^O eq 'hpux') {
print "*** Enabling HPUX aCC options (+e)\n";
Expand Down

0 comments on commit 415feb3

Please sign in to comment.