[prev in list] [next in list] [prev in thread] [next in thread] 

List:       botan-devel
Subject:    [Botan-devel] New win32 binaries
From:       joel () joelsplace ! sg (Joel Low)
Date:       2010-03-16 23:24:42
Message-ID: CE3C87573DB3DD48AFE5E7A58AEB16CF15D56E97B7 () SERVER ! lowfamily ! local
[Download RAW message or body]

Hey all,

Comments inline.

Regards,
Joel

> -----Original Message-----
> From: botan-devel-bounces at randombit.net [mailto:botan-devel-
> bounces at randombit.net] On Behalf Of Jack Lloyd
> Sent: Wednesday, 17 March, 2010 4:29 AM
> To: botan-devel at randombit.net
> Subject: Re: [Botan-devel] New win32 binaries
> 
> On Tue, Mar 16, 2010 at 08:11:27PM +0000, James Mansion wrote:
> > Jack Lloyd wrote:
> > > http://botan.randombit.net/files/win32/botan-1.9.5-dev.exe
> > >
> > > This was generated from mainline. Using VC2008 with /MD
> > > (multithreaded+dynamic link).
> > >
> > > I'd be curious if it works anywhere that's not my XP VM.
> > > _______________________________________________
> > > botan-devel mailing list
> > > botan-devel at randombit.net
> > > http://lists.randombit.net/mailman/listinfo/botan-devel
> > >
> > I'm on a win7/64 machine with vs2008 express installed.
> >
> >  From a vs2008 command prompt builds go OK, but trying to run it
> gives:
> >
> > The program can't start because MSVCP90.dll is missing from your
> computer.
> 
> I think this is the same problem as here:
>   http://stackoverflow.com/questions/1158705/msvcp90-dll-not-found
[Joel Low] I think that's because your main binary links to the runtimes
statically, but Botan is linked dynamically. The manifest of the DLL is not
checked (only the main executable is) so msvcp90/msvcr90.dll isn't loaded
through manifests, yielding a missing DLL. I'm not too sure, but I've always
had the habit of embedding the manifests in the DLLs as well, as resource #2
(I remembered somewhere that had a special meaning, but I can't remember
where exactly.)

> 
> Solution being copying msvcp90.dll from the redist directory
> (the stackoverflow post gives as the path
> "C:\Program Files\Microsoft Visual Studio
> 9.0\VC\redist\x86\Microsoft.VC90.CRT",
> my VM is shut down so I can't check that ATM) to c:\windows\system32,
[Joel Low] This will cause the runtime to raise an error at startup
something to the effect of "This is an unsupported way of loading the C/C++
runtime"

> or else installing the redistributable package at
> http://www.microsoft.com/downloads/details.aspx?FamilyID=9b2da534-3e03-
> 4391-8a4d-074b9f2bc1bf&displaylang=en
[Joel Low] That's necessary, above part 1.

> though I think that is not necessary since you have vc2008 installed,
> so what you already have in redist should be the same files as what is
> in the package.
> 
> This is a side-effect of building it with /MD ("Be aware that if you
> use the Standard C++ Library, your program will need MSVCP90.DLL to
> run.") - http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx
> 
> http://msdn.microsoft.com/en-us/library/2kzt1wy3.aspx (love these
> URLs) says that if you define _STATIC_CPPLIB with /MD, you get a DLL C
> runtime with static C++ runtime. I would think that the C runtime is
> everywhere so that might be OK; I had expected the C++ runtime would
> be as well, but clearly not. Things are strange in Windows-land. :/
[Joel Low] Nope, the C and C++ runtimes have different versions (currently,
5, if you include VS2010, 6) and you can't depend on msvcrXX and msvcpYY at
the same time (XX != YY)
> 
> It's unclear to me if there is a better solution for this. /MT does
> multithreading, static link, meaning no DLL is needed... but I'm not
> sure if this means duplicate copies of the C++ runtime are included,
> or if this causes other weird problems. I really don't understand
> Windows runtime linking and related issues that well.
[Joel Low] The usual problem with this is that global variables don't work
as expected (the culprit that comes to mind immediately is errno) and that
multiple copies of the runtime is loaded to memory (which is a waste, but
not a real problem in itself, apart from the globals thing.)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5173 bytes
Desc: not available
URL: <http://lists.randombit.net/pipermail/botan-devel/attachments/20100317/7e99bb63/smime.p7s>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic