LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   LFS gcc library (https://www.linuxquestions.org/questions/linux-from-scratch-13/lfs-gcc-library-4175414268/)

esornep 07-01-2012 08:25 AM

LFS gcc library
 
Following LFS 7.1 and performing actions on UBUNTU 12.04 which is running on a virtual box ........ caught up with gcc error in make file

checking for library containing strerror... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
make[2]: *** [configure-stage2-libiberty] Error 1
make[2]: Leaving directory `/home/LFS/LFS/sources/gcc-build'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/home/LFS/LFS/sources/gcc-build'
make: *** [all] Error 2


Please help!!!

spiky0011 07-01-2012 09:14 AM

Hi

Can you post the output of the version-check here Also what gcc are you upto Chapter number

esornep 07-01-2012 09:25 AM

bash, version 4.2.24(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.22
version-check.sh: line 8: bison: command not found
yacc not found
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.13
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
GNU Awk 3.1.8
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
(Ubuntu EGLIBC 2.15-0ubuntu10) 2.15
grep (GNU grep) 2.10
gzip 1.4
Linux version 3.2.0-23-generic-pae (buildd@palmer) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu4) ) #36-Ubuntu SMP Tue Apr 10 22:19:09 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
version-check.sh: line 33: makeinfo: command not found
Texinfo:
xz (XZ Utils) 5.1.0alpha
gcc compilation OK


I am in the 5th chapter ...... thanks for the reply

spiky0011 07-01-2012 09:33 AM

Hi

Ok this is where the problem lies. You must make your os compatible to build.
Quote:

bash, version 4.2.24(1)-release
/bin/sh -> /bin/dash should point to bash
Binutils: (GNU Binutils for Ubuntu) 2.22
version-check.sh: line 8: bison: command not found bison not installed
yacc not found
bzip2, Version 1.0.6, 6-Sept-2010.
Coreutils: 8.13
diff (GNU diffutils) 3.2
find (GNU findutils) 4.4.2
GNU Awk 3.1.8
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
(Ubuntu EGLIBC 2.15-0ubuntu10) 2.15
grep (GNU grep) 2.10
gzip 1.4
Linux version 3.2.0-23-generic-pae (buildd@palmer) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu4) ) #36-Ubuntu SMP Tue Apr 10 22:19:09 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
version-check.sh: line 33: makeinfo: command not found texinfo needs to installed
Texinfo:
xz (XZ Utils) 5.1.0alpha
gcc compilation OK
Needs to corrected, if you want when you have done that post back new version-check just to make sure

esornep 07-01-2012 09:37 AM

But how do we point it to bash done with the rest of the installation .... thanks very much

spiky0011 07-01-2012 09:41 AM

Hi

Code:

sudo rm /bin/sh
Code:

sudo ln -s /bin/bash /bin/sh

esornep 07-01-2012 10:07 AM

Should I start over from first ..... I guess this is giving back the same error ....... any other method .. i checked with the version it is working fine now thanks for that ......

spiky0011 07-01-2012 10:14 AM

Hi

As long as the version-check is ok now.

Yes start from the very beginning make sure you get rid of all old directories. Start a clean fresh build.

Ps mark this as solved using thread tools

esornep 07-01-2012 10:17 AM

Thanks .... and yes do it immediately after installing .... dont mind otherwise :D :D

esornep 07-01-2012 11:52 AM

checking for library containing strerror... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
make[2]: *** [configure-stage2-libiberty] Error 1
make[2]: Leaving directory `/home/LFS/LFS/sources/gcc-build'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/home/LFS/LFS/sources/gcc-build'
make: *** [all] Error 2


Still the same error any more methods ......

esornep 07-01-2012 12:02 PM

LFS@ubuntu:~/Documents$ bash version-check.sh
bash, version 4.2.24(1)-release
/bin/sh -> /bin/bash
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
GNU Awk 3.1.8
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
(Ubuntu EGLIBC 2.15-0ubuntu10) 2.15
grep (GNU grep) 2.10
gzip 1.4
Linux version 3.2.0-23-generic-pae (buildd@palmer) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu4) ) #36-Ubuntu SMP Tue Apr 10 22:19:09 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


this was the version check ........

