LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-17-2008, 03:44 PM   #1
Vxplus
LQ Newbie
 
Registered: Nov 2008
Posts: 13

Rep: Reputation: 0
LFS 6.3- 6.9. Glibc-2.5.1 compilation error


As i said in a past thread i'm a newbie and i need help.

When I do the:

../glibc-2.5.1/configure --prefix=/usr \
--disable-profile --enable-add-ons \
--enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc

It keeps giving me this error:


configure: error: Need linker with .init_array/.fini_array support.

And also says:


configure: line 5510: /tools/bin/readelf: no such file or directory [/qoute]

But i checked and the directory is there.

Last edited by Vxplus; 11-17-2008 at 03:47 PM.
 
Old 11-17-2008, 04:01 PM   #2
irishbitte
Senior Member
 
Registered: Oct 2007
Location: Brighton, UK
Distribution: Ubuntu Hardy, Ubuntu Jaunty, Eeebuntu, Debian, SME-Server
Posts: 1,213
Blog Entries: 1

Rep: Reputation: 88
looks to me like a problem with

Quote:
../glibc-2.5.1/configure --prefix=/usr \
--disable-profile --enable-add-ons \
--enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc
the option I've highlighted in black. You are configuring glibc using glibc?
 
Old 11-17-2008, 04:59 PM   #3
Vxplus
LQ Newbie
 
Registered: Nov 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by irishbitte View Post
looks to me like a problem with



the option I've highlighted in black. You are configuring glibc using glibc?
Its what the manual said.
 
Old 11-19-2008, 11:17 AM   #4
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
The problem sounds like something to do with the binutils installation or perhaps your build environment. ld (the linker) and readelf are both in the binutils package. You should check permissions and ownerships in the /tools directory and it's contents, and also the verify your PATH in the build environment.
 
Old 11-20-2008, 05:09 AM   #5
Vxplus
LQ Newbie
 
Registered: Nov 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kevinalm View Post
The problem sounds like something to do with the binutils installation or perhaps your build environment. ld (the linker) and readelf are both in the binutils package. You should check permissions and ownerships in the /tools directory and it's contents, and also the verify your PATH in the build environment.
This might sound bad but i don't know how to check the permissions and in the last stage i installed the 2 times i really don't know what to do i checked the path to match /tools/bin:/bin:/usr/bin but it keeps giving me the same error and worst is that i created another VM to check step by step and the same happens i'm seriously near to a breakdown and the presentation date is near. sorry to sound like this but I'm seriously bad right now.
 
Old 11-20-2008, 10:59 AM   #6
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
Well, you can check the path at any time with:

echo $PATH


To check ownerships and permissions you can do ls with the long switch:

ls -l

(that's an el not a 1)

Since your building chrooted now do it after you chroot. And make certain you are following the books instructions on how to chroot exactly.

When I build lfs I like to place all the commands in a shell script so that I don't make mistakes.

Actually, I use two, one I name lfsmount that mounts all kernel file system's and the build partition and one I name lfschroot that executes the chroot into the build environment. So when I come back after shutting down all I have to do is login and:

./lfsmount
./lfschroot

and I'm good to go.

Last edited by kevinalm; 11-20-2008 at 11:05 AM.
 
Old 11-20-2008, 06:19 PM   #7
Vxplus
LQ Newbie
 
Registered: Nov 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kevinalm View Post
Well, you can check the path at any time with:

echo $PATH


To check ownerships and permissions you can do ls with the long switch:

ls -l

(that's an el not a 1)

Since your building chrooted now do it after you chroot. And make certain you are following the books instructions on how to chroot exactly.

When I build lfs I like to place all the commands in a shell script so that I don't make mistakes.

Actually, I use two, one I name lfsmount that mounts all kernel file system's and the build partition and one I name lfschroot that executes the chroot into the build environment. So when I come back after shutting down all I have to do is login and:

./lfsmount
./lfschroot

and I'm good to go.
I'm going to try it but plz stay near by I really need the help and thanks so much for helping me.
 
Old 11-20-2008, 11:53 PM   #8
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
Reveiwing the thread, and reading in the lfs 6.3 book to fix in my mind where you are in the build process, I had a thought. A simple mistake that might cause the errors you are getting is that you should be logged in as root when you do the chroot. Not as user lfs. Something for you to check.

It might help if you give some details of your project. For example:

How are you building? From a lfs livecd? In x or from text console? What sort of hardware? That sort of thing.
 
Old 11-21-2008, 05:39 AM   #9
Vxplus
LQ Newbie
 
Registered: Nov 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kevinalm View Post
Reveiwing the thread, and reading in the lfs 6.3 book to fix in my mind where you are in the build process, I had a thought. A simple mistake that might cause the errors you are getting is that you should be logged in as root when you do the chroot. Not as user lfs. Something for you to check.

It might help if you give some details of your project. For example:

How are you building? From a lfs livecd? In x or from text console? What sort of hardware? That sort of thing.
I'm using the 6.3 live cd on virtualbox thats what people recomended to me as i didn't have experience with linux before, by the way I'm always work as root when I'm installing in chapter 5 does that could be a problem.

edit

virtualbox is the virtual machine i'm using.

Last edited by Vxplus; 11-21-2008 at 05:11 PM. Reason: added info
 
Old 11-21-2008, 11:15 AM   #10
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
Quote:
Originally Posted by Vxplus View Post
I'm using the 6.3 live cd on virtual box thats what people recomended to me as i didn't have experience with linux before, by the way I'm always work as root when I'm installing in chapter 5 does that could be a problem.
I'm not certain what you mean by "virtual box". Do you mean a terminal in X (like a 'MS Dos Prompt' in windows)? I'm guessing that's what you mean. That's probably best for your level of experience, although I myself prefer to work without x windows running. (Like when you shutdown and restart in dos mode in Windows.)

The Live CD is a good environment but a couple of things to keep in mind. The book is written as if when you take a break from building, you never shut the computer off. When you shut down the computer, so you have to reboot the cd, a lot of the changes you made to the build environment "go away". Particulary, the $LFS variable and changes you made to the bash config files (.bashrc, /etc/profile, .bash_profile, those kinds of files) need to be redone. And those changes vary depending of the stage of the build.

Creating and using a user account lfs is a good idea, but the main reason for doing so is to prevent damaging your host system. In your case the host system is the lfs livecd. It's a cd, read only, it can't be destroyed so you don't have worry about that.

The important thing is that you are certain that $LFS and $PATH are correct whenever you sed, configure, make and install. You can always check an environment variable like LFS or PATH by:

echo $VARIABLENAME

so for example the LFS variable:

echo $LFS

should return:

/mnt/lfs

much of the time you can alternately enter:

env

That's a linux command that prints a lot of environment info to the screen, but it may not be available at certain stages of the build.

>> Edit

Have you read this hint? It may be of some help. Remember though that the hd partition designation (like sda1) need to be replaced with the ones appropriate to your system. It says that in the first couple of paragraphs, but you don't want to miss that.

http://www.linuxfromscratch.org/hint...and-resume.txt

Last edited by kevinalm; 11-21-2008 at 01:51 PM.
 
Old 11-22-2008, 07:41 AM   #11
Vxplus
LQ Newbie
 
Registered: Nov 2008
Posts: 13

Original Poster
Rep: Reputation: 0
I tryed to put all the environment variable like it said here
http://www.linuxfromscratch.org/hint...and-resume.txt but still the same thing i'm trying to do another one right now i hope that one works.

the old one kept saying.
configure: line 5510: /tools/bin/readelf: no such file or directory

then the:

configure: error: Need linker with .init_array/.fini_array support

somebody on my class already finished it but he did the same as me i cant understand this error.

Last edited by Vxplus; 11-22-2008 at 07:42 AM.
 
Old 11-22-2008, 10:07 AM   #12
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
Quote:
Originally Posted by Vxplus View Post
I tryed to put all the environment variable like it said here
http://www.linuxfromscratch.org/hint...and-resume.txt but still the same thing i'm trying to do another one right now i hope that one works.

the old one kept saying.
configure: line 5510: /tools/bin/readelf: no such file or directory

then the:

configure: error: Need linker with .init_array/.fini_array support

somebody on my class already finished it but he did the same as me i cant understand this error.
Well, either the build environment was wrong or something went wrong earlier in the build, probably with the installation of binutils, as both readelf and ld are part of that package.

I've built lfs several times (started back when 5.0 was current) and I still make some pretty silly mistakes. The most recent was forgetting to make install gcc on the final pass... after leaving the computer running all night to make check. rm'd the source tree and then realized I hadn't make installed. Explitive deleted. That was about a week ago, on my current build of 6.3.

If the current try fails with the same error, try to cd into the /tools/bin directory and do ls -l . Look for readelf and ld (and the rest of the binutils package, the contents are 6.11.2 in the book). Try to copy down the lines for readelf and ld and see if any of the other member of the package differ (file sizes are different of course). Also, do:

ldd /tools/bin/ld

and

ldd /tools/bin/readelf

and copy down what those two say.
 
Old 11-22-2008, 11:52 AM   #13
Vxplus
LQ Newbie
 
Registered: Nov 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Hey man Thx, it works!!! : D

God bless you,

Vxplus
 
Old 11-22-2008, 01:25 PM   #14
kevinalm
Member
 
Registered: Oct 2003
Location: Iowa
Distribution: LFS 5.0, building 6.3, win98se, multiboot
Posts: 288

Rep: Reputation: 30
Quote:
Originally Posted by Vxplus View Post
Hey man Thx, it works!!! : D

God bless you,

Vxplus
You're very welcome. Let us know how the project turns out.
 
Old 11-22-2008, 04:46 PM   #15
Vxplus
LQ Newbie
 
Registered: Nov 2008
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kevinalm View Post
You're very welcome. Let us know how the project turns out.
I will, lets hope everything goes smooth now on, and thx so much for all your help.


EdiT: I finally finished it thx so much again, now i just have to set the interface eth0 for internet :P.

Last edited by Vxplus; 11-25-2008 at 06:36 PM.
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
glibc-2.7 compilation error circul Linux From Scratch 2 01-26-2008 06:30 PM
glibc compilation error newcomer4 Linux - Newbie 1 02-03-2006 02:53 PM
glibc compilation error newcomer4 Linux From Scratch 1 02-03-2006 05:02 AM
Glibc compilation error Krappy Linux From Scratch 0 05-03-2005 12:24 AM
glibc-2.3.3-lfs-5.1 error Zamochit Linux From Scratch 8 01-13-2005 06:00 AM

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

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