Bug 694868 - clang++ fails with fatal error: 'bits/c++config.h' file not found
clang++ fails with fatal error: 'bits/c++config.h' file not found
Status: CLOSED DUPLICATE of bug 680644
Product: Fedora
Classification: Fedora
Component: llvm (Show other bugs)
15
i686 Linux
unspecified Severity high
: ---
: ---
Assigned To: Michel Alexandre Salim
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-04-08 12:48 EDT by Vedran Miletić
Modified: 2011-04-22 07:02 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-04-22 07:02:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Vedran Miletić 2011-04-08 12:48:02 EDT
Description of problem:
Attempting to compile:

include<iostream>
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 19:20:18 EDT
I'm not seeing this on x86_64.
Comment 2 Vedran Miletić 2011-04-22 06:52:52 EDT
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 2.21.51.0.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:
 /usr/include/c++/4.6.0
 /usr/include/c++/4.6.0/backward
 /usr/local/include
 /usr/lib/clang/2.8/include
 /usr/include
 /usr/lib/gcc/i686-redhat-linux/4.6.0/include
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
      found
#include <bits/c++config.h>
         ^
1 error generated.
Comment 3 Vedran Miletić 2011-04-22 07:02:15 EDT
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.