[cfe-dev] make error compiling libc++

Silmarieni silmarieni at yahoo.com
Sat Jun 29 06:19:28 PDT 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130629/adb3c226/attachment.html>


More information about the cfe-dev mailing list