<div dir="ltr">Hi.<div><br></div><div>I'm testing llvm/clang release 3.4 and i'm having clang-interpreter issue - headers are not found. But i can compile with clang without problems.</div><div><br></div><div>I'm not sure if the issue relates to the trunk/3.5 RC as i need the latest release available.</div>
<div><br></div><div>Please let me know if i miss smth.</div><div><br></div><div>
<p class="">// test file (hello world)</p><p class="">MBA-Anton:bin asmirnov$ cat /tmp/hw.cpp </p>
<p class="">#include <stdio.h></p>
<p class=""><br></p>
<p class="">int main() {</p>
<p class=""><span class=""> </span>printf("hello world\n");</p>
<p class=""><span class=""> </span>return 1;</p>
<p class="">}</p>
<p class="">// default compiler info</p><p class="">MBA-Anton:bin asmirnov$ clang -v</p>
<p class="">Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)</p>
<p class="">Target: x86_64-apple-darwin13.3.0</p>
<p class="">Thread model: posix</p><p class=""><br></p><p class="">// compile test file with clang</p>
<p class="">MBA-Anton:bin asmirnov$ clang /tmp/hw.cpp -o /tmp/hw</p><p class="">// run to test</p>
<p class="">MBA-Anton:bin asmirnov$ /tmp/hw</p>
<p class="">hello world</p>
<p class="">// where clang is?</p><p class="">MBA-Anton:bin asmirnov$ which clang</p>
<p class="">/usr/bin/clang</p>
<p class=""><br></p><p class="">// test clang-interpreter (expected to be translated and launched)</p><p class="">MBA-Anton:bin asmirnov$ ./clang-interpreter /tmp/hw.cpp</p>
<p class="">/tmp/hw.cpp:1:10: <span class="">fatal error: </span>'stdio.h' file not found</p>
<p class="">#include <stdio.h></p>
<p class=""> ^</p>
<p class="">1 error generated.</p><p class="">---</p><p class="">Also i don't understand actually if it tries to compile the file first (and i expect it to interpret the source file):</p><p class=""><br></p><p class="">
MBA-Anton:bin asmirnov$ ./clang-interpreter /tmp/hw.cpp -v</p><p class="">clang version 3.4 (198679)</p><p class="">Target: x86_64-apple-darwin13.3.0</p><p class="">Thread model: posix</p><p class="">clang invocation:</p>
<p class=""> "/Users/asmirnov/Documents/dev/src/llvm_34_local_installed2/bin/clang-interpreter" "-cc1" "-triple" "x86_64-apple-macosx10.9.0" "-fsyntax-only" "-disable-free" "-disable-llvm-verifier" "-main-file-name" "hw.cpp" "-mrelocation-model" "pic" "-pic-level" "2" "-mdisable-fp-elim" "-masm-verbose" "-munwind-tables" "-target-cpu" "core2" "-v" "-resource-dir" "/Users/asmirnov/Documents/dev/src/llvm_34_local_installed2/bin/../lib/clang/3.4" "-stdlib=libc++" "-fdeprecated-macro" "-fdebug-compilation-dir" "/Users/asmirnov/Documents/dev/src/llvm_34_local_installed2/bin" "-ferror-limit" "19" "-fmessage-length" "100" "-stack-protector" "1" "-mstackrealign" "-fblocks" "-fobjc-runtime=macosx-10.9.0" "-fencode-extended-block-signature" "-fcxx-exceptions" "-fexceptions" "-fdiagnostics-show-option" "-fcolor-diagnostics" "-vectorize-slp" "-x" "c++" "/tmp/hw.cpp"</p>
<p class=""><br></p><p class="">clang -cc1 version 3.4 based upon LLVM 3.4svn default target x86_64-apple-darwin13.3.0</p><p class="">ignoring nonexistent directory "/Users/asmirnov/Documents/dev/src/llvm_34_local_installed2/bin/../include/c++/v1"</p>
<p class="">ignoring nonexistent directory "/usr/include/c++/v1"</p><p class="">ignoring nonexistent directory "/usr/include"</p><p class="">#include "..." search starts here:</p><p class="">
#include <...> search starts here:</p><p class=""> /usr/local/include</p><p class=""> /Users/asmirnov/Documents/dev/src/llvm_34_local_installed2/bin/../lib/clang/3.4/include</p><p class=""> /System/Library/Frameworks (framework directory)</p>
<p class=""> /Library/Frameworks (framework directory)</p><p class="">End of search list.</p><p class="">/tmp/hw.cpp:1:10: <span class="">fatal error: </span>'stdio.h' file not found</p><p class="">#include <stdio.h></p>
<p class=""> ^</p><p class="">
</p><p class="">1 error generated.</p><p class=""><br></p><p class="">Regards, Anton.</p></div></div>