Bug 603554 - G++ fails to load standard C++ headers
G++ fails to load standard C++ headers
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
13
All Linux
low Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-13 15:56 EDT by Giovanni Campagna
Modified: 2010-06-13 16:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-13 16:20:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Output from G++ (second example) (551 bytes, text/plain)
2010-06-13 15:56 EDT, Giovanni Campagna
no flags Details

  None (edit)
Description Giovanni Campagna 2010-06-13 15:56:37 EDT
Created attachment 423687 [details]
Output from G++ (second example)

Description of problem:
Standard headers like <exception> or <vector> are not loadable, thus all code depending on them fails to compile.

Version-Release number of selected component (if applicable):
4.4.4-2.fc12

How reproducible:
$ echo "
#include <exception>
                 
int main() { return 42; }" | g++ -x c++ -

results in:
In file included from <stdin>:2:
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/exception:37:28: error: bits/c++config.h: No such file or directory
In file included from <stdin>:2:
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/exception:120: error: expected constructor, destructor, or type conversion before ‘(’ token
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/../../../../include/c++/4.4.4/exception:142: error: expected constructor, destructor, or type conversion before ‘}’ token

$ echo "
#include <exception>

int main() { return 42; }" | g++ -x c++ -

results in a long sequence of errors (included as attachment)
Comment 1 Giovanni Campagna 2010-06-13 16:04:42 EDT
Sorry the second one had #include <vector>

Plus, I found out that, even though gcc-c++.x86_64 exists
/usr/include/i686-redhat-linux exists but not /usr/include/x86_64-redhat-linux
Comment 2 Jakub Jelinek 2010-06-13 16:20:42 EDT
That means you've installed libstdc++-devel.i686 and not libstdc++-devel.x86_64.
You need to former to compile 32-bit programs (i.e. g++ -m32), while the latter for 64-bit programs.
Comment 3 Giovanni Campagna 2010-06-13 16:38:40 EDT
Well, gcc-c++ should depend on libstdc++-devel of the appropriate architecture. as it is mostly useless on its own.

Thanks anyway.

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