cuda 6 mac os 10.9 libstdc++ still required?

I am trying to install cafe( on mavericks 10.9
The installation mentions the following issue wrt Cuda 5.5. I am wondering if there is the same issue with cuda 6.0? I don’t see any mention in the cuda 6 .0 release notes.

release notes for 5.5
Clang is now supported as a host compiler on Mac OS. To use Clang as the host
compiler, invoke nvcc with -ccbin=path-to-clang-executable. There are
some features that are not yet supported: Clang language extensions (see http://, LLVM libc++ (only GNU
libstdc++ is currently supported), language features introduced in C++11, and the
global function template explicit instantiation definition.

I found that nvcc defaults to c++03 and libstdc++. If you manually set the compiler flags to c++11 and libc++ for the nvcc invocation, I get a lot of compile errors. If it is supported, I haven’t figured out how.

It is possible to use nvcc compiled code using libstdc++ together with other code compiled directly by clang using libc++, but you have to be really careful what you pass between these translation units (basically nothing from the standard lib) E.g. the two std::string implementations are certainly not comptible.

I currently reverted to libstdc++ for my whole project, which is very annoying. But even for that, nvcc seems to barf on some 3rd party libs because it does apparently not corrently invoke clang internally in c++03 mode, such that stuff like opencv or boost tries to include c++11 stuff, making the compiliation fail at a later stage. See:

1 Like


I am a similar situation and I am just wondering if anyone knows when the future CUDA toolkit will have nvcc built against libc++ soon? Thanks!

Is CUDA 6.5 compatible with libc++ ?

Could be very usefull to build application with Qt 5 as gcc is deprecated on Mac and Qt build only comes with clang/libc++ build, and not clang/libstd++

This is unbelievable… I read the CUDA5.5 documentation and noticed the drawback above. Then I read the CUDA6.0 and they do mention that they support Clang as a compiler. Clang uses libc++ by default, it’s a HUGE omission not mentioning in the CUDA6 documentation that only the default OSX10.9 compiler (and not its default associated library) is supported; Section 7.3.1 of this page:

Do you know that libc++ is now the default STL library in OSX 10.9? Basically this makes development of CUDA applications in Maverick almost impossible… As far as you need to link to a library compiled with libc++ (most of them, as it’s the default), then you won’t be able to use CUDA.

As mentioned above, I am using CUDA with clang and libstdc++, but as you say you have to compile you dependencies with libc++. I have started to put together a few homebrew formulae for that purpose. So far I have qt5, boost and opencv:

should be fixed now with 7.0 or not?