llvmgcc error on sles 11

llvmgcc was built from source on machine with RH4 OS. A simple program can not compile using llvmgcc on sles 11. How should I config llvm-gcc to avoid this error ?

LlvmGcc build machine:
[xchen@xbj-phenix HEAD]$ more /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 7)

The source file:

xchen@xcoloats05:~/SUSE11/AutoESL/test/ave/HEAD/BugSpray/bugzilla/3751> cat test.cpp
#include
using namespace std;

int main()
{
cout<<“ok”<<endl;
return 0;
}

The compile error:
~/releases/release/Linux_x86_64/tools/llvm_gcc/bin/llvm-g++ test.cpp --emit-llvm

xchen@xcoloats05:~/SUSE11/AutoESL/test/ave/HEAD/BugSpray/bugzilla/3751> ~/releases/release/Linux_x86_64/tools/llvm_gcc/bin/llvm-g++ test.cpp --emit-llvm
In file included from /home/xchen/releases/release/Linux_x86_64/tools/llvm_gcc/bin/…/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/…/…/…/…/include/c++/4.2.1/cstring:52,
from /home/xchen/releases/release/Linux_x86_64/tools/llvm_gcc/bin/…/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/…/…/…/…/include/c++/4.2.1/x86_64-unknown-linux-gnu/bits/c++locale.h:47,
from /home/xchen/releases/release/Linux_x86_64/tools/llvm_gcc/bin/…/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/…/…/…/…/include/c++/4.2.1/iosfwd:45,
from /home/xchen/releases/release/Linux_x86_64/tools/llvm_gcc/bin/…/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/…/…/…/…/include/c++/4.2.1/ios:43,
from /home/xchen/releases/release/Linux_x86_64/tools/llvm_gcc/bin/…/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/…/…/…/…/include/c++/4.2.1/ostream:45,
from /home/xchen/releases/release/Linux_x86_64/tools/llvm_gcc/bin/…/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/…/…/…/…/include/c++/4.2.1/iostream:45,
from test.cpp:1:
/usr/include/string.h:546: error: ‘__locale_t’ has not been declared
/usr/include/string.h:547: error: nonnull argument references non-pointer operand (argument 1, operand 3)
/usr/include/string.h:550: error: ‘__locale_t’ has not been declared
/usr/include/string.h:551: error: nonnull argument references non-pointer operand (argument 1, operand 4)
In file included from /home/xchen/releases/release/Linux_x86_64/tools/llvm_gcc/bin/…/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/…/…/…/…/include/c++/4.2.1/iosfwd:45,
from /home/xchen/releases/release/Linux_x86_64/tools/llvm_gcc/bin/…/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/…/…/…/…/include/c++/4.2.1/ios:43,
from /home/xchen/releases/release/Linux_x86_64/tools/llvm_gcc/bin/…/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/…/…/…/…/include/c++/4.2.1/ostream:45,
from /home/xchen/releases/release/Linux_x86_64/tools/llvm_gcc/bin/…/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/…/…/…/…/include/c++/4.2.1/iostream:45,
from test.cpp:1:
/home/xchen/releases/release/Linux_x86_64/tools/llvm_gcc/bin/…/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/…/…/…/…/include/c++/4.2.1/x86_64-unknown-linux-gnu/bits/c++locale.h:62: error: ‘uselocale’ was not declared in this scope
/home/xchen/releases/release/Linux_x86_64/tools/llvm_gcc/bin/…/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/…/…/…/…/include/c++/4.2.1/x86_64-unknown-linux-gnu/bits/c++locale.h:62: error: invalid type in declaration before ‘;’ token
/home/xchen/releases/release/Linux_x86_64/tools/llvm_gcc/bin/…/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/…/…/…/…/include/c++/4.2.1/x86_64-unknown-linux-gnu/bits/c++locale.h: In function ‘int std::__convert_from_v(__locale_struct* const&, char*, int, const char*, …)’:
/home/xchen/releases/release/Linux_x86_64/tools/llvm_gcc/bin/…/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/…/…/…/…/include/c++/4.2.1/x86_64-unknown-linux-gnu/bits/c++locale.h:82: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function
/home/xchen/releases/release/Linux_x86_64/tools/llvm_gcc/bin/…/lib/gcc/x86_64-unknown-linux-gnu/4.2.1/…/…/…/…/include/c++/4.2.1/x86_64-unknown-linux-gnu/bits/c++locale.h:102: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function

Hello

llvmgcc was built from source on machine with RH4 OS. A simple program can
not compile using llvmgcc on sles 11. How should I config llvm-gcc to avoid
this error ?

llvm-gcc is EOL, use clang instead.

Hi;