[mpich-discuss] Building MPICH with Flang

Tarun Prabhu tprabhu2 at illinois.edu
Sat Dec 9 01:10:12 CST 2017


I have been trying to build MPICH with Clang + Flang. If I build it with
clang without Fortran support, it works fine, but if I try to build it with
Flang for Fortran, I get an unknown argument error in the final link step.

clang-5.0: error: unsupported option '--whole-archive'
clang-5.0: error: unsupported option '--no-whole-archive'
clang-5.0: error: unknown argument: '-soname'
clang-5.0: error: no such file or directory: 'libmpi.so.12'

This seems to be because --whole-archive is passed to clang without
prepending it with -Wl,. So I hacked the libtool script to force it to add
the "-Wl".

Now I get another error saying:

usr/bin/ld: src/binding/fortran/mpif_h/.libs/setbotf.o: relocation
R_X86_64_32 against undefined symbol `mpipriv1_' can not be used when
making a shared object; recompile with -fPIC

Could this be because the build system does not recognize/support flang? If
so, is there a way to work around it? If not, I'd appreciate some help in
trying to get it built.

Thanks,

Tarun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20171209/d91799e8/attachment.html>
-------------- next part --------------
_______________________________________________
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