[mpich2-dev] linking issues with MinGW on Windows Vista 32bits

Lisandro Dalcin dalcinl at gmail.com
Mon Apr 4 21:05:29 CDT 2011


I'm running a very recent (latest?) MinGW on a Windows Vista 32bits
box, and latest MPICH2 release.

C:\Users\dalcinl\DEVEL\mpi4py-dev>gcc --version
gcc (GCC) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

It seems that MinGW cannot parse the libmpi.a library. Any change that
the shipped libmpi.a was generated for a 64bits system? Look at the
output below:

C:\Users\dalcinl\DEVEL\mpi4py-dev>python setup.py build -c mingw32
running build
running build_src
running build_py
running build_clib
MPI configuration: [mpich2] from 'C:\Program Files\MPICH2'
checking for library 'mpe' ...
C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall "-IC:\Program
Files\MPICH2\include" -c _configtest.c -o _configtest.o
C:\MinGW\bin\gcc.exe -mno-cygwin -s _configtest.o "-LC:\Program
Files\MPICH2\lib" -lmpe -lmsvcr90 -lmpi -o _configtest.exe
C:\Program Files\MPICH2\lib/libmpi.a: file not recognized: File truncated
collect2: ld returned 1 exit status
failure.
removing: _configtest.c _configtest.o
building 'mpe' dylib library
writing build\temp.win32-2.6\src\mpe.def
C:\MinGW\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.6\src\pmpi-mpe.o
build\temp.win32-2.6\src\mpe.def "-LC:\Program Files\MPICH2\lib"
-lmsvcr90 -lmpi -o build\lib.win32-2.6\mpi4py\lib-pmpi\mpe.dll
C:\Program Files\MPICH2\lib/libmpi.a: file not recognized: File truncated
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1

I'm using the attached batch file (note: using fake extension, Gmail
bans me for attaching a .bat) to regenerate the library (I had to run
"mingw-get install pexports" to get the pexports utility). Note I'm
installing the mpi.def file, this is not actually required, but IMHO
it would be nice if MPICH2 shipped this file, if this issues ever
happens again, it will save users from the 'pexports' dependency :-).

BTW, I noticed some MPIR_*, a MPIO_Wait and a MPI_DUP_FN symbols
listed in the generated mpi.def file. Perhaps these symbols should not
be exported?


-- 
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mingw-mpich2.bat.REMOVE
Type: application/octet-stream
Size: 652 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/mpich2-dev/attachments/20110404/8e1dee60/attachment.obj>


More information about the mpich2-dev mailing list