This is the mail archive of the gcc-help@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]

Error message on building GCC


Recently I saw that there is a new version of the LINUX Kernel, 2.2.14,
out, and since RedHat supplied me with 2.2.12 (in version 6.1), I
thought I would try to build a new kernel, especially since it appeared
RedHat generated a generic kernel that would run on all 386 PCs and mine
has a Pentium II installed.  Moreover, I don't have a SCSI channel, so
don't need that part of the kernel.

After reading the documentation and seeing what versions of the various
pieces of software the kernel needs, I brought up the GNU Web Site to
see what the latest version of GCC was, and it was one version beyond
that which RedHat had installed as part of 6.1, ecgs-2.91.66.  So I
downloaded gcc-2.95.2.tar.gz and prepared to install it by moving the
file to directory /install and then executing gzip followed by tar to
get the new subdirectory 2.95.2.  I printed out the files INDEX,
CONFIGURE, SPECIFICS, BUILD, and FINALINSTALL, and then after reading
them carefully, while in directory /install created subdirectory objdir
which I then cded to and gave the command

/install/gcc-2.95.2/configure --enable-languages=c++,java,objc

since I did not want Fortran 77 and I was unacquainted with CHILL.

As far as I could tell, this step was successful, i.e., I got no error
messages.

So I gave the command

make bootstrap

after first finding out that I have GNU Make, version 3.77.

Unfortunately, the build terminated very quickly with 

/usr/include/linux/errno.h: 4: asm/errno.h: No such file or directory

So I looked at this file and it has the following #include statement:

#include <asm/errno.h>

So first I went to the root directory / and gave an ls to see what
directories I have, and there was no /asm directory.

Then I decided to modify the "famous" Hello, World program to see what
the above include did.  First, with the flag -Wall to GCC, no messages
of any sort were produced.  So I added the flag -E and changed the
output to hello.p and used less to look at the preprocessor output.  I
discovered that 

asm/errno.h -> /usr/include/asm/errno.h

so I modified the above #include to

#include </usr/include/asm/errno.h>

and still got no messages of any sort (only using the flags -Wall and
-o).

So the question is, what has happened that I am unable to build GCC
2.95.2 successfully?  I have been on the GNU Web Site to see if I could
find any information that others have had this same problems, but
couldn't find anything.

I could try modifying the file /usr/include/linux/errno.h, but am
reluctant to since this is the first time I have tried to install either
a new GCC compiler or to build a LINUX kernel.  Unless, of course,
someone much more knowledgeable than I can tell me that this is the
right thing to do.

I realize that I may be having my troubles because of the way RedHat has
installed the GCC compiler.  On this pc, gcc is in /usr/bin, which, I
gather from reading the 2.95.2 documentation, is not where it is
normally installed.  And I know that cc1 is in
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66.  And there is only one
library, lib-2.1.2.so in directory /lib.

Thanks in advance for any help you can give me.  I would like to have
2.95.2 as my regular compiler, in part because the documentation for the
kernel 2.2.14 seems to imply that the flag -fno-strict-aliasing is
needed and it is my understanding that this flag is only available
starting with 2.95.2.

Tom Cundiff,  609-737-0537 (in case anyone should want to call me: I am
retired, so home much of the time)


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