Skip Menu |

This queue is for tickets about the Filter-Crypto CPAN distribution.

Report information
The Basics
Id: 38780
Status: resolved
Priority: 0/
Queue: Filter-Crypto

People
Owner: Nobody in particular
Requestors: erikweidel [...] web.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in:
  • 1.21
  • 1.22
Fixed in: (no value)



Subject: installation problems with integration of OpenSSL
I have encountered some problems when trying to install Filter-Crypto. I use MinGW with a gcc-3.4.5 for compiling in a Windows XP environment and OpenSSL-0.9.8b. After extracting the Filter-Crypto.tar.gz, I ran "perl Makefile.pl". The question "Where is your OpenSSL or SSLeay? []" was answered with "c:\Programme\OpenSSL". After that the installer came up with this error: Found include directory ............ C:\Programme\OpenSSL\include Found OpenSSL version .............. 0.9.8b Error (109): No crypto library found at Makefile.PL line 83 In c:\Programme\OpenSSL my installation of Win32OpenSSL-v0.9.8b.exe resides, which I have downloaded some time ago from http://www.slproweb.com/products/Win32OpenSSL.html. In c:\Programme\OpenSSL exists a directory "lib" with three subdirectories: "Builder5", "MinGW" and "VC". After patching "inc/Module/Install/PRIVATE/Filter/Crypto.pm", it worked (See attached Crypto.pm.patch). When trying to compile using "nmake", I got some "undefined reference" errors when linking CryptFile\CryptFile.dll and Decrypt\Decrypt.dll: CryptFile.o:CryptFile.c:(.text+0x309): undefined reference to `EVP_aes_256_cbc' So I added "c:\Programme\OpenSSL\lib\MinGW\libeay32.a" to the gcc-call. After that, everything worked fine ! Maybe you can have a look at that. I do not think that my installation of MinGW and OpenSSL is so "exotic" so maybe others have the same problems. Thanks a lot !!!
Subject: Crypto.pm.patch
*** Crypto.pm Thu Aug 28 08:04:46 2008 --- Crypto.pm.patched Thu Aug 28 08:04:33 2008 *************** *** 518,524 **** $lib_dir = $dir; } elsif ($self->is_win32()) { ! if (-d ($dir = catdir($prefix_dir, 'out32')) and ($lib_file, $lib_name) = $self->probe_for_lib_file($dir)) { $lib_dir = $dir; --- 518,529 ---- $lib_dir = $dir; } elsif ($self->is_win32()) { ! if (-d ($dir = catdir($prefix_dir, 'lib/MinGW')) and ! ($lib_file, $lib_name) = $self->probe_for_lib_file($dir)) ! { ! $lib_dir = $dir; ! } ! elsif (-d ($dir = catdir($prefix_dir, 'out32')) and ($lib_file, $lib_name) = $self->probe_for_lib_file($dir)) { $lib_dir = $dir;
On Thu Aug 28 04:23:59 2008, erikweidel wrote: Show quoted text
> I have encountered some problems when trying to install Filter-Crypto. > I use MinGW with a gcc-3.4.5 for compiling in a Windows XP environment > and OpenSSL-0.9.8b. > > After extracting the Filter-Crypto.tar.gz, I ran "perl Makefile.pl". > > The question "Where is your OpenSSL or SSLeay? []" > was answered with "c:\Programme\OpenSSL". > > > After that the installer came up with this error: > Found include directory ............ C:\Programme\OpenSSL\include > Found OpenSSL version .............. 0.9.8b > Error (109): No crypto library found at Makefile.PL line 83 > > In c:\Programme\OpenSSL my installation of Win32OpenSSL-v0.9.8b.exe > resides, which I have downloaded some time ago from > http://www.slproweb.com/products/Win32OpenSSL.html. > In c:\Programme\OpenSSL exists a directory "lib" with three > subdirectories: "Builder5", "MinGW" and "VC". > > After patching "inc/Module/Install/PRIVATE/Filter/Crypto.pm", it worked > (See attached Crypto.pm.patch). > > When trying to compile using "nmake", I got some "undefined reference" > errors when linking CryptFile\CryptFile.dll and Decrypt\Decrypt.dll: > CryptFile.o:CryptFile.c:(.text+0x309): undefined reference to > `EVP_aes_256_cbc' > So I added "c:\Programme\OpenSSL\lib\MinGW\libeay32.a" to the gcc-call. > > After that, everything worked fine !
I've had a look at that Win32 OpenSSL installer, and can't quite reproduce the problem. Certainly, the MinGW libraries are in the lib/MinGW folder, so the existing library detection code won't find them, and a patch like yours helps. I've therefore incorporated something like that into a proposed new version (Filter-Crypto-1.23), which I'm attaching here, but haven't released to CPAN yet because I'd like you to give it a try first if possible? In my case, I find that this is enough to fix the problem. I don't get your subsequent "undefined reference to 'EVP_aes_256_cbc'" error, hence I'd like some further investigation. That symbol is defined in libeay32.a, which is what should have been found in lib/MinGW, so you shouldn't need to manually add it--it should be being used already. If you re-run your patched Filter-Crypto, or better yet, try my attached version, what is the next line of output after this from the Makefile.PL program: ? Found include directory ............ C:\Programme\OpenSSL\include Found OpenSSL version .............. 0.9.8b It should be "Found crypto library ...............". What path does it give to the library that it has found? It should be C:\Programme\OpenSSL\lib\MinGW\libeay32.a. At least, that's what I get, and that's enough to make it work for me. If that's not what you get, or it still doesn't work for you, then could you please send me a complete directory listing of your C:\Programme\OpenSSL\lib folder (use the "dir /s" command)? It is possible that your lib folder layout is different to mine because I'm not using the same version of the Win32 OpenSSL installer as you--the website that you cited only has 0.9.7m, 0.9.8g and 0.9.8h on it now, and I can't find 0.9.8b like you're using anywhere. Thanks, Steve PS. One other thing: I'm a little puzzled why you said you ran the "nmake" command. Normally, that's only used for VC++ builds. If you're using MinGW or Borland then you should normally use the "dmake" command. Was that a typo on your part, or are you really using "nmake"?
Download Filter-Crypto-1.23.tar.gz
application/x-gzip 146.8k

Message body not shown because it is not plain text.

From: erikweidel [...] web.de
On Fr. 29. Aug. 2008, 03:58:27, SHAY wrote: Show quoted text
> On Thu Aug 28 04:23:59 2008, erikweidel wrote:
> > I have encountered some problems when trying to install Filter-Crypto. > > I use MinGW with a gcc-3.4.5 for compiling in a Windows XP environment > > and OpenSSL-0.9.8b. > > > > After extracting the Filter-Crypto.tar.gz, I ran "perl Makefile.pl". > > > > The question "Where is your OpenSSL or SSLeay? []" > > was answered with "c:\Programme\OpenSSL". > > > > > > After that the installer came up with this error: > > Found include directory ............ C:\Programme\OpenSSL\include > > Found OpenSSL version .............. 0.9.8b > > Error (109): No crypto library found at Makefile.PL line 83 > > > > In c:\Programme\OpenSSL my installation of Win32OpenSSL-v0.9.8b.exe > > resides, which I have downloaded some time ago from > > http://www.slproweb.com/products/Win32OpenSSL.html. > > In c:\Programme\OpenSSL exists a directory "lib" with three > > subdirectories: "Builder5", "MinGW" and "VC". > > > > After patching "inc/Module/Install/PRIVATE/Filter/Crypto.pm", it worked > > (See attached Crypto.pm.patch). > > > > When trying to compile using "nmake", I got some "undefined reference" > > errors when linking CryptFile\CryptFile.dll and Decrypt\Decrypt.dll: > > CryptFile.o:CryptFile.c:(.text+0x309): undefined reference to > > `EVP_aes_256_cbc' > > So I added "c:\Programme\OpenSSL\lib\MinGW\libeay32.a" to the gcc-call. > > > > After that, everything worked fine !
> > I've had a look at that Win32 OpenSSL installer, and can't quite > reproduce the problem. > > Certainly, the MinGW libraries are in the lib/MinGW folder, so the > existing library detection code won't find them, and a patch like yours > helps. > > I've therefore incorporated something like that into a proposed new > version (Filter-Crypto-1.23), which I'm attaching here, but haven't > released to CPAN yet because I'd like you to give it a try first if > possible? > > In my case, I find that this is enough to fix the problem. I don't get > your subsequent "undefined reference to 'EVP_aes_256_cbc'" error, hence > I'd like some further investigation. That symbol is defined in > libeay32.a, which is what should have been found in lib/MinGW, so you > shouldn't need to manually add it--it should be being used already. > > If you re-run your patched Filter-Crypto, or better yet, try my attached > version, what is the next line of output after this from the Makefile.PL > program: ? > > Found include directory ............ C:\Programme\OpenSSL\include > Found OpenSSL version .............. 0.9.8b > > It should be "Found crypto library ...............". What path does it > give to the library that it has found? > > It should be C:\Programme\OpenSSL\lib\MinGW\libeay32.a. At least, that's > what I get, and that's enough to make it work for me. > > If that's not what you get, or it still doesn't work for you, then could > you please send me a complete directory listing of your > C:\Programme\OpenSSL\lib folder (use the "dir /s" command)? It is > possible that your lib folder layout is different to mine because I'm > not using the same version of the Win32 OpenSSL installer as you--the > website that you cited only has 0.9.7m, 0.9.8g and 0.9.8h on it now, and > I can't find 0.9.8b like you're using anywhere. > > Thanks, > Steve > > PS. One other thing: I'm a little puzzled why you said you ran the > "nmake" command. Normally, that's only used for VC++ builds. If you're > using MinGW or Borland then you should normally use the "dmake" command. > Was that a typo on your part, or are you really using "nmake"?
Hi Steve, thanks again for your quick answers. I will try to be as fast as you :-) So here is what I have found out: The version 0.9.8b has the same directory structure as 0.9.8g (which I have now installed). I have just tried your version 1.23. Looks fine ! It finds the crypto library now. Here is the output of "perl Makefile.PL": --------------------- Where is your OpenSSL or SSLeay? [] c:\Programme\OpenSSL Found include directory ............ C:\Programme\OpenSSL\include Found OpenSSL version .............. 0.9.8g Found crypto library ............... C:\Programme\OpenSSL\lib\MinGW\ libeay32.a Found binary executable ............ C:\Programme\OpenSSL\bin\openssl.exe --------------------- So that works now for me ! The linker erros I had are indeed a result of my compiling environment. I have found a hint here (http://osdir.com/ml/lang.perl.par/2006-02/msg00017.html), which resolved it: Installing "ExtUtils::FakeConfig" and then calling "perl -MConfig_m Makefile.pl" creates a Makefile where the libeay32.a is included. Running "nmake" then compiles everything just fine. When calling "perl Makefile.PL", it creates one without libeay32.a. I think this call believes it to be a VC++ environment instead of MinGW, although it says "Set up gcc environment - 3.4.5 (mingw special)" !!! Concerning "nmake.exe" and "dmake.exe": The nmake.exe was automatically installed, when I installed PAR::Packer using "cpan" so I continued to use it instead of dmake.exe. Thanks again for your help ! Erik
Okay, thanks for checking. I've now uploaded 1.23 to CPAN.