[Numpy-discussion] Segfault in mingw in test_arrayprint.TestComplexArray

Ondřej Čertík ondrej.certik at gmail.com
Tue Jul 24 20:38:05 EDT 2012


Possible conclusion:

I think I know what is going on. I use

$ wine --version
wine-1.3.28

and it installs (by default) the following msvcr libraries:


$ ls ~/.wine/drive_c/windows/winsxs/
manifests
Policies
x86_microsoft.msxml2_6bd6b9abf345378f_4.1.0.0_none_deadbeef
x86_microsoft.vc80.crt_1fc8b3b9a1e18e3b_8.0.50727.4053_none_deadbeef
x86_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.4148_none_deadbeef
x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.2982_none_deadbeef
x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.6000.16386_none_deadbeef
x86_microsoft-windows-msxml30_31bf3856ad364e35_6.0.6000.16386_none_deadbeef
x86_microsoft-windows-msxml60_31bf3856ad364e35_6.0.6000.16386_none_deadbeef


And the msvcr90.dll is in the *vc90* directory. This msvcr90.dll
cannot be read by our objdump. As such, I just remove it using "rm".
The Python installer installs the following directory:

x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375

and that is a good library. NumPy picks it up automatically and all is
ok. I also copy this good dll into C:\MinGW\libs, so that it is picked
up by the "ld" linker. Otherwise the numpy build also fails.

As such, here is my updated setup-wine.sh script:

https://gist.github.com/3170576

In there, I still need to copy $tarballs/msvcr90.dll into lib/  (which
David does not recommend, but if I don't do that, then any compilation
with "gcc something.c -lmsvcr90" will fail, even though "gcc
something.c" works).

Once this script is run, then numpy builds out of the box just using:

wine python setup.py build --compiler=mingw32 install

and all tests run via:

wine python -c "import numpy; numpy.test()"

with no segfault. So I think that this is a lot of progress. Let me
now test this numpy binary on a Windows machine.

Ondrej



More information about the NumPy-Discussion mailing list