[mpich-discuss] How to configure MPICH build to create linux x86 cross-compiler for ARM?

Kenneth Raffenetti raffenet at mcs.anl.gov
Tue Jun 6 09:14:18 CDT 2017


For Fortran, the 'maint/fcrosscompile' directory contains a configure 
script you can run on the target architecture to generate a cross file. 
Unfortunately it looks like there is a bug that needs fixing. I can put 
together a pull request soon to address the issue.

Ken

On 06/05/2017 10:13 AM, Alexander Rast wrote:
> Yes, I knew that mpicc isn't building its own compiler from the ground 
> up. I reckoned though that maybe since the --target option in normal 
> builds came closest to expressing the result I'm trying to achieve, 
> maybe that's what you needed to do. I'd tried the --host option as well 
> before but that errored when I tried to run mpicc.
> 
> What steps are needed to configure for Fortran? I tried setting several 
> CROSS_F77_xxx flags but then ended up with the uninformative error 
> during configure:
> 
> configure: error: '' is empty.
> 
> C cross-compilers would be adequate for early testing but the platform 
> we are building is going to amongst other things going to be compiling 
> and linking source files provided by external users, many of whom will 
> undoubtely be using Fortran so in the long run it's going to be 
> essential to have that cross-compiler available as well.
> 
> 
> 
> On Fri, Jun 2, 2017 at 4:15 PM, Kenneth Raffenetti <raffenet at mcs.anl.gov 
> <mailto:raffenet at mcs.anl.gov>> wrote:
> 
>     Hi Alex,
> 
>     One thing to understand is that MPICH does not actually build
>     compiler tools, so the --target option is not used. mpicc and
>     friends are only wrapper scripts. Here is how I was able to
>     configure/build MPICH on my laptop (Ubuntu 16.10) to cross-compile
>     binaries arm-linux-gnueabi. Fortran is disabled since it requires
>     additional steps.
> 
>     ./configure --build=x86_64-linux-gnu --host=arm-linux-gnueabi
>     CC=/usr/bin/arm-linux-gnueabi-gcc-6
>     CXX=/usr/bin/arm-linux-gnueabi-g++-6 --disable-fortran
> 
>     Ken
> 
>     On 06/01/2017 10:22 AM, Alexander Rast wrote:
> 
>         I assume you mean from the build intended for the ARM targets.
>         In any case here they are.
> 
>         On Thu, Jun 1, 2017 at 4:04 PM, Kenneth Raffenetti
>         <raffenet at mcs.anl.gov <mailto:raffenet at mcs.anl.gov>
>         <mailto:raffenet at mcs.anl.gov <mailto:raffenet at mcs.anl.gov>>> wrote:
> 
>              Hi Alex,
> 
>              I don't have experience with this type of build, but I can
>         try to
>              replicate it on a system here internally. Can you provide a
>         couple
>              of artifacts first?
> 
>              1. the config.log file from the top-level build directory
>              2. the output of 'mpicc -show' from the installed build
> 
>              Thanks,
>              Ken
> 
>              On 06/01/2017 10:00 AM, Alexander Rast wrote:
> 
>                  All,
> 
>                  I'm trying to build MPICH so that I can cross-compile MPI
>                  applications on my x86_64-linux system to run on an
>         arm-linux
>                  machine. I want to emphasise that this is different from
>                  building a native ARM MPICH install that runs on ARM
>         itself; the
>                  intent is that an x86-linux 'root' process compiles ARM MPI
>                  application binaries and distributes them to the ARM
>         cores. I
>                  have a separate build for compiling the MPI binaries
>         that lie on
>                  the root x86 system. I tried running configure with
>                  --build=x86_64-linux-gnu --host=x86_64-linux-gnu
>                  --target=arm-linux-gnueabi, but that didn't give me
>         what I need.
>                  If, meanwhile, I try to run mpicc off the native x86
>         build (the
>                  MPICH installation used for running MPI applications on
>         the root
>                  x86 system) it complains that the target type specified
>         in the
>                  makefile (CFLAGS = -march=armv8-a -mtune=cortex-a53) isn't
>                  supported. It's not clear how one creates this sort of
>         'hybrid'
>                  build, running on one platform, compiling MPI
>         applications for
>                  another.
> 
> 
>                  _______________________________________________
>                  discuss mailing list discuss at mpich.org
>         <mailto:discuss at mpich.org> <mailto:discuss at mpich.org
>         <mailto:discuss at mpich.org>>
>                  To manage subscription options or unsubscribe:
>         https://lists.mpich.org/mailman/listinfo/discuss
>         <https://lists.mpich.org/mailman/listinfo/discuss>
>                  <https://lists.mpich.org/mailman/listinfo/discuss
>         <https://lists.mpich.org/mailman/listinfo/discuss>>
> 
> 
> 
_______________________________________________
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss


More information about the discuss mailing list