First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 22541
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: dank@kegel.com
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 22541 depends on: Show dependency tree
Show dependency graph
Bug 22541 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2005-07-18 05:52
When building gcc-3.4.3 or gcc-4.x into a clean $PREFIX,
the configure script happily copies the glibc include files from include to
sys-include;
here's the line from the log file (with $PREFIX instead of the real prefix):


Copying $PREFIX/i686-unknown-linux-gnu/include to
$PREFIX/i686-unknown-linux-gnu/sys-include

But later, when running fixincludes, it gives the error message
 The directory that should contain system headers does not exist:
 
$PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/../../../../i686-unknown-linux-gnu/sys-include

Nevertheless, it continues building; the header files it installs in
 $PREFIX/lib/gcc/i686-unknown-linux-gnu/3.4.3/include
do not include the boilerplate that would cause it to #include_next the
glibc headers in the system header directory.
Thus the resulting toolchain can't compile the following program:
#include <limits.h>
int x = PATH_MAX;
because its limits.h doesn't include the glibc header.


The problem is that gcc/Makefile.in assumes that
it can refer to $PREFIX/i686-unknown-linux-gnu  with the path
                $PREFIX/lib/../i686-unknown-linux-gnu, but
that fails because the directory $PREFIX/lib doesn't exist during 'make all';
it is only created later, during 'make install'.  (Which makes this problem
confusing, since one only notices the breakage well after 'make install',
at which point the path configure complained about does exist, and has the
right stuff in it.)

I posted a proposed fix to
http://gcc.gnu.org/ml/gcc-patches/2005-07/msg00751.html

------- Comment #1 From dank@kegel.com 2005-09-13 14:31 -------
Keating wrote in http://gcc.gnu.org/ml/gcc-patches/2005-07/msg01345.html

>Needs a ChangeLog entry, but otherwise OK.
>
>A key detail that you left out of your patch description is that 
>SYSTEM_HEADER_DIR is used *only* for fixincludes and similar; it is  not
actually >put into the compiler.  If the path was used in the  compiler, this
patch would >not be OK, because it would mean the  compiler couldn't be moved to
a different >place after installation.

I haven't looked at the patch again after reading his comment (just saw it now),
but I intend to.

------- Comment #2 From Andrew Pinski 2005-09-16 00:52 -------
I think this is a dup of bug 7088 but I cannot prove it for sure.

------- Comment #3 From Bernd Schmidt 2006-05-17 13:54 -------
Subject: Bug 22541

Author: bernds
Date: Wed May 17 13:54:38 2006
New Revision: 113859

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113859
Log:
        PR bootstrap/22541
        From Dan Kegel <dank@kegel.com>:
        * Makefile.in: Strip "dir/../" combinations from SYSTEM_INCLUDE_DIR.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/Makefile.in

------- Comment #4 From Bernd Schmidt 2006-06-13 14:39 -------
Subject: Bug 22541

Author: bernds
Date: Tue Jun 13 14:39:42 2006
New Revision: 114611

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114611
Log:
        PR bootstrap/22541
        From Dan Kegel <dank@kegel.com>:
        * Makefile.in: Strip "dir/../" combinations from SYSTEM_INCLUDE_DIR.


Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/Makefile.in

------- Comment #5 From Andrew Pinski 2006-06-13 14:54 -------
Fixed in 4.1.2 and the mainline.

First Last Prev Next    No search results available      Search page      Enter new bug