Skip Menu |

This queue is for tickets about the Crypt-OpenSSL-Random CPAN distribution.

Report information
The Basics
Id: 56455
Status: resolved
Priority: 0/
Queue: Crypt-OpenSSL-Random

People
Owner: Nobody in particular
Requestors: kmx [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.06



Subject: Win32 compatibility patch
Hi,

Please consider aplying the following simple patch to Makefile.PL that enables building this module on Win32 Strawberry Perl

diff -ru Crypt-OpenSSL-Random-0.04.orig\Makefile.PL Crypt-OpenSSL-Random-0.04\Makefile.PL
--- Crypt-OpenSSL-Random-0.04.orig\Makefile.PL    Mon Apr 09 04:17:54 2001
+++ Crypt-OpenSSL-Random-0.04\Makefile.PL    Sat Apr 10 08:51:32 2010
@@ -5,7 +5,7 @@
     'NAME'        => 'Crypt::OpenSSL::Random',
     'VERSION_FROM'    => 'Random.pm', # finds $VERSION
     'PREREQ_PM'        => {}, # e.g., Module::Name => 1.1
-    'LIBS'            => ['-lssl -lcrypto'],   # e.g., '-lm'
+    'LIBS'            => ($^O eq 'MSWin32') ? ['-lssl32 -leay32'] : ['-lssl -lcrypto'],
     'DEFINE'        => '', # e.g., '-DHAVE_SOMETHING'
     'INC'        => '', # e.g., '-I/usr/include/other'
 );


--
kmx
From: mpapet [...] yahoo.com
On Sat Apr 10 03:16:10 2010, KMX wrote: Show quoted text
> Hi, > > Please consider aplying the following simple patch to Makefile.PL that > enables > building this module on Win32 Strawberry Perl > > diff -ru Crypt-OpenSSL-Random-0.04.orig\Makefile.PL > Crypt-OpenSSL-Random-0.04\Makefile.PL > --- Crypt-OpenSSL-Random-0.04.orig\Makefile.PL Mon Apr 09 04:17:54 > 2001 > +++ Crypt-OpenSSL-Random-0.04\Makefile.PL Sat Apr 10 08:51:32 2010 > @@ -5,7 +5,7 @@ > 'NAME' => 'Crypt::OpenSSL::Random', > 'VERSION_FROM' => 'Random.pm', # finds $VERSION > 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 > - 'LIBS' => ['-lssl -lcrypto'], # e.g., '-lm' > + 'LIBS' => ($^O eq 'MSWin32') ? ['-lssl32 -leay32'] : ['-lssl > -lcrypto'], > 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING' > 'INC' => '', # e.g., '-I/usr/include/other' > ); > > > -- > kmx
Hello, This change works for me on Strawberry Perl. I recommend it.
On Sat Apr 10 03:16:10 2010, KMX wrote: Show quoted text
> Please consider aplying the following simple patch to Makefile.PL that > enables > building this module on Win32 Strawberry Perl
This change doesn't make module working on ActiveState with MSVC compiler. Additional check should be made to use '-llibeay32 -lssleay32' if $Config{'cc'} eq 'cl' Show quoted text
> + 'LIBS' => ($^O eq 'MSWin32') ? ['-lssl32 -leay32'] : ['-lssl > -lcrypto'],
-- Serguei Trouchelle
Show quoted text
> This change doesn't make module working on ActiveState with MSVC
> compiler. Additional check should be made to use '-llibeay32 -lssleay32'
> if $Config{'cc'} eq 'cl'

OK, here is another approach covering MSVC as well as GCC compiler on MS Windows.

Please put the enclosed file MSWin32.pl to Crypt-OpenSSL-Random-0.04\hints\MSWin32.pl (no changes to Makefile.PL needed).

--
kmx

Subject: MSWin32.pl
use Config; $self->{LIBS} = ['-lssleay32 -llibeay32'] if $Config{cc} =~ /cl/; $self->{LIBS} = ['-lssl32 -leay32'] if $Config{cc} =~ /gcc/;
This was fixed in 0.05 (unofficial release) and is in the new official releases. -- Reini Urban
Subject: Re: [rt.cpan.org #56455] Win32 compatibility patch
Date: Wed, 04 Feb 2015 12:06:46 +0100
To: bug-Crypt-OpenSSL-Random [...] rt.cpan.org
From: kmx <kmx [...] cpan.org>
Unfortunately the newly added hints/MSWin32.pl was not added to MANIFEST so it is not included in the distribution tarball -- kmx
On Wed Feb 04 06:07:02 2015, KMX wrote: Show quoted text
> Unfortunately the newly added hints/MSWin32.pl was not added to MANIFEST > so it is not included in the distribution tarball
Oops. I really need the usual meta tests -- Reini Urban
Should be fixed now in the new 0.09. thanks! -- Reini Urban