<div>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 ?</div><div><br></div><div>LlvmGcc build machine:</div>
<div>[xchen@xbj-phenix HEAD]$ more /etc/redhat-release</div><div>Red Hat Enterprise Linux AS release 4 (Nahant Update 7)</div><div><br></div><div>The source file:</div><div><div>xchen@xcoloats05:~/SUSE11/AutoESL/test/ave/HEAD/BugSpray/bugzilla/3751> cat test.cpp</div>
<div>#include<iostream></div><div>using namespace std;</div><div><br></div><div>int main()</div><div>{</div><div>        cout<<"ok"<<endl;</div><div>        return 0;</div><div>}</div><div>  <div>
<br></div><div>The compile error:</div><div>~/releases/release/Linux_x86_64/tools/llvm_gcc/bin/llvm-g++ test.cpp --emit-llvm</div></div></div><div><div>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</div>
<div>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,</div><div>                 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,</div>
<div>                 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,</div><div>                 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,</div>
<div>                 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,</div><div>                 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,</div>
<div>                 from test.cpp:1:</div><div>/usr/include/string.h:546: error: '__locale_t' has not been declared</div><div>/usr/include/string.h:547: error: nonnull argument references non-pointer operand (argument 1, operand 3)</div>
<div>/usr/include/string.h:550: error: '__locale_t' has not been declared</div><div>/usr/include/string.h:551: error: nonnull argument references non-pointer operand (argument 1, operand 4)</div><div>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,</div>
<div>                 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,</div><div>                 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,</div>
<div>                 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,</div><div>                 from test.cpp:1:</div>
<div>/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</div>
<div>/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</div>
<div>/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*, ...)':</div>
<div>/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</div>
<div>/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</div>
</div><div><br></div>