LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS: Error during GCC-4.7.1-Pass 1 (LFS 7.2, Section 5.5) (http://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-error-during-gcc-4-7-1-pass-1-lfs-7-2-section-5-5-a-4175438670/)

erkant 11-25-2012 01:24 PM

LFS: Error during GCC-4.7.1-Pass 1 (LFS 7.2, Section 5.5)
 
I'm following LFS 7.2 book, and I'm stuck at Section 5.5, building GCC-4.7.1 When I'm executing the "make" command, after some time I get the following error message. You can find it below:

In file included from ./tm.h:32:0,
from ../../gcc-4.7.1/gcc/gcc.c:37:
../../gcc-4.7.1/gcc/config/i386/linux.h:26:34: warning: extra tokens at end of #undef directive [enabled by default]
../../gcc-4.7.1/gcc/config/i386/linux.h:27:34: warning: extra tokens at end of #undef directive [enabled by default]
../../gcc-4.7.1/gcc/config/i386/linux.h:29:0: warning: "STANDARD_STARTFILE_PREFIX" redefined [enabled by default]
../../gcc-4.7.1/gcc/config/i386/linux.h:28:0: note: this is the location of the previous definition
../../gcc-4.7.1/gcc/gcc.c:1130:54: warning: initialization makes pointer from integer without a cast [enabled by default]
../../gcc-4.7.1/gcc/gcc.c:1130:54: error: expected ',' or ';' before string constant
../../gcc-4.7.1/gcc/gcc.c: In function 'get_random_number':
../../gcc-4.7.1/gcc/gcc.c:8107:12: warning: ignoring return value of 'read', declared with attribute warn_unused_result [-Wunused-result]
make[2]: *** [gcc.o] Error 1
make[2]: Leaving directory `/mnt/lfs-full/sources/gcc-build/gcc'
make[1]: *** [install-gcc] Error 2
make[1]: Leaving directory `/mnt/lfs-full/sources/gcc-build'
make: *** [install] Error 2

How can I fix this problem? And what can cause it?

spiky0011 11-25-2012 02:33 PM

Hi

Did you check that host was compliant maybe post the output from the version script

Keith Hedger 11-26-2012 09:19 AM

What machine are you building on? 32 or 64 bit?
just unpacked gcc 4.7.1 and in the file given in the error the reference to the warning ../../gcc-4.7.1/gcc/config/i386/linux.h:29:0: warning: "STANDARD_STARTFILE_PREFIX" the "STANDARD_STARTFILE_PREFIX" definition doesn't exist.
Try checksumming and/or redownloading/unpacking the archive.

erkant 11-26-2012 04:25 PM

I'm using 32-bit. Below you can find the ouput of the version script:

bash, version 4.2.0(2)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.22
bison (GNU Bison) 2.5
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.13
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
version-check.sh: line 17: gwak: command not found
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
(Ubuntu EGLIBC 2.15-0ubuntu10.3) 2.15
grep (GNU grep) 2.10
gzip 1.4
Linux version 3.2.0-33-generic-pae (buildd@lamiak) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #52-Ubuntu SMP Thu Oct 18 16:39:21 UTC 2012
m4 (GNU M4) 1.4.16
GNU Make 3.81
patch 2.6.1
Perl version='5.14.2';
GNU sed version 4.2.1
tar (GNU tar) 1.26
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.1.0alpha
gcc compilation OK

spiky0011 11-26-2012 05:00 PM

Hi

/bin/sh -> /bin/dash should be /bin/sh -> /bin/bash

i dont know whats happenned here
version-check.sh: line 17: gwak: command not found
/usr/bin/awk -> /usr/bin/gawk

maybe try reinstalling gawk

Fix all these 1st then rebuild from beginning

erkant 11-27-2012 11:12 AM

Keith Hedger's advice solved the problem. I just tried re-unpacking it, and it did the job. Thanks to both of you!

druuna 11-27-2012 11:27 AM

Quote:

Originally Posted by erkant (Post 4838071)
Keith Hedger's advice solved the problem. I just tried re-unpacking it, and it did the job. Thanks to both of you!

If you only followed Keith Hedger's advise, then you are going to encounter more problems along the way.

Fix the issue's that spiky0011 pointed out.

Keith Hedger 11-28-2012 06:03 AM

Quote:

Originally Posted by druuna (Post 4838088)
If you only followed Keith Hedger's advise, then you are going to encounter more problems along the way.

Fix the issue's that spiky0011 pointed out.

I agree you must fix ALL the problems.


All times are GMT -5. The time now is 02:09 AM.