[cfe-dev] clang-interpreter headers issue
Anton Smirnov
dev at antonsmirnov.name
Tue Aug 19 00:21:03 PDT 2014
Hi.
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.
I'm not sure if the issue relates to the trunk/3.5 RC as i need the latest
release available.
Please let me know if i miss smth.
// test file (hello world)
MBA-Anton:bin asmirnov$ cat /tmp/hw.cpp
#include <stdio.h>
int main() {
printf("hello world\n");
return 1;
}
// default compiler info
MBA-Anton:bin asmirnov$ clang -v
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix
// compile test file with clang
MBA-Anton:bin asmirnov$ clang /tmp/hw.cpp -o /tmp/hw
// run to test
MBA-Anton:bin asmirnov$ /tmp/hw
hello world
// where clang is?
MBA-Anton:bin asmirnov$ which clang
/usr/bin/clang
// test clang-interpreter (expected to be translated and launched)
MBA-Anton:bin asmirnov$ ./clang-interpreter /tmp/hw.cpp
/tmp/hw.cpp:1:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^
1 error generated.
---
Also i don't understand actually if it tries to compile the file first (and
i expect it to interpret the source file):
MBA-Anton:bin asmirnov$ ./clang-interpreter /tmp/hw.cpp -v
clang version 3.4 (198679)
Target: x86_64-apple-darwin13.3.0
Thread model: posix
clang invocation:
"/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"
clang -cc1 version 3.4 based upon LLVM 3.4svn default target
x86_64-apple-darwin13.3.0
ignoring nonexistent directory
"/Users/asmirnov/Documents/dev/src/llvm_34_local_installed2/bin/../include/c++/v1"
ignoring nonexistent directory "/usr/include/c++/v1"
ignoring nonexistent directory "/usr/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/Users/asmirnov/Documents/dev/src/llvm_34_local_installed2/bin/../lib/clang/3.4/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
/tmp/hw.cpp:1:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^
1 error generated.
Regards, Anton.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140819/46e5f349/attachment.html>
More information about the cfe-dev
mailing list