Red Hat Bugzilla – Bug 694868
clang++ fails with fatal error: 'bits/c++config.h' file not found
Last modified: 2011-04-22 07:02:15 EDT
Description of problem:
Attempting to compile:
using namespace std;
cout << "Hello World!\n";
with clang++ results in:
$ clang++ test.cpp
In file included from test.cpp:1:
/usr/include/c++/4.6.0/iostream:38:10: fatal error: 'bits/c++config.h' file not found
1 error generated.
Version-Release number of selected component (if applicable):
Happens on both Fedora 14 and Fedora 15. I guess they both have clang 2.8.
I remember than on F14 symlinking /usr/include/c++/4.5.1/i686-redhat-linux to i386-redhat-linux in the same directory helped, but this trick doesn't work with F15 and gcc 4.6.0.
I'm not seeing this on x86_64.
Yes, it looks 32-bit only, it's searching for /usr/include/c++/4.6.0/i386-redhat-linux/32. Let me see if I can come up with a patch.
[vedranm@kalopsia battery-charger-simulator]$ clang++ -v main.cc
clang version 2.8 (branches/release_28)
Thread model: posix
"/usr/bin/clang" -cc1 -triple i386-redhat-linux-gnu -S -disable-free -disable-llvm-verifier -main-file-name main.cc -mrelocation-model static -mdisable-fp-elim -mconstructor-aliases -target-cpu pentium4 -target-linker-version 22.214.171.124.6 -v -resource-dir /usr/lib/clang/2.8 -ferror-limit 19 -fmessage-length 80 -fexceptions -fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-4R7JEn.s -x c++ main.cc
clang -cc1 version 2.8 based upon llvm 2.8 hosted on i386-redhat-linux-gnu
ignoring nonexistent directory "/usr/include/c++/4.6.0/i386-redhat-linux/32"
#include "..." search starts here:
#include <...> search starts here:
End of search list.
In file included from main.cc:1:
/usr/include/c++/4.6.0/iostream:38:10: fatal error: 'bits/c++config.h' file not
1 error generated.
It's listed as fixed here: http://koji.fedoraproject.org/koji/buildinfo?buildID=235848
However, the issue still persists on 32-bit. I will post the details in other bug.
*** This bug has been marked as a duplicate of bug 680644 ***