Skip to Content.
Sympa Menu

charm - Re: [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

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


Chronological Thread 
  • From: Ben Porebski <ben.porebski AT monash.edu>
  • To: Kelly Davis <kdavis AT alum.mit.edu>
  • Cc: "charm AT cs.uiuc.edu" <charm AT cs.uiuc.edu>
  • Subject: Re: [charm] Compiling charm++ 6.5.0 with clang's C++11 on OS X 10.8.3
  • Date: Mon, 8 Apr 2013 17:52:15 +1000
  • List-archive: <http://lists.cs.uiuc.edu/pipermail/charm/>
  • List-id: CHARM parallel programming system <charm.cs.uiuc.edu>

Hi Kelly,

I haven't come across this error before.
But what I can think of trying would be to avoid using the export and put your flags in the build line as follows:

./build charm++ net-darwin-x86_64 clang --basedir=/usr/local CXXFLAGS='-std=c++11 -stdlib=libc++ -mmacosx-version-min=10.7' LIBS=-lc++

From memory, you can put compiler flags such as CXXFLAGS etc directly into the build command.
If this doesn't help progress the compilation, I'll have a shot at compiling this my self.


Cheers, Ben


On Mon, Apr 8, 2013 at 5:38 PM, Kelly Davis <kdavis AT alum.mit.edu> wrote:
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

_______________________________________________
charm mailing list
charm AT cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/charm





Archive powered by MHonArc 2.6.16.

Top of Page