Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 104104 - C++ compiler doesn't find libstdc++ headers
C++ compiler doesn't find libstdc++ headers
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: gcc (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Diego Novillo
Depends On:
Blocks: 97942
  Show dependency treegraph
Reported: 2003-09-09 17:33 EDT by Ulrich Drepper
Modified: 2007-11-30 17:06 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-09-11 11:00:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ulrich Drepper 2003-09-09 17:33:27 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030904
Firebird/0.6.1+ StumbleUpon/1.83

Description of problem:
The C++ compiler cannot locate the C++ headers.  libstdc++-ssa-devel is installed.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Run g++-ssa -o t t.cc with this code

#include <iostream>
main ()
  std::cout << "hello world" << std::endl;

Actual Results:  t.cc:1:20: iostream: No such file or directory
t.cc: In function `int main()':
t.cc:5: error: `cout' is not a member of `std'
t.cc:5: error: `endl' is not a member of `std'

Expected Results:  Clean compile

Additional info:

The compiler looks at the following places for the file:


That's it.  No other files are looked at.
Comment 1 Ulrich Drepper 2003-09-09 17:51:44 EDT
Jakub suggested running this:

$  g++-ssa  -v -E -xc++ /dev/null 2>&1 | grep include
ignoring nonexistent directory "/lib/include/c++/3.5-tree-ssa"
ignoring nonexistent directory "/lib/include/c++/3.5-tree-ssa/ia64-redhat-linux-gnu"
ignoring nonexistent directory "/lib/include/c++/3.5-tree-ssa/backward"
ignoring nonexistent directory "/lib/ia64-redhat-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

I.e., it's "just" the wrong prefix with which gcc is compiled.
Comment 2 Frank Ch. Eigler 2003-09-10 13:37:04 EDT
This appears to be caused by cc1plus looking for its
/usr/include/c++ headers by means of relative traversal
from the gcc-lib directory:


If $libdir=/usr/lib, this works
If $libdir=/lib/ssa, this works not
Comment 3 Diego Novillo 2003-09-11 10:52:43 EDT
I hacked the gcc-ssa.spec file to force g++ includes into /lib/ssa.  The new .37
release should work.
Comment 4 Ulrich Drepper 2003-09-12 14:55:21 EDT
I tested .38 and it indeed works, at least for my test cases.

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