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 04-24-2007, 01:15 AM   #1
zuesko
LQ Newbie
 
Registered: Apr 2007
Posts: 6

Rep: Reputation: 0
Question time command & 5.3.1. Installation of Binutils


As a Linux novice I thought Linux From Scratch would be a useful method of learning Linux.
However it does have some problems for someone like myself with limited knowledge.

With the aid of Joseph M. Dupré and his setenv.sh script:
I have reached this point and no further.
LFS book: (extract from LFS V6.2)
#####################################################
5.3.1. Installation of Binutils
It is important that Binutils be the first package compiled because both Glibc and GCC perform various tests on the available linker and assembler to determine which of their own features to enable.

The Binutils documentation recommends building Binutils outside of the source directory in a dedicated build directory:

mkdir -v ../binutils-build
cd ../binutils-build

**In order for the SBU values listed in the rest of the book to be of any use, measure the time it takes to build this package from the configuration, up to and including the first install. To achieve this easily, wrap the three commands in a time command like this: time { ./configure ... && make && make install; }. **

Now prepare Binutils for compilation:

../binutils-2.16.1/configure --prefix=/tools --disable-nls

Continue with compiling the package:

make
Compilation is now complete

Install the package:
make install

Next, prepare the linker for the “Adjusting” phase later on:
make -C ld clean
make -C ld LIB_PATH=/tools/lib
cp -v ld/ld-new /tools/bin
#####################################################

My problem is that I have no idea how to run the time command and compile the
binutils-2.16.1 together
time { ./configure ... && make && make install; }.
../binutils-2.16.1/configure --prefix=/tools --disable-nls

Thanking everyone in advance.
 
Old 04-24-2007, 02:15 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
Hi,

time { ../binutils-2.16.1/configure --prefix=/tools --disable-nls && make && make install }

The other commands (make -C ld clean / make -C ld LIB_PATH=/tools/lib / cp -v ld/ld-new /tools/bin) don't have to be included in the time { ... } part.

You do understand that you only have to do the time command just once or not at all if you are not concerned with the SBU's that are given. I personally have never done this: I want to install (B)LFS, I don't care how long it takes (although the first time on a pentium II it took a long time.... ).

Hope this helps.
 
1 members found this post helpful.
Old 04-24-2007, 05:26 AM   #3
zuesko
LQ Newbie
 
Registered: Apr 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Unhappy

Hi druuna,

Yes I was aware that you only had to run the time command once, but a hudge thanks because I never would have got the sintax right for the command, a bit above my pay rate I'm afraid.
No I was no aware that you did not have to run time command. I don't know what SBU's are, I was just following the book.

Yes, I realise the : make -C ld clean
make -C ld LIB_PATH=/tools/lib
cp -v ld/ld-new /tools/bin
was not part of the of the time command, but you can never have enough help, I should know!!
So I ran
root:/mnt/lfs/lfs-sources/binutils-build# time { ../binutils-2.16.1/configure --prefix=/tools --disable-nls && make && make install } and got
> _
The command was asking for more imput? Now what? Well after a lot of mucking around I got

root:/mnt/lfs/lfs-sources/binutils-build# time { ../binutils-2.16.1 ./configure --prefix=/tools --disable-nls && make && make install; } and got
real 0m0.003s
user 0m0.000s
sys 0m0.010s
As clear as mud, I realise I must have got it to run correctly or else I would have no output. However, what does the output mean?
 
Old 04-24-2007, 07:00 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
Hi,

It (the time command) tells you how long a command (or multiple commands) actually run. As you noticed there are 3 entries:

real: The elapsed time between invocation of command(s) and its termination.
user: The User CPU time.
sys: The System CPU time.

See man time for details.

BTW: Your output looks incorrect: The sys time is higher then the total (real) time. That's not possible.

SBU (the Standard Build Unit) is explained in LFS chapter 4.5.

Hope this helps.
 
Old 04-24-2007, 11:54 PM   #5
zuesko
LQ Newbie
 
Registered: Apr 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Hi druuna,

You got that right it did not run correctly and I have no idea where to go now!
 
Old 04-25-2007, 07:42 AM   #6
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Rep: Reputation: 30
Quote:
So I ran
root:/mnt/lfs/lfs-sources/binutils-build# time { ../binutils-2.16.1/configure --prefix=/tools --disable-nls && make && make install(missed out a semi-colon here) } and got
Quote:
Well after a lot of mucking around I got

