Bug 694868 - clang++ fails with fatal error: 'bits/c++config.h' file not found
Summary: clang++ fails with fatal error: 'bits/c++config.h' file not found
Status: CLOSED DUPLICATE of bug 680644
Alias: None
Product: Fedora
Classification: Fedora
Component: llvm
Version: 15
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Michel Alexandre Salim
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2011-04-08 16:48 UTC by Vedran Miletić
Modified: 2011-04-22 11:02 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2011-04-22 11:02:15 UTC

Attachments (Terms of Use)

Description Vedran Miletić 2011-04-08 16:48:02 UTC
Description of problem:
Attempting to compile:

using namespace std;

int main()
        cout << "Hello World!\n";
        return 0;

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
#include <bits/c++config.h>
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.

How reproducible:
Every time.

Additional info:
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.

Comment 1 Alex G. 2011-04-13 23:20:18 UTC
I'm not seeing this on x86_64.

Comment 2 Vedran Miletić 2011-04-22 10:52:52 UTC
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)
Target: i386-redhat-linux-gnu
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 -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
#include <bits/c++config.h>
1 error generated.

Comment 3 Vedran Miletić 2011-04-22 11:02:15 UTC
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 ***

Note You need to log in before you can comment on or make changes to this bug.