[Distutils] Re: [4suite] Re: Compiling 4Suite 0.10.2beta on Windows
Jason Tishler
Jason.Tishler@dothill.com
Thu Feb 22 11:25:00 2001
Rene,
On Thu, Feb 22, 2001 at 09:25:00AM +0100, Rene Liebscher wrote:
> Jason Tishler wrote:
> > If one uses the current Cygwin gcc in Mingw mode (i.e., -mno-cygwin),
> > then their extensions will use a different C runtime (i.e., crtdll.dll)
> > than the one used by the Win32 Python interpreter (i.e., msvcrt.dll).
> > IIRC, this is bound to cause problems such as crashing the interpreter.
I was just referring to the following above:
http://starship.python.net/crew/kernr/mingw32/Notes.html
Specifically, the following snippet:
Caveats and Miscellaneous Notes
o Always use MSVCRT.dll: The official Win32 Python distribution
is linked against MSVCRT.dll. Extension modules compiled against
CRTDLL.dll work in many instances, but will cause crashes
sometimes. For example, when a FILE * pointer is passed from the
extension to any function from python15.dll, the interpreter will
crash. Similarly, whenever the interpreter tries to print the
representation of an extension object, it will also crash:
>>> import myextension
>>> foo = myextension.new_object()
>>> foo
*** Horrible, disgusting crash. ***
> For gcc 2.91.57 I had this behaviour, in this case adding the msvcrt
> library to the to linking libraries solved the problem.
> A later version (2.95.2-??) worked without problems for the extensions
> I used.
> Maybe adding the msvcrt library could also help in your case.
> (If I understand it right, gcc uses then C functions from msvcrt because
> it is checked first for the necessary symbols.)
I never thought about manually adding the msvcrt.lib -- that is an
interesting solution.
The bottom line is if you do an "objdump -p" on your shared extension
and it is *not* dependent on crtdll.dll, then it will function properly.
If it is, then it may not.
Jason
--
Jason Tishler
Director, Software Engineering Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp. Fax: +1 (732) 264-8798
82 Bethany Road, Suite 7 Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA WWW: http://www.dothill.com