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
 
LinkBack Search this Thread
Old 11-16-2012, 01:39 PM   #1
Lakhan Kumar
LQ Newbie
 
Registered: Nov 2012
Posts: 22

Rep: Reputation: Disabled
Error in Make of GCC-4.7.1 - Pass 2 of LFS 7.2


Hi Everyone, hope you all are doing well.

I have got an error while make of GCC pass 2, of LFS 7.2

collect2: error: ld returned 1 exit status
make[2]: *** [libgcc_s.so] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/x86_64-unknown-linux-gnu/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2

Please guide me on this.

my version check results:
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.21.0.20110327
bison (GNU Bison) 2.4.1
/usr/bin/yacc -> /usr/bin/bison.yacc
bzip2, Version 1.0.5, 10-Dec-2007.
Coreutils: 8.5
diff (GNU diffutils) 3.0
find (GNU findutils) 4.4.2
GNU Awk 3.1.7
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
(Ubuntu EGLIBC 2.13-0ubuntu13) 2.13
GNU grep 2.6.3
gzip 1.3.12
Linux version 2.6.38-8-generic (buildd@allspice) (gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu3) ) #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011
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.25
Texinfo: makeinfo (GNU texinfo) 4.13
xz (XZ Utils) 5.0.0
gcc compilation OK
 
Old 11-16-2012, 02:15 PM   #2
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 Lakhan Kumar View Post
Hi Everyone, hope you all are doing well.

I have got an error while make of GCC pass 2, of LFS 7.2

collect2: error: ld returned 1 exit status
make[2]: *** [libgcc_s.so] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/x86_64-unknown-linux-gnu/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2

Please guide me on this.
The only time I see this error if export MAKEFLAGS='-j X' or make -jX (X being 2 or greater) is being used.

Not all programs like it and it shows most when doing the tests (chapter 6).

Unset MAKEFLAGS or don't use the -jX option.
 
Old 11-16-2012, 02:15 PM   #3
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,611
Blog Entries: 1

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

How did chapter 6.10 adjusting toolchain, pan out, did you get all the correct replies?
 
Old 11-16-2012, 04:08 PM   #4
Lakhan Kumar
LQ Newbie
 
Registered: Nov 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
The only time I see this error if export MAKEFLAGS='-j X' or make -jX (X being 2 or greater) is being used.

Not all programs like it and it shows most when doing the tests (chapter 6).

Unset MAKEFLAGS or don't use the -jX option.
okay probably thats what happened, last time that showed up and it got solved in next attempt of GCC pass 1., might i haven't noticed that. I'll close this thread if this is the problem, lemme check it.

Thank you.
 
Old 11-16-2012, 04:10 PM   #5
Lakhan Kumar
LQ Newbie
 
Registered: Nov 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Hi

How did chapter 6.10 adjusting toolchain, pan out, did you get all the correct replies?
Actually i am still in chapter 5. Its GCC pass 2.
Thank you for replying.
 
Old 11-16-2012, 04:22 PM   #6
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,611
Blog Entries: 1

Rep: Reputation: 226Reputation: 226Reputation: 226
Sorry misread opps
 
Old 11-17-2012, 01:49 AM   #7
Lakhan Kumar
LQ Newbie
 
Registered: Nov 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by spiky0011 View Post
Sorry misread opps
oh its all ok bro. Again thanx for quick reply.
 
Old 11-17-2012, 01:51 AM   #8
Lakhan Kumar
LQ Newbie
 
Registered: Nov 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
The problem ain't solved. I removed gcc-build, and this time implemented it with "make" only, with no -j2.. Do i need to start again from Binutils pass 1? I mean start again from very beginning?
 
Old 11-17-2012, 02:51 AM   #9
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 Lakhan Kumar View Post
The problem ain't solved.
Do you still have the exact same problem or a different one?

Quote:
I removed gcc-build,
You should have removed both the gcc-build and gcc-4.7.1 directory and start from the top of the gcc pass 2 chapter.

BTW: Did you remove the gcc-4.7.1 dir after doing pass 1? You should have, read the second Important box, specifically point 3: 5.3. General Compilation Instructions
 
Old 11-17-2012, 04:40 AM   #10
Lakhan Kumar
LQ Newbie
 
Registered: Nov 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
Do you still have the exact same problem or a different one?

You should have removed both the gcc-build and gcc-4.7.1 directory and start from the top of the gcc pass 2 chapter.

BTW: Did you remove the gcc-4.7.1 dir after doing pass 1? You should have, read the second Important box, specifically point 3: 5.3. General Compilation Instructions
Okay I removed Gcc-4.7.1 and Gcc-build, and done all the steps. Still same error in "Make". Please any more suggestions?



collect2: error: ld returned 1 exit status
make[2]: *** [libgcc_s.so] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/x86_64-unknown-linux-gnu/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2

