[MPICH2-dev] MPICH2 cross compilation help

Brad Penoff penoff at cs.ubc.ca
Fri Feb 23 17:55:12 CST 2007


Greetings,

I'm trying to use a series of cross tools to build alpha binaries on an 
i686 machine.  We have access to some simulation tools that run real 
kernels and binaries, but they must be in alpha.  I don't have access to a 
real alpha machine so it is my only choice to cross compile.  I know that 
the cross tools work as I can already boot the Linux kernel, run python, 
use ssh, and even run my own simple applications.  In fact, I was able to 
run the maint/getcross.c file to produce a getcross.out text file to feed 
into --with-cross.

The main problem is that I can't get MPICH2 to build.  This is my first 
time cross compiling something other than the Linux kernel and simple 
apps, but I haven't been able to find much documentation on cross 
compiling MPICH2; I figured I'd ask this list for some advice.

The steps I did was try to point all standard tools to use the cross 
tools.  I did this as follows (in bash):
export CC=/var/tmp/brad/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-gcc
export AR=/var/tmp/brad/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-ar
export RANLIB=/var/tmp/brad/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-ranlib
export AS=/var/tmp/brad/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-as
export LD=/var/tmp/brad/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-ld
export NM=/var/tmp/brad/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-nm


Once this was done, I ran MPICH2 1.0.5p3's configure successfully in the 
following way:

./configure --disable-f77 --disable-f90 --disable-sharedlibs 
--prefix=/var/tmp/brad/m5/mpich2/ch3_sock --build=i686-pc-linux-gnu 
--host=alpha-unknown-linux-gnu --disable-cxx

The arch names are following the format of strings generated by 
"config.guess"

The configure completes but the make fails miserably thereafter.  I've 
included the relevant portion of the output below.  Why is it that 
sometimes the cross compiler (CC) is used but other times it simply tries 
to use "true"?  The generated Makefile has C_LINK_SHL equal to "true" so 
either I'm doing something wrong with my configure command or something 
funny is going on... any advice with my cross compiling nightmare?

Thanks ahead of time,
brad

<snip snip>
...
make[7]: Entering directory 
`/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/sock/poll'
/var/tmp/brad/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-gcc 
-DHAVE_CONFIG_H -I. 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/sock/poll 
-I../../../../include -I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/include 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/ch3/include 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/ch3/include 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/datatype 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/datatype 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/ch3/channels/sock/include 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/ch3/channels/sock/include 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/sock 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/sock 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/sock/poll 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/sock/poll -c sock.c
/var/tmp/brad/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-ar 
cr ../../../../../lib/libmpich.a sock.o
/var/tmp/brad/crosstool/gcc-3.4.3-glibc-2.3.5/alpha-unknown-linux-gnu/bin/alpha-unknown-linux-gnu-ranlib 
../../../../../lib/libmpich.a
date > .libstamp0
make[8]: Entering directory 
`/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/sock/poll'
true -DHAVE_CONFIG_H -I. 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/sock/poll 
-I../../../../include -I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/include 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/ch3/include 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/ch3/include 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/datatype 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/datatype 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/ch3/channels/sock/include 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/ch3/channels/sock/include 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/sock 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/sock 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/sock/poll 
-I/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/sock/poll -c sock.c 
-o _ssock.o
mv: cannot stat `_ssock.o': No such file or directory
make[8]: *** [sock.lo] Error 1
make[8]: Leaving directory 
`/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/sock/poll'
make[7]: *** [all-redirect] Error 2
make[7]: Leaving directory 
`/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/sock/poll'
make[6]: *** [all-redirect] Error 1
make[6]: Leaving directory 
`/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/common/sock'
make[5]: *** [all-redirect] Error 2
make[5]: Leaving directory 
`/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/ch3/channels/sock'
make[4]: *** [all-redirect] Error 1
make[4]: Leaving directory 
`/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/ch3/channels'
make[3]: *** [all-redirect] Error 2
make[3]: Leaving directory 
`/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid/ch3'
make[2]: *** [all-redirect] Error 1
make[2]: Leaving directory `/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src/mpid'
make[1]: *** [all-redirect] Error 2
make[1]: Leaving directory `/var/tmp/brad/m5/tmp/mpich2-1.0.5p3/src'
make: *** [all-redirect] Error 2




More information about the mpich2-dev mailing list