Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: [OMPI devel] Repeated -Xclang flags (was: 1.6.1rc2)
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2012-08-03 09:40:02

On Aug 3, 2012, at 2:31 AM, P. Martin wrote:

> Thanks for the link. I tried it on OSX 10.8 Mountain Lion. It works
> with llvm-gcc from XCode-4.4, and it passes make check.
> It doesn't work with clang, though, which is the default compiler.
> This issue was raised on Homebrew here:
> If you read that you can see that your configure script adds a
> option to CFLAGS, and in doing so strips a required -XClang
> from my CFLAGS. This is a rare issue, but there it is. So using
> clang I don't get past configure.

Mmm. Yes. I see the issue. Our configure script essentially does a "uniq" on compiler flags; assuming that any flag seen twice is redundant, and removes it.

This functionality has been in Open MPI for a long, long time. Perhaps even back to 1.0 days. I'm surprised that this issue is only surfacing now. Did homebrew only recently start using a pair of -Xclang flags? Or did you have some other workaround?

Regardless, can you try this patch and see if it solves the issue for you? You'll need to re-run

Index: opal/config/opal_functions.m4
--- opal/config/opal_functions.m4 (revision 26940)
+++ opal/config/opal_functions.m4 (working copy)
@@ -271,6 +271,14 @@
         ompi_i="`expr $ompi_i + 1`"
+ # Check for special cases where we do want to allow repeated
+ # arguments (per
+ #
+ case $val in
+ -Xclang) ompi_found=0 ;;
+ esac
     # If we didn't find the token, add it to the "array"
     if test "$ompi_found" = "0"; then

Jeff Squyres
For corporate legal information go to: