[cfe-dev] libcxx+clang ToT Build Failures

Jean-Daniel Dupas devlists at shadowlab.org
Fri Apr 13 02:34:33 PDT 2012


Le 13 avr. 2012 à 09:38, Dean Michael Berris a écrit :

> Hi Everyone,
> 
> Has anybody lately been able to build libcxx (top of trunk) with clang
> (top of trunk)? I'm encountering the following errors:
> 
> + clang++ -c -g -Os -arch i386 -arch x86_64 -std=c++0x
> -U__STRICT_ANSI__ -nostdinc++ -I../include ../src/iostream.cpp
> ../src/iostream.cpp:16:1: error: C++ requires a type specifier for all
> declarations
> alignas (__stdinbuf<char> ) static char __cin [sizeof(__stdinbuf <char>)];
> ^~~~~~~
> ../src/iostream.cpp:16:28: error: expected ';' after top level declarator
> alignas (__stdinbuf<char> ) static char __cin [sizeof(__stdinbuf <char>)];
>                           ^
>                           ;
> ../src/iostream.cpp:17:1: error: C++ requires a type specifier for all
> declarations
> alignas (__stdoutbuf<char>) static char __cout[sizeof(__stdoutbuf<char>)];
> ^~~~~~~
> ../src/iostream.cpp:17:28: error: expected ';' after top level declarator
> alignas (__stdoutbuf<char>) static char __cout[sizeof(__stdoutbuf<char>)];
>                           ^
>                           ;
> ../src/iostream.cpp:18:1: error: C++ requires a type specifier for all
> declarations
> alignas (__stdoutbuf<char>) static char __cerr[sizeof(__stdoutbuf<char>)];
> ^~~~~~~
> ../src/iostream.cpp:18:28: error: expected ';' after top level declarator
> alignas (__stdoutbuf<char>) static char __cerr[sizeof(__stdoutbuf<char>)];
>                           ^
>                           ;
> ../src/iostream.cpp:19:1: error: C++ requires a type specifier for all
> declarations
> alignas (__stdinbuf<wchar_t> ) static char __wcin [sizeof(__stdinbuf
> <wchar_t>)];
> ^~~~~~~
> ../src/iostream.cpp:19:31: error: expected ';' after top level declarator
> alignas (__stdinbuf<wchar_t> ) static char __wcin [sizeof(__stdinbuf
> <wchar_t>)];
>                              ^
>                              ;
> ../src/iostream.cpp:20:1: error: C++ requires a type specifier for all
> declarations
> alignas (__stdoutbuf<wchar_t>) static char
> __wcout[sizeof(__stdoutbuf<wchar_t>)];
> ^~~~~~~
> ../src/iostream.cpp:20:31: error: expected ';' after top level declarator
> alignas (__stdoutbuf<wchar_t>) static char
> __wcout[sizeof(__stdoutbuf<wchar_t>)];
>                              ^
>                              ;
> ../src/iostream.cpp:21:1: error: C++ requires a type specifier for all
> declarations
> alignas (__stdoutbuf<wchar_t>) static char
> __wcerr[sizeof(__stdoutbuf<wchar_t>)];
> ^~~~~~~
> ../src/iostream.cpp:21:31: error: expected ';' after top level declarator
> alignas (__stdoutbuf<wchar_t>) static char
> __wcerr[sizeof(__stdoutbuf<wchar_t>)];
>                              ^
>                              ;
> ../src/iostream.cpp:23:1: error: C++ requires a type specifier for all
> declarations
> alignas (istream) char cin [sizeof(istream)];
> ^~~~~~~
> ../src/iostream.cpp:23:18: error: expected ';' after top level declarator
> alignas (istream) char cin [sizeof(istream)];
>                 ^
>                 ;
> ../src/iostream.cpp:24:1: error: C++ requires a type specifier for all
> declarations
> alignas (ostream) char cout[sizeof(ostream)];
> ^~~~~~~
> ../src/iostream.cpp:24:18: error: expected ';' after top level declarator
> alignas (ostream) char cout[sizeof(ostream)];
>                 ^
>                 ;
> ../src/iostream.cpp:25:1: error: C++ requires a type specifier for all
> declarations
> alignas (ostream) char cerr[sizeof(ostream)];
> ^~~~~~~
> ../src/iostream.cpp:25:18: error: expected ';' after top level declarator
> alignas (ostream) char cerr[sizeof(ostream)];
>                 ^
>                 ;
> ../src/iostream.cpp:26:1: error: C++ requires a type specifier for all
> declarations
> alignas (ostream) char clog[sizeof(ostream)];
> ^~~~~~~
> fatal error: too many errors emitted, stopping now [-ferror-limit=]
> 20 errors generated.
> 
> 
> I'm following the instructions at http://libcxx.llvm.org/ -- I've also
> been trying to build it using CMake but I'm not getting far with clang
> either.
> 
> Build environment is Mac OS X 10.6.8, clang is built with the stock GCC.
> 

Don't get issue with the same config and clang TOT.

Make sure you are using the freshly build clang binary (using clang --version).

-- Jean-Daniel








More information about the cfe-dev mailing list