Clang 3.4 does not look in correct places for the libstdc++ libraries

181 Views Asked by At

I am relatively new to Linux and Clang, and I am having trouble getting the Clang 3.4 toolchain to correctly determine where the libstdc++ libraries are. I am running Mint 17, have Clang-3.4 installed and have GCC 4.8 installed as well. Using the verbose flag, the output looks like:

#include "..." search starts here:
#include <...> search starts here:
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++
/usr/local/include
/usr/bin/../lib/clang/3.4/include
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/include
/usr/include/x86_64-linux-gnu
/usr/include
End of search list.
test.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>

The search stops one subfolder shy of where it looks like all the libstdc++ headers live (in /c++/4.8). I have used the package manager to uninstall and reinstall gcc, clang, llvm and all dependencies. I have also tried reinstalling using the cli using apt-get.

A majority of the answers I've seen for this question revolve around changing the /FrontEnd/InitHeaderSearch.cpp file to look in the correct place for the libstdc++ stuff, but this doesn't exist on my machine. Rather, locate -b InitHeaderSearchdoes not find any results.

Aside from building clang and llvm from source, how else can I change where clang is looking for the libraries?

Thank you.

0

There are 0 best solutions below