root:/mnt/lfs/lfs-sources/binutils-build# time { ../binutils-2.16.1 ./configure --prefix=/tools --disable-nls && make && make install; }
This time you have the semi-colon but made a typo earlier on. It should read ../binutils-2.16.1/configure not ../binutils-2.16.1 ./configure

This time around you would have recieved three error messages in quick succession which is why the timings were near zero.

So.

time { ../binutils-2.16.1/configure --prefix=/tools --disable-nls && make && make install; }
 
Old 04-27-2007, 03:50 AM   #7
zuesko
LQ Newbie
 
Registered: Apr 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks Daws,

Now I get:

time { ../binutils-2.16.1/configure --prefix=/tools --disable-nls && make && make install; }

loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking whether In works... yes
checking whether In -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.

real 0m0.714s
user 0m0.430s
sys 0m0.280s

Any suggestions, greatly appreciated
 
Old 04-27-2007, 03:10 PM   #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
Hi,

This looks like a problem with the gcc compiler.
Did you check to see if your base system is up to specs?

You should check all that is mentioned, but it says this about gcc:

Quote:
Gcc-2.95.3 (Versions greater than 4.0.3 are not recommended as they have not been tested)
What are you using as base? The LFS live cd or one of the distro's?
 
Old 04-28-2007, 08:08 PM   #9
zuesko
LQ Newbie
 
Registered: Apr 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Hi druuna,


I am using the LFS live cd on a P3 777Mhz, 256MB Ram, 10GB HDD clean install.

Thanks again.
 
Old 04-29-2007, 04:37 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
Hi,

Your hardware can handle LFS, although building time will be a bit longer due to the 'outdated' (read: slower) hardware.

The LFS live cd holds the correct versions of all the (base) programs needed, so your base isn't the problem. You probably did something wrong (missed a step, used a wrong option, did not start with a clean tree etc etc) in one of the previous steps.

First logical thing I can come up with: Did you start with a clean binutils tree?

You've had some trouble with the time command and probably executed the configure, make and make install multiple times without 'cleaning the tree'. If your build tree is not clean, some unexpected things could happen.
Try removing the binutils-2.16.1 and binutils-build directory, unpack binutils-2.16.1.tar.bz2 again and start from there.

If that doesn't solve your problem then it's something else you did (or did not) do. It's kinda hard to tell you what this could be. Starting over is probably the best thing to do.

Hope this helps.
 
Old 04-30-2007, 09:43 PM   #11
zuesko
LQ Newbie
 
Registered: Apr 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Hi druuna,

I took your advice and started over.
I got the binutils package to compile, so I thought I woudl continue the book.

So the next step:

Next, prepare the linker for the “Adjusting” phase later on:

make -C ld clean

when I ran:

root:/mnt/lfs/lfs-sources/binutils-2.16.1# make -C clean

I got this:

make: Entering directory '/mnt/lfs/lfs-sources/binutils-2.16.1/ld'
make: *** No rule to make target 'clean'. Stop.
make: Leaving directory '/mnt/lfs/lfs-sources/binutils-2.16.1/ld'
root:/mnt/lfs/lfs-sources/binutils-2.16.1#

At this rate I'll be retired by the time I get LFS built.
 
Old 04-30-2007, 11:25 PM   #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
Hi,

You did not follow the book: You need to do this from a separate directory called binutils-build (this part at the beginning of this chapter: mkdir -v ../binutils-build and cd ../binutils-build).

If you also did the configure / make part in the binutils-2.16.1 directory: start over. Maybe you can re-do the make -C clean part from the binutils-build dir if the previous steps are done the way they should.

Do follow the book, it is essential to build a working LFS.
 
  


Reply

Tags
binutils, command, time


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
Issue compiling binutils for the 2nd time crookt Linux From Scratch 2 03-26-2006 12:30 PM
5.3.1 Installation of Binutils microsoft/linux Linux From Scratch 8 10-22-2005 12:41 PM
Problem with binutils first pass / bison & flex installation peristaltic Linux From Scratch 3 03-20-2005 10:17 AM
Installation of binutils....can't mkdir...../binutils-build hmonster Linux From Scratch 6 08-22-2004 04:07 AM
help! - installing binutils from the command line mandrakerookie Mandriva 8 12-22-2003 06:39 PM


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

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