Skip Menu |

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

Report information
The Basics
Id: 32084
Status: resolved
Worked: 30 min
Priority: 0/
Queue: Crypt-SSLeay

People
Owner: dland [...] cpan.org
Requestors: nicholas [...] oxhoej.dk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.57_03



Subject: Wrong INC_DIR in Makefile.PL of Crypt-SSLeay-0.57
Date: Fri, 04 Jan 2008 13:39:36 +0100
To: bug-Crypt-SSLeay [...] rt.cpan.org
From: Nicholas Oxhøj <nicholas [...] oxhoej.dk>
I am trying to compile Crypt-SSLeay-0.57 against openssl 0.9.8b for Solaris 10 from sunfreeware. But in Makefile.PL the Candidate function in line 331 seems to correctly set $prefix to 'openssl/' - but fails to delete the '/openssl' part from $inc_dir, the same way as it is done if ($^O eq 'MSWin32'). This causes the compiler to be unable to find the openssl include files.
On Fri Jan 04 07:42:06 2008, nicholas@oxhoej.dk wrote: Show quoted text
> I am trying to compile Crypt-SSLeay-0.57 against openssl 0.9.8b for > Solaris 10 from sunfreeware. > > But in Makefile.PL the Candidate function in line 331 seems to correctly > set $prefix to 'openssl/' - but fails to delete the '/openssl' part from > $inc_dir, the same way as it is done if ($^O eq 'MSWin32'). This causes > the compiler to be unable to find the openssl include files.
Hello Nicholas, yes, this is one part of the code that I haven't cleaned up completely since taking over maintenance. Other people have noticed the problem as well. I have a Solaris box at work, I'll try and see if I can reproduce the behaviour. Regards, David Landgren
On Fri Jan 04 07:42:06 2008, nicholas@oxhoej.dk wrote: Show quoted text
> I am trying to compile Crypt-SSLeay-0.57 against openssl 0.9.8b for > Solaris 10 from sunfreeware. > > But in Makefile.PL the Candidate function in line 331 seems to correctly > set $prefix to 'openssl/' - but fails to delete the '/openssl' part from > $inc_dir, the same way as it is done if ($^O eq 'MSWin32'). This causes > the compiler to be unable to find the openssl include files.
Nicholas, I cannot reproduce this on my Solaris box. Could you please past the full output of a perl Makefile.PL run, and the contents of crypt_ssleay_version.h ? Thanks, David
Subject: Re: [rt.cpan.org #32084] Wrong INC_DIR in Makefile.PL of Crypt-SSLeay-0.57
Date: Mon, 18 Feb 2008 15:39:25 +0100
To: bug-Crypt-SSLeay [...] rt.cpan.org
From: Nicholas Oxhøj <nicholas [...] oxhoej.dk>
Hi David Unfortunately I have never been able to log in to rt.cpan.org, even though I have created a Bitcard account, so I am going to have to reply by mail. Hope this is OK... ------ Output from perl Makefile.PL ------ ======================================================= Only one OpenSSL installation found at /usr/local/ssl Consider running 'perl Makefile.PL --default' the next time Crypt::SSLeay is upgraded to select this directory automatically thereby avoiding the following prompt. ======================================================= Which SSL install path do you want to use? [/usr/local/ssl] BUILD INFORMATION ================================================ ssl library: OpenSSL 0.9.8 in /usr/local/ssl ssl header: openssl/ssl.h libraries: -L/usr/local/ssl/lib -lssl -lcrypto -lgcc include dir: -I/usr/local/ssl/include/openssl ================================================ Checking if your kit is complete... Looks good Note (probably harmless): No library found for -lgcc Writing Makefile for Crypt::SSLeay The test suite can attempt to connect to public servers to ensure that the code is working properly. If you are behind a strict firewall or have no network connectivity, these tests may fail (through no fault of the code). Do you want to run the live tests (y/N) ? [N] --------------------------------------- --------- crypt_ssleay_version.h ------ |#include "openssl/ssl.h" #include "openssl/crypto.h" #include "openssl/err.h" #include "openssl/rand.h" #include "openssl/pkcs12.h" #define CRYPT_SSLEAY_free OPENSSL_free| --------------------------------------- This ends up giving the following errors during make: studio11/SUNWspro/bin/cc -c -I/usr/local/ssl/include/openssl -R/usr/local/BerkeleyDB.4.6/lib -mt -I/usr/local/BerkeleyDB.4.6/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV -O -DVERSION=\"0.57\" -DXS_VERSION=\"0.57\" -KPIC "-I/opt/td/perl/lib/5.8.8/sun4-solaris/CORE" SSLeay.c "crypt_ssleay_version.h", line 1: cannot find include file: "openssl/ssl.h" "crypt_ssleay_version.h", line 2: cannot find include file: "openssl/crypto.h" "crypt_ssleay_version.h", line 3: cannot find include file: "openssl/err.h" "crypt_ssleay_version.h", line 4: cannot find include file: "openssl/rand.h" "crypt_ssleay_version.h", line 5: cannot find include file: "openssl/pkcs12.h" . . . David Landgren via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=32084 > > > On Fri Jan 04 07:42:06 2008, nicholas@oxhoej.dk wrote: >
>> I am trying to compile Crypt-SSLeay-0.57 against openssl 0.9.8b for >> Solaris 10 from sunfreeware. >> >> But in Makefile.PL the Candidate function in line 331 seems to correctly >> set $prefix to 'openssl/' - but fails to delete the '/openssl' part from >> $inc_dir, the same way as it is done if ($^O eq 'MSWin32'). This causes >> the compiler to be unable to find the openssl include files. >>
> > Nicholas, > > I cannot reproduce this on my Solaris box. Could you please past the > full output of a perl Makefile.PL run, and the contents of > crypt_ssleay_version.h ? > > Thanks, > David >
I have had the exact same problem with building Crypt-SSLeay-0.57 on Solaris 10 with openssl installed in /usr/local/ssl from sunfreeware. The following patch works for me. --Aaron
--- Makefile.PL Mon Sep 17 16:36:59 2007 +++ Makefile.PL.new Wed Feb 20 20:17:54 2008 @@ -327,6 +327,10 @@ $inc_dir =~ s{\/openssl\z}{}; $prefix = 'openssl/'; } + elsif ($inc_dir =~ m{include/openssl$} ) { + $prefix = ($inc_dir =~ /\bopenssl/i) ? 'openssl/' : ''; + $inc_dir =~ s{\/openssl\z}{}; + } else { $prefix = ($inc_dir =~ /\bopenssl/i) ? 'openssl/' : ''; }
I solved the problem with this patch. --- Crypt-SSLeay-0.57/Makefile.PL.orig 2008-07-04 13:47:06.000000000 +0200 +++ Crypt-SSLeay-0.57/Makefile.PL 2008-07-04 13:58:59.000000000 +0200 @@ -328,7 +328,7 @@ $prefix = 'openssl/'; } else { - $prefix = ($inc_dir =~ /\bopenssl/i) ? 'openssl/' : ''; + $prefix = ($inc_dir =~ s{\/openssl\z}{}) ? 'openssl/' : ''; } open(VERSION_FILE, $version_file) or return;