On Nov 12, 2012, at 5:36 AM, Ralf Schmitt <[email protected]> wrote:
> Václav Šmilauer <[email protected]> writes: > >> Hi everybody, >> >> I recently (inconclusively) discussed on the mingw-w64 mailing list >> why are compiled modules linked to msvcrt90 (depending on python >> build) rather than to msvcrt. A compiled module was crashing (the DLL >> would not load with "invalid access to memory and such") with msvcr90, >> while it works just fine with msvcrt. > > I've also had problems with that with mingw-w64. The programs using > mingw-w64 compiled extensions did crash randomly. > > I've replaced get_msvcr() in distutils/cygwinccompiler.py to just return > an empty list: > > def get_msvcr(): > """Include the appropriate MSVC runtime library if Python was built > with MSVC 7.0 or later. > """ > + return [] > >> >> My understanding (based on >> http://msdn.microsoft.com/en-us/library/abx4dbyh.aspx, >> http://msdn.microsoft.com/en-us/library/ms235460.aspx and my >> aforementioned experience) is that loading two MSVC runtimes at the >> same time is asking for trouble. Dependency Walker shows me that >> python27.dll itself is linking against msvcrt.dll, but >> distutils.cygwincompiler will link against msvcrt90 nevertheless. This >> means both end up loaded. >> >> OTOH I suppose there is a good reason why msvc version detection >> exists, but I am just ignorant of it and would like to ask here. > > My guess would be that it's needed for some older gcc version. It looks > like none of the python developers care enough to fix issues with > mingw-w64. Has someone already tried filing an issue about this on the tracker (bugs.python.org)? Otherwise, I wouldn't jump to this conclusion. --Chris > > -- > Cheers > Ralf > _______________________________________________ > Distutils-SIG maillist - [email protected] > http://mail.python.org/mailman/listinfo/distutils-sig _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
