[LLVMbugs] [Bug 24068] New: check-libcxx and check-libcxxabi doesn't work in bootstrap builds on OS X

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 8 10:56:01 PDT 2015


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

            Bug ID: 24068
           Summary: check-libcxx and check-libcxxabi doesn't work in
                    bootstrap builds on OS X
           Product: libc++abi
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
    Classification: Unclassified

A locally built clang doesn't know where to find system headers on OS X, so one
has to pass `-isysroot $(xcrun --show-sdk-path)` to it to make that work.

So for a bootstrap build, the cmake invocation is something like


  cmake -GNinja \
      -DCMAKE_BUILD_TYPE=Release \
      -DLLVM_ENABLE_ASSERTIONS=ON \
      -DCMAKE_C_COMPILER="my/built/clang" \
      -DCMAKE_CXX_COMPILER="my/built/clang++" \
      -DCMAKE_C_FLAGS="-isysroot /output/of/xcrun" \
      -DCMAKE_CXX_FLAGS="-isysroot /output/of/xrun"

This works well almost everywhere, but the libcxxabi tests all fail with
something like:

FAIL: libc++abi :: test_demangle.pass.cpp (41 of 41)
******************** TEST 'libc++abi :: test_demangle.pass.cpp' FAILED
********************
Command:
['/Users/thakis/src/chromefetch/src/third_party/llvm-build/Release+Asserts/bin/clang++',
'-o',
'/Volumes/MacintoshHD2/src/llvm-build/projects/libcxxabi/test/Output/test_demangle.pass.cpp.o',
'-x', 'c++',
'/Volumes/MacintoshHD2/src/llvm-svn/projects/libcxxabi/test/test_demangle.pass.cpp',
'-c', '-v', '-DLIBCXXABI_NO_TIMER', '-std=c++11', '-nostdinc++',
'-I/Users/thakis/src/llvm-svn/projects/libcxx/include',
'-I/Users/thakis/src/llvm-svn/projects/libcxxabi/include']
Exit Code: 1
Standard Error:
--
clang version 3.7.0 (trunk 241602)
Target: x86_64-apple-darwin13.4.0
Thread model: posix

"/Volumes/MacintoshHD2/src/chromefetch/src/third_party/llvm-build/Release+Asserts/bin/clang-3.7"
-cc1 -triple x86_64-apple-macosx10.9.0 -emit-obj -mrelax-all -disable-free
-main-file-name test_demangle.pass.cpp -mrelocation-model pic -pic-level 2
-mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables
-target-cpu core2 -target-linker-version 241.9 -v -dwarf-column-info
-coverage-file
/Volumes/MacintoshHD2/src/llvm-build/projects/libcxxabi/test/Output/test_demangle.pass.cpp.o
-nostdinc++ -resource-dir
/Volumes/MacintoshHD2/src/chromefetch/src/third_party/llvm-build/Release+Asserts/bin/../lib/clang/3.7.0
-D LIBCXXABI_NO_TIMER -I /Users/thakis/src/llvm-svn/projects/libcxx/include -I
/Users/thakis/src/llvm-svn/projects/libcxxabi/include -stdlib=libc++ -std=c++11
-fdeprecated-macro -fdebug-compilation-dir
/Users/thakis/src/llvm-build/projects/libcxxabi/test -ferror-limit 19
-fmessage-length 0 -stack-protector 1 -mstackrealign -fblocks
-fobjc-runtime=macosx-10.9.0 -fencode-extended-block-signature -fcxx-exceptions
-fexceptions -fmax-type-align=16 -fdiagnostics-show-option -o
/Volumes/MacintoshHD2/src/llvm-build/projects/libcxxabi/test/Output/test_demangle.pass.cpp.o
-x c++
/Volumes/MacintoshHD2/src/llvm-svn/projects/libcxxabi/test/test_demangle.pass.cpp
clang -cc1 version 3.7.0 based upon LLVM 3.7.0svn default target
x86_64-apple-darwin13.4.0
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
 /Users/thakis/src/llvm-svn/projects/libcxx/include
 /Users/thakis/src/llvm-svn/projects/libcxxabi/include

/Volumes/MacintoshHD2/src/chromefetch/src/third_party/llvm-build/Release+Asserts/bin/../lib/clang/3.7.0/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
In file included from
/Volumes/MacintoshHD2/src/llvm-svn/projects/libcxxabi/test/test_demangle.pass.cpp:11:
In file included from
/Users/thakis/src/llvm-svn/projects/libcxx/include/iostream:38:
In file included from
/Users/thakis/src/llvm-svn/projects/libcxx/include/ios:215:
/Users/thakis/src/llvm-svn/projects/libcxx/include/iosfwd:90:10: fatal error:
'wchar.h' file not found
#include <wchar.h>  // for mbstate_t
         ^
1 error generated.
--

Compilation failed unexpectedly!



It looks like the isysroot flag isn't passed on to the libcxxabi test
invocations. check-libcxx has the same problem.

-- 
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/20150708/3c870f6b/attachment.html>


More information about the llvm-bugs mailing list