[mpich-discuss] Trouble compiling MPICH2 (mpich2-1.2.1-win-x86-64) with mingw-w64

Sanchay Harneja sanchay.h at gmail.com
Tue Feb 23 14:28:43 CST 2010


In case this helps:

C:\C_code>"C:\Documents and
Settings\Administrator\Desktop\mingw-w64-bin-x86_64-
20100131\mingw64\bin\gcc.exe"  -v
Using built-in specs.
COLLECT_GCC=C:\Documents and
Settings\Administrator\Desktop\mingw-w64-bin-x86_64
-20100131\mingw64\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/documents and
settings/administrator/desktop/mingw-w64-bi
n-x86_64-20100131/mingw64/bin/../libexec/gcc/x86_64-w64-mingw32/4.5.0/lto-wrappe
r.exe
Target: x86_64-w64-mingw32
Configured with: /home/drangon/work_dgn/mingw-w64-dgn/source/gcc/configure
--hos
t=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --disable-nls
--enable-language
s=c,c++ --with-gmp=/home/drangon/work_dgn/mingw-w64-dgn/build/for_target
--enabl
e-twoprocess --disable-libstdcxx-pch
--prefix=/home/drangon/work_dgn/mingw-w64-d
gn/target --with-sysroot=/home/drangon/work_dgn/mingw-w64-dgn/target
Thread model: win32
gcc version 4.5.0 20100131 (experimental) (GCC)

Thanks

On Tue, Feb 23, 2010 at 9:23 PM, Sanchay Harneja <sanchay.h at gmail.com>wrote:

