make error compiling libc++

Hello,

I’m trying to compile libc++ as indicated in 'Build on Linux using CMake and libsupc++ (http://libcxx.llvm.org) and I get the errors below when using make.
This is on a suse 12 maching with self compiled clang 3.4.
Any ideas how to fix the problem?

Thanks!

linux-od30:~/llvmsrc/buildlibcxx # make
Scanning dependencies of target abilib_headers
[ 3%] Generating include/cxxabi.h
[ 6%] Generating include/bits/c++config.h
[ 10%] Generating include/bits/os_defines.h
[ 13%] Generating include/bits/cpu_defines.h
[ 16%] Generating include/bits/cxxabi_tweaks.h
[ 20%] Generating include/bits/cxxabi_forced.h
[ 20%] Built target abilib_headers
Scanning dependencies of target cxx
[ 23%] Building CXX object lib/CMakeFiles/cxx.dir//src/strstream.cpp.o
[ 26%] Building CXX object lib/CMakeFiles/cxx.dir/
/src/algorithm.cpp.o
In file included from /root/llvmsrc/libcxx/src/algorithm.cpp:11:
In file included from /root/llvmsrc/libcxx/include/random:1647:
/root/llvmsrc/libcxx/include/cmath:401:1: error: declaration of ‘isinf’ in global
scope conflicts with declaration with C language linkage
isinf(_A1 __x) _NOEXCEPT
^
/usr/include/bits/mathcalls.h:202:19: note: declared with C language linkage here
__MATHDECL_1 (int,isinf, (Mdouble __value)) attribute ((const));
^
/usr/include/math.h:64:31: note: expanded from macro ‘__MATHDECL_1’
extern type __MATH_PRECNAME(function,suffix) args __THROW
^
/usr/include/math.h:67:42: note: expanded from macro ‘__MATH_PRECNAME’
#define __MATH_PRECNAME(name,r) __CONCAT(name,r)
^
/usr/include/sys/cdefs.h:89:23: note: expanded from macro ‘__CONCAT’
#define __CONCAT(x,y) x ## y
^
In file included from /root/llvmsrc/libcxx/src/algorithm.cpp:11:
In file included from /root/llvmsrc/libcxx/include/random:1647:
/root/llvmsrc/libcxx/include/cmath:425:1: error: declaration of ‘isnan’ in global
scope conflicts with declaration with C language linkage
isnan(_A1 __x) _NOEXCEPT
^
/usr/include/bits/mathcalls.h:235:19: note: declared with C language linkage here
__MATHDECL_1 (int,isnan, (Mdouble __value)) attribute ((const));
^
/usr/include/math.h:64:31: note: expanded from macro ‘__MATHDECL_1’
extern type __MATH_PRECNAME(function,suffix) args __THROW
^
/usr/include/math.h:67:42: note: expanded from macro ‘__MATH_PRECNAME’
#define __MATH_PRECNAME(name,r) __CONCAT(name,r)
^
/usr/include/sys/cdefs.h:89:23: note: expanded from macro ‘__CONCAT’
#define CONCAT(x,y) x ## y
^
2 errors generated.
make[2]: *** [lib/CMakeFiles/cxx.dir/
/src/algorithm.cpp.o] Error 1
make[1]: *** [lib/CMakeFiles/cxx.dir/all] Error 2
make: *** [all] Error 2

This was caused by r185229, which also broke a number of other buildbots. Timur Iskhodzhanov reverted it here: http://llvm.org/viewvc/llvm-project?rev=185256&view=rev

So please update your sources, and try building again.

-Dimitry