LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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-23-2013, 11:08 PM   #1
itprogrammer
LQ Newbie
 
Registered: Nov 2013
Posts: 6

Rep: Reputation: Disabled
Cannot build glibc in LFS


While configuring glibc with:

Quote:
../glibc-2.18/configure \
--prefix=/usr \
--disable-profile \
--enable-kernel=2.6.32 \
--libexecdir=/usr/lib/glibc
It checks for ld version and displays:

Quote:
checking for ld... ld
checking version of ld... v. ?.??, bad
.
.
.
configure: error:
*** These critical programs are missing or too old: ld
*** Check the INSTALL file for required versions.
When typing
Code:
root:/sources/glibc-build# ld --version
it says
Code:
command not found
. But taking new terminal and typing
Code:
name@hostname:~$ ld --version
it shows:

Quote:
GNU ld (GNU Binutils for Ubuntu) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
Why is this happening? How can i make the ld work in chroot environment?
 
Old 11-24-2013, 03:34 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
We need some more info in order to help you.

- Which host are you using to build LFS,
- Is you host fully compliant (post output of the version-check.sh script),
- Which LFS version are you trying to build,
- Which chapter is giving you problems,
- Did you encounter any problems in any of the previous chapters.
 
Old 11-24-2013, 09:10 PM   #3
itprogrammer
LQ Newbie
 
Registered: Nov 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
Which host are you using to build LFS?
ANS: Ubuntu 12.04 LTS

Is you host fully compliant (post output of the version-check.sh script)?
ANS:
Quote:
bash, version 4.2.24(1)-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
GNU Awk 3.1.8
/usr/bin/awk -> /usr/bin/gawk
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
g++ (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
g++ compilation OK
Which LFS version are you trying to build?
ANS: 7.4

Which chapter is giving you problems?
ANS: 6 --6.9

Did you encounter any problems in any of the previous chapters?
ANS: NOT AT ALL. ALL built properly.
 
Old 11-25-2013, 02:50 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
I do see one thing that makes building LFS problematic at best:
Quote:
Originally Posted by itprogrammer
Code:
bash, version 4.2.24(1)-release
/bin/sh -> /bin/dash
Binutils: (GNU Binutils for Ubuntu) 2.22
bison (GNU Bison) 2.5
Using dash will not work and the consequences of using it will be noticeable throughout the LFS build.

This also means that you have to start the build from scratch again.
 
Old 11-25-2013, 06:40 AM   #5
itprogrammer
LQ Newbie
 
Registered: Nov 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
What should be instead of that?

Where might have been caused that?
 
Old 11-25-2013, 06:57 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by itprogrammer View Post
What should be instead of that?
As stated in the LFS book:
Quote:
Bash-3.2 (/bin/sh should be a symbolic or hard link to bash)
Quote:
Originally Posted by itprogrammer
Where might have been caused that?
This is how Ubuntu sets it up. You need to change it from /bin/sh -> /bin/dash to /bin/sh -> /bin/bash (at least for the time when building LFS).
 
Old 11-25-2013, 08:09 AM   #7
itprogrammer
LQ Newbie
 
Registered: Nov 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
How to change that?
Is that already part of LFS book or Should i change it manually now at this chapter or Start again from first?
 
Old 11-25-2013, 08:15 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Quote:
Originally Posted by itprogrammer View Post
How to change that?
This is rather basic Linux knowledge. If your Linux knowledge is this basic you are in for a rough ride building LFS. LFS does assume a certain level of existing knowledge of Unix system administration in order to resolve problems and correctly execute the commands listed.

Anyway (as root):
Code:
rm /bin/sh
ln -s /bin/bash /bin/sh
Quote:
Originally Posted by itprogrammer
Is that already part of LFS book or Should i change it manually now at this chapter or Start again from first?
If you've been using dash during the LFS build then you need to restart from the beginning. Remove what you've done this far and start fresh.
 
Old 11-25-2013, 09:13 AM   #9
itprogrammer
LQ Newbie
 
Registered: Nov 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
thanks druuna
 
  


Reply



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
Cannot build glibc in LFS itprogrammer Linux - Newbie 3 11-24-2013 07:15 AM
LFS 7.3 Glibc-2.17 section 5.7 build error Larry114 Linux From Scratch 1 04-18-2013 09:23 AM
[SOLVED] LFS 6.7 glibc build error (ch 5.7) duineANaithnid Linux From Scratch 2 12-30-2010 08:27 PM
LFS 6.5 - Chap 5 - Why build GCC before Glibc kamleshk1 Linux From Scratch 2 06-01-2010 10:07 AM
problems configuring glibc-2.3.4-20040701 for LFS build dimaash Linux From Scratch 1 07-17-2005 09:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration