Re: [OMPI users] OMPI users] Compiling Open MPI for Cross-Compilation
Yeah, I just noticed that Open MPI was giving me all x86_64 binaries with the configuration flags ./configure --host=riscv64-unknown-linux --enable-static --disable-shared --disable-dlopen --enable-mca-no-build=patcher-overwrite --prefix=/home/ubuntu/src/ben-build/openmpi and was very confused. I thought that the expected behavior for configure scripts was that setting --host=[myarch]-linux-gnu will tell the compiler to use the [myarch]-linux-gnu-[gcc,g++,etc.] compiler when building software that will run on the host arch. This is what other software I've encountered (e.g. MPICH) does. Basically, I want the `orterun` binaries to be compiled with riscv64-unknown-linux-[gcc,g++] compilers and the `mpi[cc,c++]` binaries to be compiled with x86_64-linux-gnu-[gcc,g++] and configured to *use* riscv64-unknown-linux-[gcc,g++] when compiling programs (because, like `orterun`, programs compiled with `mpi[cc,c++]` will run on the host arch). Can I get this by just setting [CC,CXX]=riscv64-unknown-linux-[gcc,g++], etc.? Ben ___ users mailing list users@lists.open-mpi.org https://lists.open-mpi.org/mailman/listinfo/users
Re: [OMPI users] OMPI users] Compiling Open MPI for Cross-Compilation
Benjamin, i noticed you build Open MPI with plain gcc. is gcc a cross compiler ? if not, you have to tell configure to use the cross compilers (and cross assembler and linker too) for example configure CC=crosscompiler ... you might be able to achieve this with standard gcc and the right -march flag for example configure CFLAGS=-march=riscv64 Cheers, Gilles - Original Message - Here's my config.log. Recompiling now with those options. Ben ___ users mailing list users@lists.open-mpi.org https://lists.open-mpi.org/mailman/listinfo/users
Re: [OMPI users] OMPI users] Compiling Open MPI for Cross-Compilation
There is something odd here. From the configure.m4 of patcher/overwrite #if !defined(__i386__) && !defined(__x86_64__) && !defined(__PPC__) #error "platform not supported" #endif My guess is that should fail on your arch. Can you please compress and post your config.log ? Meanwhile, you can try using these two extra configure options configure --disable-dlopen --enable-mca-no-build=patcher-overwrite ... Cheers, Gilles Benjamin Brockwrote: >> 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 > ___ users mailing list users@lists.open-mpi.org https://lists.open-mpi.org/mailman/listinfo/users