Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Installing Crypt Blowfish module

by Rachna (Sexton)
on Oct 01, 2007 at 21:25 UTC ( [id://642002]=perlquestion: print w/replies, xml ) Need Help??

Rachna has asked for the wisdom of the Perl Monks concerning the following question:

This was my first attempt to use Crypt::Blowfish (or for that mattter any Crypt module). I ran into quite a few problems and thought it would be good idea to post it in case some other poor soul is looking for direction.

I had read in a node here on PM that ActiveState had dropped support for the Crypt::modules due to legal issues. See here on ASPN for details.

1. I could install the Crypt::CBC from ppm: ppm install Crypt-CBC

2. For windows, I installed nmake from: http://support.microsoft.com/kb/132084/en-us. and copied nmake.err and nmake.exe into my perl bin.

3. Next I needed the C compiler for Windows. I downloaded the free MS Visual C++ 2005 Express Edition from: http://msdn2.microsoft.com/en-us/express/aa975050.aspx

4. I then had to install the "Microsoft Platform SDK for Windows Server 2003 R2"

5. I believe you also need .Net framework which I already had.

6. Finally I could run the nmake, nmake install without any errors but when I tried to run a perl test with the Crypt::Blowfish module, it threw an error saying:
"The application has failed to start because MSVCR80.dll was not found"

I found the dll in one of the MS Visual studio directories and added that to the path but it threw different error:
"The procedure entry point _except_handler4_common could not be located in the dynamic link library MSVCR80.dll"

7. I then found a node which tells you to add perl.exe.manifest file to the same dir as perl.exe. I took out the dir which I added in the path for msvcr80.dll in step 6 above, added the manifest file and it worked!

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1. +0"> <assemblyIdentity version="0.0.0.0" processorArchitecture="X86" name=" +Perl" type="win32" /> <description>Perl</description> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50215.4631" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"> </assemblyIdentity> </dependentAssembly> </dependency> </assembly>
-Rachna

Edit: g0n - removed pre tags

Replies are listed 'Best First'.
Re: Installing Crypt Blowfish module
by syphilis (Archbishop) on Oct 02, 2007 at 11:09 UTC
    Hi Rachna,

    Curious ... adding the perl.exe.manifest enabled MSVCR80.dll to be found .... and it fixed up the problem with the missing procedure entry point.

    Anyone care to elaborate on precisely *how* the .manifest file fixed those specific problems ? (It's got me beat.)

    Cheers,
    Rob
      It seems Visual C++ 2005 uses a new deployment model for windows apps. It uses the manifest file to find the C Runtime libraries. The CRT libraries were installed under C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.* when I installed the free version of Visual C++.

      The directory name has the Processor Architecture, publicKeyToken, version number. Also, the manifest doesnt seem to mind as long as the version number matches till 8.0.50

      Here is the link to the msdn article which has details.

Re: Installing Crypt Blowfish module
by randyk (Parson) on Oct 02, 2007 at 19:51 UTC

    It's also possible to embed the manifest file in the executable by running

    mt /manifest whatever.exe.manifest /outputresource:whatever.exe;#1
    in the directory in which the manifest file was originally created during compilation. The same thing works for dlls, except a #2 is used at the end, rather than #1. If this is done, the manifest file need not be manually moved to the installation directory.

    By the way, ExtUtils::MakeMaker, as of version 6.33, will do this automatically when building xs extensions.

A reply falls below the community's threshold of quality. You may see it by logging in.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://642002]
Approved by throop
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-26 01:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found