Last edited by Lakhan Kumar; 11-17-2012 at 04:41 AM. Reason: Errors Added.
 
Old 11-17-2012, 04:45 AM   #11
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 Lakhan Kumar View Post
Okay I removed Gcc-4.7.1 and Gcc-build, and done all the steps. Still same error in "Make". Please any more suggestions?

collect2: error: ld returned 1 exit status
make[2]: *** [libgcc_s.so] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/x86_64-unknown-linux-gnu/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2
The error isn't the same........

Please post the following information:
- the generated config.log file
- the lines before the collect2: error: ld returned 1 exit status line (have a look here: 1.5.3. Compilation Problems).

EDIT: Also have a look here: LFS 7.1 on Ubuntu 12.04. This blog entry is based on LFS7.1 (different package versions), but the steps are the same for 7.2. It might be a good reference to check your steps.

Last edited by druuna; 11-17-2012 at 05:23 AM. Reason: Added reference to blog entry
 
Old 11-17-2012, 12:34 PM   #12
Lakhan Kumar
LQ Newbie
 
Registered: Nov 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
The error isn't the same........

Please post the following information:
- the generated config.log file
- the lines before the collect2: error: ld returned 1 exit status line (have a look here: 1.5.3. Compilation Problems).

EDIT: Also have a look here: LFS 7.1 on Ubuntu 12.04. This blog entry is based on LFS7.1 (different package versions), but the steps are the same for 7.2. It might be a good reference to check your steps.
The error seems to be same, please guide me with the difference since the error in first post of mine, and after second attempt seem to be exactly same.
I referred to your link "https://www.linuxquestions.org/questions/blog/druuna-60084/lfs-7-1-on-ubuntu-12-04-34902/" , it seems i have missed 5.8 but it seems it isn't in book. "Adjusting the toolchain and specs file"..Is this the cause? If i follow book order its 6.10 adjusting the tool chain part.


I am uploading the log file in next comment.

Last edited by Lakhan Kumar; 11-17-2012 at 12:37 PM. Reason: book reference
 
Old 11-17-2012, 12:48 PM   #13
Lakhan Kumar
LQ Newbie
 
Registered: Nov 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
http://pastebin.com/NsXDXfR2

This is the link to config.log of GCC. Please do guide me further. Thanks
 
Old 11-17-2012, 01:01 PM   #14
Lakhan Kumar
LQ Newbie
 
Registered: Nov 2012
Posts: 22

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by druuna View Post
The error isn't the same........

Please post the following information:
- the lines before the collect2: error: ld returned 1 exit status line (have a look here: 1.5.3. Compilation Problems).
Sorry, i'll take care of posting errors properly from now on, thanks for sharing the link. I am recompiling whole GCC pass 2 from tar to error so that can share error and before lines properly, also i have shared the link of Log file, the only thing i noticed unusual in it was some warnings during process stating something about array size, lemme check if i can dig out that information again.

Thanks for your patience.
 
Old 11-18-2012, 03:03 AM   #15
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 Lakhan Kumar View Post
I referred to your link "https://www.linuxquestions.org/questions/blog/druuna-60084/lfs-7-1-on-ubuntu-12-04-34902/" , it seems i have missed 5.8 but it seems it isn't in book. "Adjusting the toolchain and specs file"..Is this the cause?
Nope, that's my mistake. Chapter 5.8 Adjusting the Toolchain isn't part of lfs 7.2 any more. sorry about that. Follow the steps in the LFS 7.2 book and use my blog entry as a reference only.

Quote:
Originally Posted by Lakhan Kumar View Post
The error seems to be same, please guide me with the difference since the error in first post of mine, and after second attempt seem to be exactly same.
This is not present in the second one
Code:
 make[2]: *** Waiting for unfinished jobs....
Quote:
Originally Posted by Lakhan Kumar View Post
http://pastebin.com/NsXDXfR2

This is the link to config.log of GCC.
I cannot find anything that's wrong in the config.log file.

Quote:
Originally Posted by Lakhan Kumar View Post
Sorry, i'll take care of posting errors properly from now on, thanks for sharing the link. I am recompiling whole GCC pass 2 from tar to error so that can share error and before lines properly
Please do post the on screen errors. They might hold a clue.
 
  


Reply

Tags
gcc, lfs, pass 2


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ERROR: During Make of GCC-4.5.1 - Pass 1 gau190188 Linux From Scratch 1 01-02-2011 02:31 PM
GCC - Pass 1 Make error furry-penguin Linux From Scratch 7 09-29-2010 04:43 PM
LFS 6.6 - Chapter 5.5 - make[2]: *** [buildgetconstants.o] Error 1 - GCC Pass 1 malikcpp Linux From Scratch 3 06-29-2010 08:09 AM
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:59 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