[SciPy-dev] Problems with writing files and windows binary of scipy core on 2.4

Travis Oliphant oliphant at ee.byu.edu
Wed Nov 16 13:45:19 CST 2005


Robert Kern wrote:

>Travis Oliphant wrote:
>  
>
>>Well, the old mingw32 - Python 2.4 problem has raised its head again.
>>
>>The scipy core binaries I released for Python 2.4 (and probably the full 
>>scipy ones as well), segfault when using the tofile method.
>>
>>Apparently this is the same problem that existed with old scipy and 
>>Python 2.4
>>
>>The solution apparently is to link multiarraymodule.o against msvcr71.a 
>>when compiling with mingw32 under Python 2.4.   Is there an elegant way 
>>to do this, or is a hack the only thing that we can do.  I just did it 
>>manually to fix the problem with the binaries.
>>    
>>
>
>See the "begging for binaries" thread. I think the approach that finally
>worked was this (having fixed the unfortunate typo I originally wrote):
>
>Find the gcc specs file. If gcc.exe is %mingwpath%\bin\gcc.exe, and the
>version is %mingwversion%, then the specs file should be
>$mingwpath%\lib\gcc\%mingwversion%\specs . Change "-lmsvcrt" to
>"-lmsvcr71".
>
>Now, edit scipy_distutils/mingw32ccompiler.py at around line 102 or so:
>
>"""
>        # no additional libraries needed
>        self.dll_libraries=[]
>        return
>"""
>
>to
>
>"""
>        # no additional libraries needed
>        self.dll_libraries=['msvcr71']
>        return
>"""
>
>  
>
The only problem is that on Python2.3 you should not link against 
msvcr71, otherwise you get segfaults.  It all depends what Python was 
linked against I suppose.   I can see how to fix this for the 
mingw32ccompiler.py file, but what about the gcc specs file -- will it 
matter?

-Travis





More information about the Scipy-dev mailing list