[petsc-users] Petsc-3.4.2 with MinGW-w64 on Windows 7
Satish Balay
balay at mcs.anl.gov
Tue Oct 1 17:04:42 CDT 2013
mingw64 from cygwin[32] appears to work fine with /tmp.
Satish
--------
balay at msnehalem2 ~/junk
$ which x86_64-w64-mingw32-gcc.exe
/usr/bin/x86_64-w64-mingw32-gcc.exe
balay at msnehalem2 ~/junk
$ cygcheck -f /usr/bin/x86_64-w64-mingw32-gcc.exe
mingw64-x86_64-gcc-core-4.7.3-1
balay at msnehalem2 ~/junk
$ cp sizeof.c /tmp
balay at msnehalem2 ~/junk
$ x86_64-w64-mingw32-gcc.exe /tmp/sizeof.c -o sizeof.exe
balay at msnehalem2 ~/junk
$ file sizeof.exe
sizeof.exe: PE32+ executable (console) x86-64, for MS Windows
balay at msnehalem2 ~/junk
$ ./sizeof.exe
long double : 16
double : 8
int : 4
char : 1
short : 2
long : 4
long long : 8
int * : 8
size_t : 8
balay at msnehalem2 ~/junk
$
On Tue, 1 Oct 2013, Satish Balay wrote:
> Looks like this mingw install is not from cygwin - and does not work with cygwin paths.
>
> Suggest using mingw from cygwin - or install and use cygwin64 [which has non-mingw gcc-64]
> You might need the following patch
> https://bitbucket.org/petsc/petsc/commits/e4773d96ef73f1e0b315c5b0194cae499d71e207
>
> Satish
>
>
> On Tue, 1 Oct 2013, Mengda Wu wrote:
>
> > Hello all,
> >
> > I am trying to compile 64 bit version of petsc-3.4.2 using MinGW-w64
> > (latest version 4.8.1 installed with
> > http://sourceforge.net/projects/mingwbuilds/files/mingw-builds-install/mingw-builds-install.exe/download)
> > on Windows 7 64 bit. I have cygwin, python (under cygwin) installed.
> >
> > I run the "$ ./config/configure.py --with-cc='gcc' --with-fc='gfortran'
> > --with-cxx='g++'
> > --with-clanguage=cxx --with-mpi=0 --with-debugging=0 --with-sowing=0
> > --with-c
> > 2html=0". I got some errors in checkCCompiler. The log file is as follows:
> > ============================================================
> > TEST checkCCompiler from
> > config.setCompilers(/cygdrive/c/Library/PETSc/download/petsc-3.4.2/config/BuildSystem/config/setCompilers.py:525)
> > TESTING: checkCCompiler from
> > config.setCompilers(config/BuildSystem/config/setCompilers.py:525)
> > Locate a functional C compiler
> > Checking for program /home/glxiong/bin/gcc...not found
> > Checking for program /usr/local/bin/gcc...not found
> > Checking for program /usr/bin/gcc...not found
> > Checking for program
> > /cygdrive/c/Library/MinGW/x64-4.8.1/mingw64/bin/gcc...found
> > Defined make macro "CC" to "gcc"
> > Pushing language C
> > All intermediate test results are stored in
> > /tmp/petsc-novY5r/config.setCompilers
> > sh: gcc -c -o /tmp/petsc-novY5r/config.setCompilers/conftest.o
> > -I/tmp/petsc-novY5r/config.setCompilers
> > /tmp/petsc-novY5r/config.setCompilers/conftest.c
> > Executing: gcc -c -o /tmp/petsc-novY5r/config.setCompilers/conftest.o
> > -I/tmp/petsc-novY5r/config.setCompilers
> > /tmp/petsc-novY5r/config.setCompilers/conftest.c
> > sh:
> > Possible ERROR while running compiler: ret = 256
> > error message = {gcc.exe: error:
> > /tmp/petsc-novY5r/config.setCompilers/conftest.c: No such file or directory
> >
> > gcc.exe: fatal error: no input files
> >
> > compilation terminated.
> > ============================================================
> >
> > I think the problem is the MinGW-w64 compiler does not recognize the cygwin
> > path like /tmp. Is there a workaround? I tried to use a native Windows
> > python, but the configure fails to find the "make" command then. I guess
> > MinGW may be not supported by PetSc yet.
> >
> > However, I found someone has successfully compiled a MPI-version Petsc on
> > Windows 64 bit. Here is the link:
> > http://geuz.org/pipermail/gmsh/2012/007589.html.
> > How is that possible?
> >
> >
> > Thanks,
> > Mengda
> >
>
>
More information about the petsc-users
mailing list