[cfe-dev] another try: lastest ubuntu 14.10 + gcc4.9.1 can't build clang

Markus Trippelsdorf markus at trippelsdorf.de
Mon Feb 9 04:48:10 PST 2015



On 2015.02.09 at 11:42 +0100, Dennis Luehring wrote:
> i have found no solution to build clang svn under my ubuntu 14.04 x64 + 
> gcc 4.9.2
> still getting this error
> 
> /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/cstddef:51:11: 
> 
> error:
>         no member named 'max_align_t' in the global namespace
>     using ::max_align_t;
>           ~~^

You could just patch cstddef, e.g. something like:

diff --git a/libstdc++-v3/include/c_std/cstddef b/libstdc++-v3/include/c_std/cstddef
index f4845f024329..f12570e53947 100644
--- a/libstdc++-v3/include/c_std/cstddef
+++ b/libstdc++-v3/include/c_std/cstddef
@@ -48,7 +48,9 @@
 namespace std
 {
   // We handle size_t, ptrdiff_t, and nullptr_t in c++config.h.
+#ifndef __clang__
   using ::max_align_t;
+#endif
 }
 #endif

-- 
Markus




More information about the cfe-dev mailing list