[mpich-discuss] MPICH 2 installation errors

Dave Goodell goodell at mcs.anl.gov
Thu Aug 12 21:29:18 CDT 2010


On Aug 12, 2010, at 3:05 PM CDT, sasha lambert wrote:

> I'm attempting to configure MPICH 2 to use gcc and gfortran compilers, but receiving incompatibility error messages. Would it happen to do with 32-bit vs 64-bit incompatibilities? If so, how can i get around this?
> 
> For some reason i'm not getting a c.txt file output, so i've pasted the bash input/output below.

You likely don't have write permissions for the current directory.  You can redirect to a file in a different directory (such as your home directory).

> configure: error: ****  Incompatible Fortran and C Object File Types!  ****
> F77 Object File Type produced by "gfortran  -O2" is : : Mach-O object i386.
>  C  Object File Type produced by "gcc  -O2" is : : Mach-O 64-bit object x86_64.

Yes, this message is a 32/64-bit compatibility issue.  Your fortran compiler is outputting 32-bit by default, but your C compiler is outputting 64-bit by default.  The GNU compilers (and many other compilers) accept "-m32" or "-m64" options to force the corresponding output mode.  The easiest way to set them is usually something like:

/path/to/configure CC="gcc -m32" F77="gfortran -m32" FC="gfortran -m32" OTHER_CONFIG_ARGS...

Also, you usually don't want to configure and build as root.  Usually you want to configure and make as your regular user and then "sudo make install".  It reduces the chances of accidentally doing some damage as root during the build process.

-Dave



More information about the mpich-discuss mailing list