[lfs-support] can't compile gcc-4.7.1 pass 1

Dr. George E. Moore gem at x-ctr-l.com
Tue Jan 15 10:15:07 PST 2013


> Message: 3
> Date: Sat, 05 Jan 2013 15:36:34 -0600
> From: Bruce Dubbs <bruce.dubbs at gmail.com>
> Subject: Re: [lfs-support] lfs-support Digest, Vol 2764, Issue 1
> To: LFS Support List <lfs-support at linuxfromscratch.org>
> Message-ID: <50E89CE2.1060705 at gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> 
> Dr. George E. Moore wrote:
> 
> Please don't reply to digest email without trimming.
> 
> > The output of the "version-check-sh" clearly indicate I have missing and
> > perhaps in appropriate versions. I read this and still failed to run
> > this script before now. My apology for not following directions. I'll
> > make the correction and re-try the GCC-4.7.1 make.
> >
> > The content of the script follows:
> >
> > gem at precision690:~$ ./version-check.sh
> > bash, version 4.1.5(1)-release
> > /bin/sh -> /bin/dash
> 
> Needs to be bash
> 
> > Binutils: (GNU Binutils for Debian) 2.20.1-system.20100303
> > ./version-check.sh: line 8: bison: command not found
> > yacc not found
> 
> Install bison.  yacc should then be set up automatically, but check that.
> 
> > bzip2,  Version 1.0.5, 10-Dec-2007.
> > Coreutils:  8.5
> > diff (GNU diffutils) 3.0
> > find (GNU findutils) 4.4.2
> > ./version-check.sh: line 17: gawk: command not found
> > /usr/bin/awk -> /usr/bin/mawk
> 
> Install gawk and check the symlink
> 
> > gcc (Debian 4.4.5-8) 4.4.5
> > (Debian EGLIBC 2.11.3-4) 2.11.3
> > GNU grep 2.6.3
> > gzip 1.3.12
> > Linux version 2.6.32-5-686 (Debian 2.6.32-46) (dannf at debian.org) (gcc
> > version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Sun Sep 23 09:49:36 UTC 2012
> > m4 (GNU M4) 1.4.14
> > GNU Make 3.81
> > patch 2.6
> > Perl version='5.10.1';
> > GNU sed version 4.2.1
> > tar (GNU tar) 1.23
> > Texinfo: makeinfo (GNU texinfo) 4.13
> > xz (XZ Utils) 5.0.0
> > gcc compilation OK
> > gem at precision690:~$
> 
> The rest is OK.
> 
>    -- Bruce

Bruce,

Thanks for getting back with me.

I have been able to get the gcc-4.7.1 pass 1 to run to completion;
however, I have some concerns as to its validity, given what I had to
do. Let me explain:

After linking /bin/sh -> /bin/bash; installing bison and gawk;
validating that /usr/bin/yacc -> /usr/bin/bison.yacc, and
that /usr/bin/awk -> /usr/bin/gawk, I re-configured and ran make again
in the gcc-build directory. The compilation stilled failed while
building gcc/c-family/c-cppbuiltin.c; with the same error -
GNU_USER_TARGET_OS_CPP_BUILTINS() undefined.

I rechecked the instructions and the host requirements; however, it
appears that the guidelines are being following. 

I located the macro definition for GNU_USER_TARGET_OS_CPP_BUILTINS() in
gcc-4.7.1/gcc/config/gnu.h header and added it to c-cppbuiltins.c.

The compilation then error when compiling gcc/gcc.c. with
GNU_USER_DYNAMIC_LINKER and GNU_USER_LINKER_EMULATION as undefined.

I located these #define in gcc-4.7.1/gcc/config/i386/gnu.h and added
this header to gcc.c.

My question is whether this pass 1 build is valid? It seems that my
having to add headers to .c file is some what unorthodoxy, and could
result in a bad build. I'm a little reluctant to go forward without some
feedback. I would have assumed that these defines would have been
included in some "common" directory path search or not needed for
compiling gcc-4.7.1 pass 1.


gmoore




More information about the lfs-support mailing list