checking for library containing strerror... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
make[2]: *** [configure-stage2-libiberty] Error 1
make[2]: Leaving directory `/home/LFS/LFS/sources/gcc-build'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/home/LFS/LFS/sources/gcc-build'
make: *** [all] Error 2

and this is the error .....

spiky0011 07-01-2012 12:20 PM

Hi

When you issued this command what directory were you in?
Code:

tar -jxf ../mpfr-3.1.0.tar.bz2
mv -v mpfr-3.1.0 mpfr
tar -Jxf ../gmp-5.0.4.tar.xz
mv -v gmp-5.0.4 gmp
tar -zxf ../mpc-0.9.tar.gz
mv -v mpc-0.9 mpc

You should of been in /home/LFS/LFS/sources/gcc-4.6.2
and the patch shpuld of been in sources dir

esornep 07-01-2012 12:25 PM

okay the process was

extracting gmp,mpfr and mpc to the sources directory

then extracting gcc and moving to the gcc directory and patching it up

then moving the above directories to gcc

making a gcc-build directory (in sources directory)

finally running the config file in the gcc-build directory with prefix to the tools directory ..........

spiky0011 07-01-2012 12:30 PM

Ok you should untar gcc cd into gcc dir then run the commands as per book here at the end

esornep 07-01-2012 12:35 PM

I guess i was right with the process of moving the directories gmp,mpfr,mpc into gcc-4.6.2 and then running the compile file

the book says
Unpack each package into the GCC source directory and rename the
resulting directories so the GCC build procedures will automatically use them

spiky0011 07-01-2012 01:01 PM

Just a note when ever rebuilding software always remove untared dir and any other build dirs

esornep 07-01-2012 01:07 PM

did it !!!! :( ...... any other method .....???

spiky0011 07-01-2012 01:17 PM

There should be a config log in the gcc dir can you pastebin it

esornep 07-01-2012 01:32 PM

http://pastebin.com/J4G1B1ef

spiky0011 07-01-2012 01:52 PM

Hi

Ok I think your gcc on the host is to new
Quote:

Gcc-4.1.2 (Versions greater than 4.6.2 are not recommended as they have not been tested)
you have 4.6.3
Try a rebuild using this book here
I have just built this 1 yesterday using ubuntu 12.10

Just run the version-check from that book

esornep 07-02-2012 09:32 AM

Okay i started from the first .... right from the start did whatever was in the book and i end up with this error

configure: error: libmpfr not found or uses a different ABI.

was compiling the gcc-4.7.1 ...

in making the make file ..... help please

druuna 07-02-2012 10:08 AM

I'm assuming this is your first LFS build, with that in mind I do have 2 tips for you:

1) Build the stable LFS version and not the Development version. Although the Development version might work, you can run into problems and at that point it will be hard to find out if you did something wrong or that the book was wrong.

2) Do not deviate from the LFS=/mnt/lfs convention. I see you use /home/LFS/LFS/ (in this thread) and/or /home/lfs/LFS/ (in your other thread). Both are suspicious.

There is no need to deviate in any way from the book, doing so will probably complicate things (best case). Especially on a first build you should focus on how things are done and not on how to change things to your liking.

esornep 07-02-2012 10:13 AM

thanks for the reply .... the version 7.1 was giving the error i started the thread with ....... so following it up i cleaned everything and started a fresh so the difference in paths ..... now i was doing what was there in the book exactly (to the best of my knowledge) but this error is creeping up (i have checked for the paths and re verified ) so i would request to suggest a way out for this .....

spiky0011 07-02-2012 01:34 PM

Hi Druuna

The reason for pointing out the svn version was because of the host gcc, I was wondering if that was causing an issue.

esornep 07-03-2012 08:35 AM

In file included from /usr/include/stdio.h:28:0,
from ../../../sources/gcc-4.6.2/libgcc/../gcc/tsystem.h:87,
from ../../../sources/gcc-4.6.2/libgcc/../gcc/libgcc2.c:29:
/usr/include/features.h:324:26: fatal error: bits/predefs.h: No such file or directory
compilation terminated.
make[3]: *** [_muldi3.o] Error 1
make[3]: Leaving directory `/mnt/lfs/gcc-build/i686-pc-linux-gnu/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/mnt/lfs/gcc-build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/mnt/lfs/gcc-build'
make: *** [all] Error 2


any help please .......... as always sticked to the basics .....

spiky0011 07-03-2012 04:35 PM

Hi

Spent the last few hours on this (using 12.04) managed to get the same problem. Have you installed patch on the host system it,s in the repos,
when you
Code:

su - lfs
then
Code:

echo $LFS
did you get /mnt/lfs reply? If not run
Code:

export LFS=/mnt/lfs
Chapter 4.4 did you create the 2 files for user lfs?
then run command
Code:

source ~/.bash_profile
right at the bottom?
I would start again.
Make sure you apply the patch in binutils
I think I covered it all.

I think the problem is with either the .bash_profile or LFS path

esornep 07-04-2012 12:24 AM

Perfectly working on Ubuntu 12.04 ........ thanks for all the help @spiky0011 @druuna

spiky0011 07-04-2012 02:36 AM

hi what was the problem

esornep 07-04-2012 05:10 AM

to get the error gcc-executables i installed gfortran .... then it worked f9

spiky0011 07-04-2012 07:00 AM

I take it you put that on the host system?


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