2

For cross compiling MPICH2 for Android.

I found the reference here http://hex.ro/wp/projects/personal-cloud-computing/compiling-mpich2-for-android-and-running-on-two-phones/

and here www.scientificbulletin.upb.ro/rev_docs_arhiva/fullffc_583765.

I did following

BuildRoot

Used Build Root (buildroot-2016.02) for cross compiling ARM toolchain

Target options :

  1. Target Architecture as ARM little endian

  2. Target binary format as ELF

Selected Toolchain as Buildroot toolchain (Internal)

  1. Kernel headers as 3.12.x

  2. C library as uClibc

After this make command was run.

MPICH2

mpich-3.2.tar.gz was extracted and following commands were executed

1. $ export PATH=/home/mpiuser/CrossBuild/buildroot-2016.02/output/host/usr/bin:$PATH
2. $ sudo ./configure --prefix=/home/mpiuser/CrossBuild/arm-mpich-install --disable-fortran CC=/home/mpiuser/CrossBuild/buildroot-2016.02/output/host/usr/bin/arm-linux-gcc --host=arm-linux

After this make was run for mpich-3.2, and during compilation following error was thrown :

 GEN      lib/libmpi.la
 CXX      src/binding/cxx/initcxx.lo
 CXXLD    lib/libmpicxx.la
lib/.libs/libmpi.so: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libmpicxx.la] Error 1
make[2]: Leaving directory `/home/mpiuser/CrossBuild/mpich-3.2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mpiuser/CrossBuild/mpich-3.2'
make: *** [all] Error 2

Request to please help. Thanks

Hemant Tiwari
  • 145
  • 1
  • 1
  • 9
  • Follow the steps in the referenced article. When you encounter specific problems that you cannot resolve on your own, describe them here. – Zulan Apr 01 '16 at 08:54
  • @Zulan Thanks I have added the details. – Hemant Tiwari Apr 01 '16 at 14:57
  • I managed to compile mpich3.2 for ARM using following: ./configure --prefix=/home/mpiuser/CrossBuild/arm-mpich-install CC="/home/mpiuser/CrossBuild/buildroot-2016.02/output/host/usr/bin/arm-linux-gcc" CFLAGS="-march=armv5te -I/home/mpiuser/CrossBuild/buildroot-2016.02/output/host/usr/include/" LDFLAGS="--static -L/home/mpiuser/CrossBuild/buildroot-2016.02/output/host/usr/lib/" --disable-fortran --host=arm-linux --disable-shared --with-pm=hydra --with-device=ch3 . Hope it helps someone. – Hemant Tiwari Apr 04 '16 at 13:21

0 Answers0