Current clang-3.8 seems to have a problem, it does not find the standard C++ headers/libs: pandora:~/tmp> cat h.cc #include <iostream> int main() { std::cout << "Hi" << std::endl; return 0; } pandora:~/tmp> clang++ -o h h.cc h.cc:1:10: fatal error: 'iostream' file not found #include <iostream> ^ 1 error generated. andora:~/tmp> clang++ -x c++ -v -E - < /dev/null clang version 3.8.0 (tags/RELEASE_380/final) Target: x86_64-unknown-linux-gnu Thread model: posix InstalledDir: /usr/bin "/usr/bin/clang-3.8" -cc1 -triple x86_64-unknown-linux-gnu -E -disable-free -disable-llvm-verifier -main-file-name - -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -v -dwarf-column-info -debugger-tuning=gdb -resource-dir /usr/bin/../lib64/clang/3.8.0 -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/clang/3.8.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdeprecated-macro -fdebug-compilation-dir /home/magallon/tmp -ferror-limit 19 -fmessage-length 103 -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o - -x c++ - clang -cc1 version 3.8.0 based upon LLVM 3.8.0 default target x86_64-unknown-linux-gnu ignoring nonexistent directory "/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/bin/../lib64/clang/3.8.0/include /usr/include End of search list. # 1 "<stdin>" # 1 "<built-in>" 1 # 1 "<built-in>" 3 # 325 "<built-in>" 3 # 1 "<command line>" 1 # 1 "<built-in>" 2 # 1 "<stdin>" 2 Paths for /usr/include/c++/5.3.1 or /lib/gcc/x86_64-mageia-linux-gnu/5.3.1/include are missing.
In fact, it cat neither find libraries. With an empty C++ souce like: int main() { return 0; } it also fails: werewolf:~/tmp> clang++ -o t t.cc /usr/bin/ld: cannot find crtbegin.o: No such file or directory /usr/bin/ld: cannot find -lstdc++ clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation)
CC: (none) => jamagallon
Duplicate of 18138. *** This bug has been marked as a duplicate of bug 18138 ***
Status: NEW => RESOLVEDResolution: (none) => DUPLICATE