LinuxQuestions.org
Review your favorite Linux distribution.
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 12-11-2012, 02:45 AM   #1
Lancelot1
Member
 
Registered: Dec 2007
Location: Amsterdam
Distribution: (K)Ubuntu
Posts: 102

Rep: Reputation: 15
error after tools check glibc chapter 5.7


Ok I have been toying around with LFS now for some time and seem to keep getting stuck at the same point with the tools check on 5.7

bash, version 4.2.37(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.22.90.20120924
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 4.0.1
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
(Ubuntu EGLIBC 2.15-0ubuntu20) 2.15
grep (GNU grep) 2.12
gzip 1.5
Linux version 3.5.0-19-generic (buildd@aatxe) (gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) ) #30-Ubuntu SMP Tue Nov 13 17:49:53 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

The error I get is that some of the files are not found while they are there in the Tools directory

the errors are:

lfs@kubuntu-P8610:~$ echo 'main(){}' > dummy.c
lfs@kubuntu-P8610:~$ $LFS_TGT-gcc dummy.c
/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/bin/ld: cannot find /LFS/tools/lib/libc.so.6 inside /LFS
/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/bin/ld: cannot find /LFS/tools/lib/libc_nonshared.a inside /LFS
/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/bin/ld: cannot find /LFS/tools/lib/ld-linux.so.2 inside /LFS
collect2: error: ld returned 1 exit status

Any help would be great

tx

PS is gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 > 4.7.1 a very big issue?

Last edited by Lancelot1; 12-11-2012 at 02:47 AM.
 
Old 12-11-2012, 03:23 AM   #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 Lancelot1 View Post
Ok I have been toying around with LFS now for some time and seem to keep getting stuck at the same point with the tools check on 5.7
Which LFS version are you trying to build?

Quote:
bash, version 4.2.37(1)-release
/bin/sh -> /bin/bash
Binutils: (GNU Binutils for Ubuntu) 2.22.90.20120924
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 4.0.1
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
(Ubuntu EGLIBC 2.15-0ubuntu20) 2.15
grep (GNU grep) 2.12
gzip 1.5
Linux version 3.5.0-19-generic (buildd@aatxe) (gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) ) #30-Ubuntu SMP Tue Nov 13 17:49:53 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
That looks OK, although some version are higher then mentioned.

Quote:
The error I get is that some of the files are not found while they are there in the Tools directory

the errors are:

lfs@kubuntu-P8610:~$ echo 'main(){}' > dummy.c
lfs@kubuntu-P8610:~$ $LFS_TGT-gcc dummy.c
/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/bin/ld: cannot find /LFS/tools/lib/libc.so.6 inside /LFS
/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/bin/ld: cannot find /LFS/tools/lib/libc_nonshared.a inside /LFS
/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/bin/ld: cannot find /LFS/tools/lib/ld-linux.so.2 inside /LFS
collect2: error: ld returned 1 exit status
The bold parts don't look correct. I do believe it should reflect the content of the LFS variable ($LFS), which holds /mnt/lfs in most cases.

I don't have any idea where this might have gone wrong.

Quote:
PS is gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 > 4.7.1 a very big issue?
I don't think it is.
 
Old 12-11-2012, 03:31 AM   #3
Lancelot1
Member
 
Registered: Dec 2007
Location: Amsterdam
Distribution: (K)Ubuntu
Posts: 102

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Which LFS version are you trying to build?
The version is 7.2

That looks OK, although some version are higher then mentioned.

Quote:
Originally Posted by druuna View Post
The bold parts don't look correct. I do believe it should reflect the content of the LFS variable ($LFS), which holds /mnt/lfs in most cases.
This is ok, I have made export LFS=/LFS

Quote:
Originally Posted by druuna View Post
I don't have any idea where this might have gone wrong.

I don't think it is.
 
Old 12-11-2012, 03:55 AM   #4
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
Can you post the ouput of the following (log in as user lfs):
Code:
$ cat ~/.bash_profile
$ cat ~/.bashrc
$ uname -m
$ echo $PATH
 
Old 12-11-2012, 04:02 AM   #5
Lancelot1
Member
 
Registered: Dec 2007
Location: Amsterdam
Distribution: (K)Ubuntu
Posts: 102

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Can you post the ouput of the following (log in as user lfs):
Code:
$ cat ~/.bash_profile
$ cat ~/.bashrc
$ uname -m
$ echo $PATH
lfs@kubuntu-P8610:~$ $ cat ~/.bash_profile
$: command not found
lfs@kubuntu-P8610:~$ $ cat ~/.bashrc
$: command not found
lfs@kubuntu-P8610:~$ $ uname -m
$: command not found
lfs@kubuntu-P8610:~$ $ echo $PATH
$: command not found