> Hi,
>
> I tried -m64 at all possible places to compiler args but to no avail.
>
> I downloaded the compiler from here:  http://www.drangon.org/mingw/
>
> File I downloaded: mingw-w64-bin-x86_64-20100131.7z
>
> My OS: Windows XP 64 bit
>
> Meanwhile I'll keep trying!
>
> Thanks
> Sanchay
>
>
> On Tue, Feb 23, 2010 at 8:49 PM, <jayesh at mcs.anl.gov> wrote:
>
>> Hi,
>>  Can you try adding "-m64" to the compiler flags and see if it works ? If
>> not, please let me know how you installed mingw64 (I have had bad
>> experiences in the past with compiling/installing the compiler) -
>> installable? compiled on cygwin ? src version ? etc - so that I can provide
>> you further help.
>>
>> Regards,
>> Jayesh
>> ----- Original Message -----
>> From: "Sanchay Harneja" <sanchay.h at gmail.com>
>> To: "Jayesh Krishna" <jayesh at mcs.anl.gov>
>> Cc: mpich-discuss at mcs.anl.gov
>> Sent: Tuesday, February 23, 2010 1:13:43 PM GMT -06:00 US/Canada Central
>> Subject: Re: [mpich-discuss] Trouble compiling MPICH2
>> (mpich2-1.2.1-win-x86-64)  with mingw-w64
>>
>> Hi Jayesh,
>>
>> I now have,
>>
>> #include <windows.h>
>> #include <mpi.h>
>>
>> But I'm getting the following errors now -
>>
>> C:\C_code>"C:\Documents and
>> Settings\Administrator\Desktop\mingw-w64-bin-x86_64-
>> 20100131\mingw64\bin\gcc.exe" -I "C:\Program Files\MPICH2\include" -L
>> "C:\Progra
>> m Files\MPICH2\lib" prog.c -lmpi
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccG2CWiZ.o:prog.c:(.text+0
>> xd7): undefined reference to `MPI_Init'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccG2CWiZ.o:prog.c:(.text+0
>> xe1): undefined reference to `MPI_Barrier'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccG2CWiZ.o:prog.c:(.text+0
>> xe6): undefined reference to `MPI_Wtime'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccG2CWiZ.o:prog.c:(.text+0
>> x108): undefined reference to `MPI_Comm_rank'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccG2CWiZ.o:prog.c:(.text+0
>> x119): undefined reference to `MPI_Comm_size'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccG2CWiZ.o:prog.c:(.text+0
>> x143): undefined reference to `MPI_Finalize'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccG2CWiZ.o:prog.c:(.text+0
>> x242): undefined reference to `MPI_Finalize'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccG2CWiZ.o:prog.c:(.text+0
>> x274): undefined reference to `MPI_Finalize'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccG2CWiZ.o:prog.c:(.text+0
>> x39e): undefined reference to `MPI_Bcast'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccG2CWiZ.o:prog.c:(.text+0
>> x424): undefined reference to `MPI_Reduce'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccG2CWiZ.o:prog.c:(.text+0
>> x429): undefined reference to `MPI_Wtime'
>> C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ccG2CWiZ.o:prog.c:(.text+0
>> x48e): undefined reference to `MPI_Finalize'
>> collect2: ld returned 1 exit status
>>
>> Thanks for helping!
>> Sanchay
>>
>>
>> On Mon, Feb 22, 2010 at 4:20 PM, Jayesh Krishna < jayesh at mcs.anl.gov >
>> wrote:
>>
>>
>> Hi,
>> Try including "windows.h" in your MPI program (before including mpi.h) and
>> let us know if it works for you.
>>
>> Regards,
>> Jayesh
>>
>>
>>
>> ----- Original Message -----
>> From: "Sanchay Harneja" < sanchay.h at gmail.com >
>> To: mpich-discuss at mcs.anl.gov
>> Sent: Sunday, February 21, 2010 5:16:16 PM GMT -06:00 US/Canada Central
>> Subject: [mpich-discuss] Trouble compiling MPICH2
>> (mpich2-1.2.1-win-x86-64) with mingw-w64
>>
>>
>> Hi,
>>
>> I'm trying to compile a C program on Windows XP 64 bit with the mingw-w64
>> compiler. But I'm getting errors as follows.
>>
>> I downloaded the MPICH2 lib from:
>> http://www.mcs.anl.gov/research/projects/mpich2/ .
>> And downloaded the mingw compiler from: http://www.drangon.org/mingw/(mingw-w64-bin-x86_64-20100131.7z)
>>
>> Note that the program compiles successfully with the 32 bit mingw compiler
>> and the 32 bit MPICH2 (mpich2-1.2.1-win-ia32.msi).
>>
>> C:\C_code>"C:\Documents and
>> Settings\Administrator\Desktop\mingw-w64-bin-x86_64-
>> 20100131\mingw64\bin\gcc.exe" -I "C:\Program Files\MPICH2\include" -L
>> "C:\Progra
>> m Files\MPICH2\lib" prog.c -lmpi
>> In file included from prog.c:16:0:
>> C:\Program Files\MPICH2\include/mpi.h:360:17: error: expected '=', ',',
>> ';', 'as
>> m' or '__attribute__' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:550:66: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:608:32: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:610:35: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:611:33: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:612:24: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:614:35: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:620:31: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:621:31: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:736:52: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:738:45: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:740:45: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:743:28: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:788:64: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:825:29: error: expected ')' before
>> 'MPI_In
>> fo'
>> C:\Program Files\MPICH2\include/mpi.h:834:29: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:844:66: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:845:23: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:846:55: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:852:43: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:854:39: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:857:43: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:857:53: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:858:41: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:862:39: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:862:51: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:863:44: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:863:56: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:864:41: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:864:51: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> In file included from prog.c:16:0:
>> C:\Program Files\MPICH2\include/mpi.h:930:33: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:932:36: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:933:34: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:934:25: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:935:36: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:937:32: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:938:32: error: expected declaration
>> specif
>> iers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1043:53: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1045:46: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1047:46: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1050:29: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1095:65: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1120:30: error: expected ')' before
>> 'MPI_I
>> nfo'
>> C:\Program Files\MPICH2\include/mpi.h:1129:30: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1139:67: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1140:23: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1141:56: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1147:44: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1149:40: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1152:44: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1152:54: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1153:42: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1157:40: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1157:52: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1158:45: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1158:57: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1159:42: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpi.h:1159:52: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> In file included from C:\Program Files\MPICH2\include/mpi.h:1186:0,
>> from prog.c:16:
>> C:\Program Files\MPICH2\include/mpio.h:206:54: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> C:\Program Files\MPICH2\include/mpio.h:391:55: error: expected declaration
>> speci
>> fiers or '...' before 'MPI_Aint'
>> prog.c: In function 'main':
>> prog.c:69:9: warning: incompatible implicit declaration of bu
>> ilt-in function 'exit'
>> prog.c:90:9: warning: incompatible implicit declaration of bu
>> ilt-in function 'exit'
>> prog.c:97:23: warning: incompatible implicit declaration of b
>> uilt-in function 'malloc'
>> prog.c:104:9: warning: incompatible implicit declaration of b
>> uilt-in function 'exit'
>>
>> C:\C_code>
>>
>> Thanks!
>> Sanchay
>>
>>
>>
>>
>> _______________________________________________
>> mpich-discuss mailing list
>> mpich-discuss at mcs.anl.gov
>> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/mpich-discuss/attachments/20100223/dd38bcf9/attachment-0001.htm>


More information about the mpich-discuss mailing list