This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

MissedHeaderFiles


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++ Content
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


1. Problem                 - short description

For sake of completeness and illustration: (Attachment, bzip2-compressed)

2. Appendix A1             - Calling script 1                                     
3. Appendix A2             - "Protocol" of compilation process 1                     
4. Appendix A3             - "Protocol" of the redone error-causing line (-v appended)
5. Appendix B1             - Calling script 2
6. Appendix B2             - "Protocol" of compilation process 2
7. Appendix B3             - "Protocol" of the redone error-causing line (-v appended)



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++ Problem: short description
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


1. Details
  Architecture (uname -a): Linux Merlin 2.2.5 #2 Sat Dec 4 00:34:02 CET 1999 i686 unknown
  Native compiler (egcs-2.91.66) reside under /usr, compiled as i486-linux.
  Gnu-binutils (2.9.1, patch 0.22b) reside under /usr, compiled as i486-linux.

2. I got a full distribution of gcc-2.95.2 (libstdc++ etc. included).
  (ftp://ftp.fu-berlin.de/unix/languages/egcs/releases/gcc-2.95.2/gcc-2.95.2.tar.gz)

3. Due to info-manual: (did 2 separate trials: make and make bootstrap)
  I decompressed sources into the source directory.
    gunzip</WWW/ftp.fu-berlin.de/unix/languages/egcs/releases/gcc-2.95.2/gcc-2.95.2.tar.gz\
    | (p=/tmp/test;mkdir -p $p/gcc-2.95.2;cd $p;tar x;);
  I created building directory.
    mkdir -p /tmp/test/gcc-2.95.2.built-make /tmp/test/gcc-2.95.2.built-make-bootstrap
  I copied the include files into the target-architecure-include directory.
    (cd /usr;tar c include;)|(p=/usr/local/i486-pc-linux-gnu;mkdir -p $p/include 2>/dev/null;cd $p;tar x;)
  I configured the sources for building.
    (cd /tmp/test/gcc-2.95.2.built-make;xterm -e bash &);
    (cd /tmp/test/gcc-2.95.2.built-make-bootstrap;xterm -e bash &);
    /tmp/test/gcc-2.95.2/configure --target=i486-pc-linux-gnu <OTHER_OPIONS>
  I startet the install process.
    make [bootstrap]

4. In each case the compilation terminated with an error:

/tmp/test/gcc-2.95.2/gcc/libgcc2.c:41: stdlib.h: No such file or directory
/tmp/test/gcc-2.95.2/gcc/libgcc2.c:42: unistd.h: No such file or directory

5. I repeated the last call in the appropriate directory
   (/tmp/test/gcc-2.95.2.built-make[-bootstrap]/gcc):

../gcc "root" 21:44:23 726 # name=_muldi3;  echo ${name};   /tmp/test/gcc-2.95.2.built-i486-make/gcc/xgcc -v -B/tmp/test/gcc-2.95.2.built-i486-make/gcc/ -B/usr/local/i486-pc-linux-gnu/bin/ -I/usr/local/i486-pc-linux-gnu/include -O2  -DCROSS_COMPILE -DIN_GCC     -g -O2 -I./include  -fPIC -g1  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I/tmp/test/gcc-2.95.2/gcc -I/tmp/test/gcc-2.95.2/gcc/config -I/tmp/test/gcc-2.95.2/gcc/../include -c -DL${name}        /tmp/test/gcc-2.95.2/gcc/libgcc2.c -o ${name}.o;

   essentially getting

GNU CPP version 2.95.2 19991024 (release) (i386 Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 include
 .
 /tmp/test/gcc-2.95.2/gcc
 /tmp/test/gcc-2.95.2/gcc/config
 /tmp/test/gcc-2.95.2/gcc/../include
 /tmp/test/gcc-2.95.2.built-i486-make/gcc/include
End of search list.
The following default directories have been omitted from the search path:
 /usr/local/lib/gcc-lib/i486-pc-linux-gnu/2.95.2/../../../../include/g++-3
 /usr/local/lib/gcc-lib/i486-pc-linux-gnu/2.95.2/include
 /usr/local/lib/gcc-lib/i486-pc-linux-gnu/2.95.2/../../../../i486-pc-linux-gnu/sys-include
 /usr/local/lib/gcc-lib/i486-pc-linux-gnu/2.95.2/../../../../i486-pc-linux-gnu/include
End of omitted list.
/tmp/test/gcc-2.95.2/gcc/libgcc2.c:41: stdlib.h: No such file or directory
/tmp/test/gcc-2.95.2/gcc/libgcc2.c:42: unistd.h: No such file or directory

6. I'm tempted to consider this to be a bug, because:
  - I followed the instructions.
  - stdlib.h, unistd.h are available in /usr/include, /usr/local/include.
  - In the error-causing call there is an explicite option
    -I/usr/local/i486-pc-linux-gnu/ .
  - The directories containing stdlib.h, unistd.h are available but not
    searched through.
  - I don't see a way how to change the behavior without going into the
    details of the sources.

7. If I'm wrong, I'm sorry. In this case I would be pleased to get a hint
  about how to avoid the problem.

  Apart from this, merry X-mas and a happy new year.

                                                  Hagen Gilsing
<gilsing@informatik.hu-berlin.de>



++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++ 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Appendices, bzip2-compressed


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]