Now I know that I did ch4.4 yesterday when I came upon the issue, and I did it again today so I don't know why I get this outcome
 
Old 12-11-2012, 04:05 AM   #6
Lancelot1
Member
 
Registered: Dec 2007
Location: Amsterdam
Distribution: (K)Ubuntu
Posts: 102

Original Poster
Rep: Reputation: 15
oh yeah I do correct the scripts when they have LFS=/mnt/lfs to LFS=/LFS
 
Old 12-11-2012, 04:12 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 Lancelot1 View Post
lfs@kubuntu-P8610:~$ $ cat ~/.bash_profile
$: command not found
lfs@kubuntu-P8610:~$ $ cat ~/.bashrc
$: command not found
lfs@kubuntu-P8610:~$ $ uname -m
$: command not found
lfs@kubuntu-P8610:~$ $ echo $PATH
$: command not found

Now I know that I did ch4.4 yesterday when I came upon the issue, and I did it again today so I don't know why I get this outcome
The $ in my request signifies the prompt, don't type it......
 
Old 12-11-2012, 04:13 AM   #8
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 Lancelot1 View Post
oh yeah I do correct the scripts when they have LFS=/mnt/lfs to LFS=/LFS
It is your choice to use /LFS instead of /mnt/lfs, but why deviate from the book? It also makes toruble-shooting more problematic (for those that want to help that is)
 
Old 12-11-2012, 04:16 AM   #9
Lancelot1
Member
 
Registered: Dec 2007
Location: Amsterdam
Distribution: (K)Ubuntu
Posts: 102

Original Poster
Rep: Reputation: 15
ok lol its early here:

lfs@kubuntu-P8610:~$ cat ~/.bash_profile
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash

lfs@kubuntu-P8610:~$ cat ~/.bash_profile
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
lfs@kubuntu-P8610:~$ cat ~/.bashrc
set +h
umask 022
LFS=/LFS
LC_ALL=POSIX
LFS_TGT=$(uname -m)-lfs-linux-gnu
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL LFS_TGT PATH

lfs@kubuntu-P8610:~$ uname -m
i686

lfs@kubuntu-P8610:~$ echo $PATH
/tools/bin:/bin:/usr/bin
lfs@kubuntu-P8610:~$
 
Old 12-11-2012, 04:44 AM   #10
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
That looks OK.

Can you post the output of the following command:
Code:
$ $LFS_TGT-gcc -v dummy.c
 
Old 12-11-2012, 04:45 AM   #11
Lancelot1
Member
 
Registered: Dec 2007
Location: Amsterdam
Distribution: (K)Ubuntu
Posts: 102

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
That looks OK.

Can you post the output of the following command:
Code:
$ $LFS_TGT-gcc -v dummy.c
lfs@kubuntu-P8610:~$ $LFS_TGT-gcc -v dummy.c
Using built-in specs.
COLLECT_GCC=i686-lfs-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/LFS/tools/libexec/gcc/i686-lfs-linux-gnu/4.7.1/lto-wrapper
Target: i686-lfs-linux-gnu
Configured with: ../gcc-4.7.1/configure --target=i686-lfs-linux-gnu --prefix=/LFS/tools --with-sysroot=/LFS --with-newlib --without-headers --with-local-prefix=/LFS/tools --with-native-system-header-dir=/tools/include --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath --enable-languages=c --with-mpfr-include=/LFS/sources/gcc-build/../gcc-4.7.1/mpfr/src --with-mpfr-lib=/LFS/sources/gcc-build/mpfr/src/.libs
Thread model: single
gcc version 4.7.1 (GCC)
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=pentiumpro'
/LFS/tools/libexec/gcc/i686-lfs-linux-gnu/4.7.1/cc1 -quiet -v dummy.c -quiet -dumpbase dummy.c -mtune=generic -march=pentiumpro -auxbase dummy -version -o /tmp/ccQQ2V3N.s
GNU C (GCC) version 4.7.1 (i686-lfs-linux-gnu)
compiled by GNU C version 4.7.2, GMP version 5.0.5, MPFR version 3.1.1, MPC version 1.0
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/LFS/LFS/tools/include"
ignoring nonexistent directory "/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/include
/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/include-fixed
/LFS/tools/include
End of search list.
GNU C (GCC) version 4.7.1 (i686-lfs-linux-gnu)
compiled by GNU C version 4.7.2, GMP version 5.0.5, MPFR version 3.1.1, MPC version 1.0
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 23a9a2534477ca5e18ac97d603f37cb3
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=pentiumpro'
/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/bin/as -v --32 -o /tmp/ccYshmAz.o /tmp/ccQQ2V3N.s
GNU assembler version 2.22 (i686-lfs-linux-gnu) using BFD version (GNU Binutils) 2.22
COMPILER_PATH=/LFS/tools/libexec/gcc/i686-lfs-linux-gnu/4.7.1/:/LFS/tools/libexec/gcc/i686-lfs-linux-gnu/4.7.1/:/LFS/tools/libexec/gcc/i686-lfs-linux-gnu/:/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/:/LFS/tools/lib/gcc/i686-lfs-linux-gnu/:/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/bin/
LIBRARY_PATH=/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/:/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/lib/:/LFS/tools/lib/
COLLECT_GCC_OPTIONS='-v' '-mtune=generic' '-march=pentiumpro'
/LFS/tools/libexec/gcc/i686-lfs-linux-gnu/4.7.1/collect2 --sysroot=/LFS --eh-frame-hdr -m elf_i386 -dynamic-linker /tools/lib/ld-linux.so.2 /LFS/tools/lib/crt1.o /LFS/tools/lib/crti.o /LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/crtbegin.o -L/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1 -L/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/lib -L/LFS/tools/lib /tmp/ccYshmAz.o -lgcc -lc -lgcc /LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/crtend.o /LFS/tools/lib/crtn.o
/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/bin/ld: cannot find /LFS/tools/lib/libc.so.6 inside /LFS
/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/bin/ld: cannot find /LFS/tools/lib/libc_nonshared.a inside /LFS
/LFS/tools/lib/gcc/i686-lfs-linux-gnu/4.7.1/../../../../i686-lfs-linux-gnu/bin/ld: cannot find /LFS/tools/lib/ld-linux.so.2 inside /LFS
collect2: error: ld returned 1 exit status
lfs@kubuntu-P8610:~$
 
Old 12-11-2012, 04:59 AM   #12
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
This looks suspicious:
Quote:
Configured with: ../gcc-4.7.1/configure --target=i686-lfs-linux-gnu --prefix=/LFS/tools --with-sysroot=/LFS --with-newlib --without-headers --with-local-prefix=/LFS/tools --with-native-system-header-dir=/tools/include --disable-nls --disable-shared --disable-multilib --disable-decimal-float --disable-threads --disable-libmudflap --disable-libssp --disable-libgomp --disable-libquadmath --enable-languages=c --with-mpfr-include=/LFS/sources/gcc-build/../gcc-4.7.1/mpfr/src --with-mpfr-lib=/LFS/sources/gcc-build/mpfr/src/.libs
Shouldn't that be:
Code:
--prefix=/LFS/tools -> --prefix=/tools
--with-local-prefix=/LFS/tools -> --with-local-prefix=/tools
This snippet from chapter 5.5:
Code:
../gcc-4.7.1/configure         \
    --target=$LFS_TGT          \
    --prefix=/tools            \
    --with-sysroot=$LFS        \
    --with-newlib              \
    --without-headers          \
    --with-local-prefix=/tools \
.
.
You might have made a mistake adding/editing the /LFS parts.

I would suggest to start from scratch and don't deviate from the book (/LFS vs /mnt/lfs being one example), especially if this is your first attempt to successfully build LFS.
 
Old 12-11-2012, 05:31 AM   #13
Lancelot1
Member
 
Registered: Dec 2007
Location: Amsterdam
Distribution: (K)Ubuntu
Posts: 102

Original Poster
Rep: Reputation: 15
yeah i suspect it had to do with the GCC compilation.

Will rebuild and let you know if it fixes anything
 
Old 12-11-2012, 05:47 AM   #14
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 Lancelot1 View Post
yeah i suspect it had to do with the GCC compilation.

Will rebuild and let you know if it fixes anything
Just to make sure: Don't just rebuild GCC. You might have used the --prefix=/LFS/tools in other chapters as well.
 
Old 12-11-2012, 10:32 AM   #15
Lancelot1
Member
 
Registered: Dec 2007
Location: Amsterdam
Distribution: (K)Ubuntu
Posts: 102

Original Poster
Rep: Reputation: 15
ok rebuild everything now starting from ch4 and everything was ok

thanks for the help druuna
 
  


Reply

Tags
compile, gcc, glibc, 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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] LFS 6.8 - check error 2 when installing glibc for chapter 6.9 robofighter Linux From Scratch 4 07-30-2011 03:25 PM
/tools/bin/ld: cannot find -lstdc++ -- Error in " make check " of Glibc lfs_rocks Linux From Scratch 1 02-15-2008 09:23 AM
glibc " make check " error in CHAPTER 6 lfs_rocks Linux From Scratch 5 02-12-2008 04:32 PM
LFS 6, chapter 6.11; Glibc 'make check' error Zamochit Linux From Scratch 5 05-31-2005 12:54 PM
Chapter 6: Glibc make check problems davemar Linux From Scratch 0 04-08-2004 05:17 PM


All times are GMT -5. The time now is 02:04 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