Discussion:
[OMPI users] Compiling Open MPI for Cross-Compilation
Benjamin Brock
2017-12-16 03:28:34 UTC
Permalink
I'd like to run Open MPI on a cluster of RISC-V machines. These machines
are pretty weak cores and so I need to cross-compile. I'd like to do this:

Machine 1, which is x86_64-linux-gnu, compiles programs for machine 2.

Machine 2, which is riscv64-unknown-linux, will run these programs.

It seems to me like the correct configure line for this might be:

./configure --host=riscv64-unknown-linux --target=x86_64-linux-gnu
--enable-static --disable-shared --prefix=/home/ubuntu/src/ben-build/openmpi


However, this yields an error:

configure: WARNING: *** The Open MPI configure script does not support
--program-prefix, --program-suffix or --program-transform-name. Users are
recommended to instead use --prefix with a unique directory and make
symbolic links as desired for renaming.
configure: error: *** Cannot continue


Any tips? Will it be possible for me to cross-compile this way with Open
MPI?

Ben
g***@rist.or.jp
2017-12-16 04:08:53 UTC
Permalink
Benjamin,

try removing the --target option.

if it still does not work, then try replacing --target with --build

you can refer to http://jingfenghanmax.blogspot.jp/2010/09/configure-with-host-target-and-build.html
for the details

As far as Open MPI is concerned, note you cannot cross build Fortran
support from the scratch.

Cheers,

Gilles

----- Original Message -----

I'd like to run Open MPI on a cluster of RISC-V machines. These
machines are pretty weak cores and so I need to cross-compile. I'd like
to do this:

Machine 1, which is x86_64-linux-gnu, compiles programs for machine
2.

Machine 2, which is riscv64-unknown-linux, will run these programs.

It seems to me like the correct configure line for this might be:

./configure --host=riscv64-unknown-linux --target=x86_64-linux-
gnu --enable-static --disable-shared --prefix=/home/ubuntu/src/ben-build
/openmpi


However, this yields an error:

configure: WARNING: *** The Open MPI configure script does not
support --program-prefix, --program-suffix or --program-transform-name.
Users are recommended to instead use --prefix with a unique directory
and make symbolic links as desired for renaming.
configure: error: *** Cannot continue


Any tips? Will it be possible for me to cross-compile this way with
Open MPI?

Ben
Benjamin Brock
2017-12-16 21:50:27 UTC
Permalink
Post by g***@rist.or.jp
try removing the --target option.
With the configure line

./configure --host=riscv64-unknown-linux --enable-static --disable-shared
--prefix=/home/ubuntu/src/ben-build/openmpi

It successfully configures, but I now get the error

/home/xiii/Downloads/openmpi-3.0.0/opal/.libs/libopen-pal.a(patcher_overwrite_module.o):
In function `mca_patcher_overwrite_patch_address':
patcher_overwrite_module.c:(.text+0x89): undefined reference to
`mca_patcher_overwrite_apply_patch'
collect2: error: ld returned 1 exit status
Makefile:1844: recipe for target 'orte-clean' failed

When trying to compile.

Ben
Benjamin Brock
2017-12-16 22:10:08 UTC
Permalink
I have the same error with

./configure --host=riscv64-unknown-linux --build=x86_64-linux-gnu
--enable-static
--disable-shared --prefix=/home/ubuntu/src/ben-build/openmpi


Ben
Post by Benjamin Brock
Post by g***@rist.or.jp
try removing the --target option.
With the configure line
./configure --host=riscv64-unknown-linux --enable-static --disable-shared
--prefix=/home/ubuntu/src/ben-build/openmpi
It successfully configures, but I now get the error
patcher_overwrite_module.c:(.text+0x89): undefined reference to
`mca_patcher_overwrite_apply_patch'
collect2: error: ld returned 1 exit status
Makefile:1844: recipe for target 'orte-clean' failed
When trying to compile.
Ben
Loading...