[mpich-discuss] Problems configuring MPICH2 on Mac OS 10.6.2 and gfortran
Pavan Balaji
balaji at mcs.anl.gov
Sun Mar 21 09:50:44 CDT 2010
Yes, you are right -- the gfortran installation is a 32-bit one, whereas
gcc is a 64-bit version. You can't mix these two.
If you don't need to build Fortran programs, you can configure with
"--disable-f77 --disable-f90".
Otherwise, the other options are to either get a 64-bit Fortran compiler
and use it, or use gcc in 32-bit mode (by passing CFLAGS="-m32") and g++
as well, if you are using C++ too.
-- Pavan
On 03/21/2010 04:37 AM, Gustavo M. Pastor wrote:
> I am trying to install MPICH2 on a
> Macbook runing Mac OS 10.6.2 and I get the following error
>
> checking for linker for Fortran main programs... Use Fortran to link
> programs
> checking whether Fortran 77 and C objects are compatible... no
> checking for file... file
> 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.
>
>
> I WOULD APPRECIATE ANY HINT TO SOLVE THE PROBLEM.
>
> Probably it's a problem of the gfortran instalation but
> I really don't know how to get gfortran produce the right
> 64-bit object.
>
> I don't even know how to get rid of this version of
> gfortran propertly before I try another f77 and f90
> compiler.
>
> Thanks so much in advance!
>
> Some hopefuly useful information follows
>
> ~/Downloads/mpich2-1.2.1p1> gfortran -v
> Using built-in specs.
> Target: i386-apple-darwin8.10.1
> Configured with: /tmp/gfortran-20090604/ibin/../gcc/configure
> --prefix=/usr/local/gfortran --enable-languages=c,fortran
> --with-gmp=/tmp/gfortran-20090604/gfortran_libs --enable-bootstrap
> Thread model: posix
> gcc version 4.5.0 20090604 (experimental) [trunk revision 148180] (GCC)
>
>
>
> ~/Downloads/mpich2-1.2.1p1> ./configure 2>&1 | tee c.txt
> Configuring MPICH2 version 1.2.1p1
> Running on system: Darwin MacGus.local 10.2.0 Darwin Kernel Version
> 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386
> i386
> Executing mpich2prereq in
> /Users/pastor/Downloads/mpich2-1.2.1p1/src/mpid/ch3 with
> Executing mpich2prereq in
> /Users/pastor/Downloads/mpich2-1.2.1p1/src/mpid/ch3/channels/nemesis
> sourcing /Users/pastor/Downloads/mpich2-1.2.1p1/src/pm/mpd/mpich2prereq
> sourcing /Users/pastor/Downloads/mpich2-1.2.1p1/src/pm/hydra/mpich2prereq
> sourcing /Users/pastor/Downloads/mpich2-1.2.1p1/src/pm/gforker/mpich2prereq
> sourcing /Users/pastor/Downloads/mpich2-1.2.1p1/src/pm/mpd/setup_pm
> checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ISO C89... none needed
> checking how to run the C preprocessor... gcc -E
> checking whether the compiler defines __func__... yes
> checking whether the compiler defines __FUNC__... no
> checking whether the compiler sets __FUNCTION__... yes
> checking whether C compiler accepts option -O2... yes
> checking whether routines compiled with -O2 can be linked with ones
> compiled without -O2... yes
> checking for type of weak symbol alias support... no
> checking whether __attribute__ ((weak)) allowed... yes
> checking whether __attribute ((weak_import)) allowed... yes
> checking for g77... no
> checking for xlf... no
> checking for f77... no
> checking for frt... no
> checking for pgf77... no
> checking for cf77... no
> checking for fort77... no
> checking for fl32... no
> checking for af77... no
> checking for xlf90... no
> checking for f90... no
> checking for pgf90... no
> checking for pghpf... no
> checking for epcf90... no
> checking for gfortran... gfortran
> checking whether we are using the GNU Fortran 77 compiler... yes
> checking whether gfortran accepts -g... yes
> checking whether Fortran 77 compiler accepts option -O2... yes
> checking whether routines compiled with -O2 can be linked with ones
> compiled without -O2... yes
> checking how to get verbose linking output from gfortran... -v
> checking for Fortran 77 libraries of gfortran...
> -L/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.5.0
> -L/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.5.0/../../..
> -lgfortran
> checking whether gfortran accepts the FLIBS found by autoconf... yes
> checking whether C can link with
> -L/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.5.0
> -L/usr/local/gfortran/lib/gcc/i386-apple-darwin8.10.1/4.5.0/../../..
> -lgfortran... yes
> checking for linker for Fortran main programs... Use Fortran to link
> programs
> checking whether Fortran 77 and C objects are compatible... no
> checking for file... file
> 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.
> ~/Downloads/mpich2-1.2.1p1>
>
> _______________________________________________
> mpich-discuss mailing list
> mpich-discuss at mcs.anl.gov
> https://lists.mcs.anl.gov/mailman/listinfo/mpich-discuss
--
Pavan Balaji
http://www.mcs.anl.gov/~balaji
More information about the mpich-discuss
mailing list