[llvm-bugs] [Bug 25044] New: STL search path missing in self-compiled clang on OS X 10.10.5

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Oct 4 05:20:46 PDT 2015


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

            Bug ID: 25044
           Summary: STL search path missing in self-compiled clang on OS X
                    10.10.5
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: tm at ayena.de
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

I'm trying to build current trunk of clang on OS X 10.10.5.

# clang++ --version
Apple LLVM version 7.0.0 (clang-700.0.72)
Target: x86_64-apple-darwin14.5.0
Thread model: posix

I'm building using the following commands:

cmake \
    -G "Ninja" \
    -DCMAKE_BUILD_TYPE:STRING="RelWithDebInfo" \
    -DCMAKE_INSTALL_PREFIX:PATH="/Users/tobias/Development/llvm/llvm_prefix" \
    -DCMAKE_CXX_FLAGS:STRING="-DLLVM_ENABLE_DUMP" \
    ../llvm
ninja -j 4
ninja install

When building a minimal c++ example with the just installed clang compiler it
won't find the STL headers. They are usually located somewhere inside
XCode.app.

> cat foo.cpp 
#include <iostream>

int main() {
    return 0;
}
> clang++ -v -o foo foo.cpp 
clang version 3.8.0 (http://llvm.org/git/clang.git
6a948411b24f78177db24b0b06acf2ca202b469d) (http://llvm.org/git/llvm.git
ea978bb5631cd8dce5af87a2678750936a90d40c)
Target: x86_64-apple-darwin14.5.0
Thread model: posix
InstalledDir: /Users/tobias/Development/llvm/llvm_prefix/bin
 "/Users/tobias/Development/llvm/llvm_prefix/bin/clang-3.8" -cc1 -triple
x86_64-apple-macosx10.10.0 -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -main-file-name foo.cpp -mrelocation-model pic
-pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose
-munwind-tables -target-cpu core2 -target-linker-version 253.3.3 -v
-dwarf-column-info -resource-dir
/Users/tobias/Development/llvm/llvm_prefix/bin/../lib/clang/3.8.0
-stdlib=libc++ -fdeprecated-macro -fdebug-compilation-dir
/Users/tobias/Development/swift/swift-mac -ferror-limit 19 -fmessage-length 238
-stack-protector 1 -fblocks -fobjc-runtime=macosx-10.10.0
-fencode-extended-block-signature -fcxx-exceptions -fexceptions
-fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o
/var/folders/jk/173vrmtn09n08c_8d_my9l400000gn/T/foo-d4f0b7.o -x c++ foo.cpp
clang -cc1 version 3.8.0 based upon LLVM 3.8.0svn default target
x86_64-apple-darwin14.5.0
ignoring nonexistent directory
"/Users/tobias/Development/llvm/llvm_prefix/bin/../include/c++/v1"
ignoring nonexistent directory "/usr/include/c++/v1"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /Users/tobias/Development/llvm/llvm_prefix/bin/../lib/clang/3.8.0/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
foo.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
         ^
1 error generated.

-- 
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/20151004/ca89955c/attachment.html>


More information about the llvm-bugs mailing list