Skip to Content.
Sympa Menu

charm - [charm] Compiling charm++ 6.5.0 with clang's C++11 on OS X 10.8.3

charm AT lists.cs.illinois.edu

Subject: Charm++ parallel programming system

List archive

[charm] Compiling charm++ 6.5.0 with clang's C++11 on OS X 10.8.3


Chronological Thread 
  • From: Kelly Davis <kdavis AT alum.mit.edu>
  • To: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
  • Subject: [charm] Compiling charm++ 6.5.0 with clang's C++11 on OS X 10.8.3
  • Date: Mon, 8 Apr 2013 00:38:29 -0700 (PDT)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-RocketYMMF:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type; b=aSvN6JVSkDibpBFUPZHtA9sOLfrZraC31mJUtMNcUv6p7syMuWX8pjrqSkuYaEhVgFgPKf7WbX62aiSY+zCq/eEp7qG2xPlauR+NGpyNidcmCIF30EoqBWOArq5EYhtoJfPcS5QgcWMIFga7y7VnDwLHO/E0US/HC4i9sw9Vjmc=;
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

WHAT: I am trying to compile charm++ 6.5.0 with clang's C++11 on OS X 10.8 with no success.


WHY: The rest of my executable uses C++11. Clang's C++11 uses libc++ and not libstdc++ for the C++ standard library, and code in some third party libraries I rely on use the C++ standard library and have an API that does not respect ABI compatibility. Furthermore, the third party libraries are flagrant enough ABI violators that clang's use of inline namespaces to catch ABI versioning problems does not catch the ABI versioning problem at compile time and thus an executable using libc++ and libstdc++ crashes more or less randomly.


HOW: My initial attempt to compile charm++ with clang's C++11 used the export...

export CONFIG_OPTS="CXXFLAGS='-std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7' LIBS=-lc++"

then the build...

./build charm++ net-darwin-x86_64 clang --basedir=/usr/local

This does not work as the configure script which is passed CONFIG_OPTS does not recognize the configure options. In particular it yields...

...
make charmxi
Makefile:1144: Variable OPTS is defined to an empty string. Are you sure this is what you want?
./config_opts.sh: line 1: -stdlib=libc++: command not found
./configure CXXFLAGS="-std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7" LIBS=-lc++
configure: error: unrecognized option: -stdlib=libc++
Try `./configure --help' for more information.
make[1]: *** [conv-autoconfig.h] Error 1
make: *** [headers] Error 2


My next attempt didn't use the export but simply used...

./build charm++ net-darwin-x86_64 clang --basedir=/usr/local

This doesn't work as the configuration scripts do not properly detect that I am on a 64 bit machine when I compile with clang. In particular it yields...

...
../bin/charmc -host  xi-main.C
In file included from xi-main.C:4:
In file included from ./xi-symbol.h:4:
In file included from ./xi-util.h:8:
./conv-config.h:65:2: error: "Compiler not generating 64 bit binary, please check compiler flags."
#error "Compiler not generating 64 bit binary, please check compiler flags."

Has anyone done this or does anyone have hints?

Best,
Kelly



Archive powered by MHonArc 2.6.16.

Top of Page