A few details might be relevant here. The directory searched for some of C/C++ standard headers (libstdc++) is wrong for i386/i686 (it should search /usr/include/c++/4.8 and /usr/include/i386-linux-gnu/c++/4.8); (1) /usr/include/c++/4.8 is searched (2) /usr/include/i386-linux-gnu/c++/4.8 is __NOT__ searched A workaround is to add an additional include search path (if you are using 4.8) when compiling with clang++: -I/usr/include/i386-linux-gnu/c++/4.8 ---------------------------------------------------------- the warning below during the compile command (highlights the problem): ignoring nonexistent directory "/usr/lib/gcc/i686-linux-gnu/4.8/../../../../include/i686-linux-gnu/c++/4.8" ---------------------------------------------------------- Compiling on i386/686 (Saucy), using clang++ -v ....: clang++ -v -Wno-deprecated -Woverloaded-virtual -Wall -W -Wextra -Wshadow -ggdb3 -O3 -c random_base_impl.cpp -DTRACEOUT -I. --std=c++11 -o random_base_impl.o Ubuntu clang version 3.4-1ubuntu1 (trunk) (based on LLVM 3.4) Target: i386-pc-linux-gnu Thread model: posix "/usr/bin/clang" -cc1 -triple i386-pc-linux-gnu -emit-obj -disable-free -disable-llvm-verifier -main-file-name random_base_impl.cpp -mrelocation-model static -fmath-errno -masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu pentium4 -target-linker-version 2.23.52.20130727 -momit-leaf-frame-pointer -v -g -coverage-file /home/gking/Programming/mystudy_without_photon_cut/epc_cpp/test/epc_test/refactoring/random_base_impl.o -resource-dir /usr/bin/../lib/clang/3.4 -D TRACEOUT -I . -internal-isystem /usr/lib/gcc/i686-linux-gnu/4.8/../../../../include/c++/4.8 -internal-isystem /usr/lib/gcc/i686-linux-gnu/4.8/../../../../include/c++/4.8/i686-linux-gnu -internal-isystem /usr/lib/gcc/i686-linux-gnu/4.8/../../../../include/c++/4.8/backward -internal-isystem /usr/lib/gcc/i686-linux-gnu/4.8/../../../../include/i686-linux-gnu/c++/4.8 -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.4/include -internal-isystem /usr/include/clang/3.4/include/ -internal-externc-isystem /usr/include/i386-linux-gnu -internal-externc-isystem /usr/include/i686-linux-gnu -internal-externc-isystem /usr/include -O3 -Wno-deprecated -Woverloaded-virtual -Wall -W -Wextra -Wshadow --std=c++11 -fdebug-compilation-dir /home/gking/Programming/mystudy_without_photon_cut/epc_cpp/test/epc_test/refactoring -ferror-limit 19 -fmessage-length 213 -mstackrealign -fobjc-runtime=gcc -fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions -fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops -o random_base_impl.o -x c++ random_base_impl.cpp clang -cc1 version 3.4 based upon LLVM 3.4 default target i386-pc-linux-gnu ignoring nonexistent directory "/usr/lib/gcc/i686-linux-gnu/4.8/../../../../include/c++/4.8/i686-linux-gnu" ignoring nonexistent directory "/usr/lib/gcc/i686-linux-gnu/4.8/../../../../include/i686-linux-gnu/c++/4.8" ignoring nonexistent directory "/usr/bin/../lib/clang/3.4/include" ignoring nonexistent directory "/usr/include/i686-linux-gnu" #include "..." search starts here: #include <...> search starts here: . /usr/lib/gcc/i686-linux-gnu/4.8/../../../../include/c++/4.8 /usr/lib/gcc/i686-linux-gnu/4.8/../../../../include/c++/4.8/backward /usr/local/include /usr/include/clang/3.4/include /usr/include/i386-linux-gnu /usr/include End of search list. In file included from random_base_impl.cpp:4: In file included from ./random_base.hpp:4: In file included from /usr/lib/gcc/i686-linux-gnu/4.8/../../../../include/c++/4.8/memory:62: /usr/lib/gcc/i686-linux-gnu/4.8/../../../../include/c++/4.8/bits/stl_algobase.h:59:10: fatal error: 'bits/c++config.h' file not found #include ^ 1 error generated.