[llvm-bugs] [Bug 25680] New: libc++ fails to build with cmake on Leopard (works with buildit script)

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 30 07:08:43 PST 2015


https://llvm.org/bugs/show_bug.cgi?id=25680

            Bug ID: 25680
           Summary: libc++ fails to build with cmake on Leopard (works
                    with buildit script)
           Product: Build scripts
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: cmake
          Assignee: unassignedbugs at nondot.org
          Reporter: jeremyhu at apple.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

libc++ builds on Leopard using the legacy buildit shell script, but it fails
when using cmake.  Due to our inability to skip building libc++ with cmake
options (bug #25665), this also impacts our ability to just build clang using
cmake.

The buildit script compiles algorithm.cpp successfully with:

/opt/local/bin/clang++-mp-3.7 -c -g -Os -arch x86_64 -arch i386 -nostdinc++
-std=c++11 -U__STRICT_ANSI__ -I../include ../src/algorithm.cpp

The cmake build fails with:

/opt/local/bin/clang++-mp-3.7   -D_DEBUG -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
-I/opt/local/var/macports/build/_Users_jeremy_src_macports_dports_jeremyhu_lang_llvm-3.8/clang-3.8/work/build/projects/libcxx/lib
-I/opt/local/var/macports/build/_Users_jeremy_src_macports_dports_jeremyhu_lang_llvm-3.8/clang-3.8/work/trunk/projects/libcxx/lib
-I/opt/local/var/macports/build/_Users_jeremy_src_macports_dports_jeremyhu_lang_llvm-3.8/clang-3.8/work/build/include
-I/opt/local/var/macports/build/_Users_jeremy_src_macports_dports_jeremyhu_lang_llvm-3.8/clang-3.8/work/trunk/include
-I/opt/local/var/macports/build/_Users_jeremy_src_macports_dports_jeremyhu_lang_llvm-3.8/clang-3.8/work/trunk/projects/libcxx/include
 -pipe -Os -std=c++11  -arch x86_64 -arch i386  -fPIC
-fvisibility-inlines-hidden -arch x86_64 -arch i386   -UNDEBUG -std=c++11
-nostdinc++ -Wall -W -Wwrite-strings -Wno-unused-parameter -Wno-long-long
-Werror=return-type -Wno-error -fPIC -o
CMakeFiles/cxx.dir/__/src/algorithm.cpp.o -c
/opt/local/var/macports/build/_Users_jeremy_src_macports_dports_jeremyhu_lang_llvm-3.8/clang-3.8/work/trunk/projects/libcxx/src/algorithm.cpp

In file included from .../projects/libcxx/src/algorithm.cpp:11:
In file included from .../projects/libcxx/include/random:1638:
In file included from .../projects/libcxx/include/cmath:301:
.../projects/libcxx/include/math.h:1199:91: error: use of undeclared identifier
'llrintf'
inline _LIBCPP_INLINE_VISIBILITY long long llrint(float __lcpp_x) _NOEXCEPT    
  {return llrintf(__lcpp_x);}
                                                                               
          ^
---

Adding -U__STRICT_ANSI__ to the compilation line (like cmake does) results in a
successful compilation of algorithm.cpp.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151130/53ad4b68/attachment-0001.html>


More information about the llvm-bugs mailing list