LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
Search this Thread
Old 11-25-2012, 01:24 PM   #1
erkant
Member
 
Registered: Oct 2012
Posts: 51

Rep: Reputation: Disabled
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?
 
Old 11-25-2012, 02:33 PM   #2
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
Hi

Did you check that host was compliant maybe post the output from the version script
 
Old 11-26-2012, 09:19 AM   #3
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 836

Rep: Reputation: 167Reputation: 167
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.
 
Old 11-26-2012, 04:25 PM   #4
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
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
 
Old 11-26-2012, 05:00 PM   #5
spiky0011
Senior Member
 
Registered: Jan 2011
Location: PLANET-SPIKE
Distribution: Ubuntu 12.04/12.10/13.04/LFS/Centos6.3/Debain/PCBSD/Mageia 3
Posts: 1,614
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
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
 
Old 11-27-2012, 11:12 AM   #6
erkant
Member
 
Registered: Oct 2012
Posts: 51

Original Poster
Rep: Reputation: Disabled
Keith Hedger's advice solved the problem. I just tried re-unpacking it, and it did the job. Thanks to both of you!
 
Old 11-27-2012, 11:27 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Quote:
Originally Posted by erkant View Post
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.
 
Old 11-28-2012, 06:03 AM   #8
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 836

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by druuna View Post
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.
 
  


Reply

Tags
error, gcc, lfs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] LFS: Error during Binutils-2.22 - Pass 1 (Section 5.4, LFS 7.2) erkant Linux From Scratch 4 11-26-2012 01:26 PM
Error in Make of GCC-4.7.1 - Pass 2 of LFS 7.2 Lakhan Kumar Linux From Scratch 15 11-19-2012 04:39 AM
error using lfs while compiling lfs book's 6.12 (gcc-4.1.2) section aditya_gpch Linux From Scratch 3 04-24-2008 04:23 PM
LFS GCC - first pass install error arnuld Linux From Scratch 2 12-20-2006 07:59 AM
Error Compiling GCC (1st Pass) in LFS 6.0 TGWDNGHN Linux From Scratch 1 06-30-2005 08:57 PM


All times are GMT -5. The time now is 01:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration