LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Error in Make of GCC-4.7.1 - Pass 2 of LFS 7.2 (http://www.linuxquestions.org/questions/linux-from-scratch-13/error-in-make-of-gcc-4-7-1-pass-2-of-lfs-7-2-a-4175437468/)

Lakhan Kumar 11-16-2012 01:39 PM

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

druuna 11-16-2012 02:15 PM

Quote:

Originally Posted by Lakhan Kumar (Post 4830966)
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.

spiky0011 11-16-2012 02:15 PM

Hi

How did chapter 6.10 adjusting toolchain, pan out, did you get all the correct replies?

Lakhan Kumar 11-16-2012 04:08 PM

Quote:

Originally Posted by druuna (Post 4830973)
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.

Lakhan Kumar 11-16-2012 04:10 PM

Quote:

Originally Posted by spiky0011 (Post 4830974)
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. :)

spiky0011 11-16-2012 04:22 PM

Sorry misread opps

Lakhan Kumar 11-17-2012 01:49 AM

Quote:

Originally Posted by spiky0011 (Post 4831047)
Sorry misread opps

:) oh its all ok bro. Again thanx for quick reply.

Lakhan Kumar 11-17-2012 01:51 AM

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?

druuna 11-17-2012 02:51 AM

Quote:

Originally Posted by Lakhan Kumar (Post 4831198)
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

Lakhan Kumar 11-17-2012 04:40 AM

Quote:

Originally Posted by druuna (Post 4831224)
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

druuna 11-17-2012 04:45 AM

Quote:

Originally Posted by Lakhan Kumar (Post 4831281)
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.

Lakhan Kumar 11-17-2012 12:34 PM

Quote:

Originally Posted by druuna (Post 4831285)
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.

Lakhan Kumar 11-17-2012 12:48 PM

http://pastebin.com/NsXDXfR2

This is the link to config.log of GCC. Please do guide me further. Thanks :)

Lakhan Kumar 11-17-2012 01:01 PM

Quote:

Originally Posted by druuna (Post 4831285)
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.

druuna 11-18-2012 03:03 AM

Quote:

Originally Posted by Lakhan Kumar (Post 4831469)
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 (Post 4831469)
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 (Post 4831478)
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 (Post 4831487)
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.


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