LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-10-2004, 08:03 AM   #1
mullog
Member
 
Registered: May 2004
Posts: 61

Rep: Reputation: 15
How to measure the time to build a package?


Hi,

I have started to build my LFS system recently, but i have stopped in the step of measuring the time the binutils package takes to build in order to know my sbu.

The problem is that i follow the instructions in the book exactly. Here's exactly what i do:
-i have unpackaged binutils to the /mnt/lfs/tools directory, in which i have also created a binutils-build
-i have cd into binutils-build
-and then tried the following:
time {../binutils-2.14/configure --prefix=/tools --disable-nls && make configure-host && make LDFLAGS="-all-static" && make install && make -C ld clean && make -C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib }

-it returns the following error:
time: cannot run {../binutils-2.14/configure: No such file or directory
Command exited with non-zero status 127
0.00user 0.00system 0:00.01elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (26major+8minor)pagefaults 0swaps


What am i doing wrong?

 
Old 05-10-2004, 11:11 AM   #2
ParticleHunter
Member
 
Registered: Apr 2004
Location: Malaga, Spain
Distribution: LFS
Posts: 129

Rep: Reputation: 15
Hi,

not sure what version of the LFS book you're using, but the book doesn't say you have to unpack the binutils package into $LFS/tools but $LFS/sources, so after making the ../binutils-build directory, your exact location for the binutils build directory will be $LFS/sources/binutils-build, not $LFS/tools/binutils-build

So the exact steps (at least, I did run them this way) are:

lfs@linuxbox[~] cd $LFS/sources (from your newly invoked shell)
lfs@linuxbox[sources] tar -xvjf binutils-2.14.tar.bz2 (i downloaded the .tar.bz2 file)
lfs@linuxbox[sources] cd binutils-2.14
lfs@linuxbox[binutils-2.14] mkdir ../binutils-build
lfs@linuxbox[binutils-2.14] cd ../binutils-build

and from here you can continue with the rest of the commands
 
Old 05-10-2004, 12:24 PM   #3
mullog
Member
 
Registered: May 2004
Posts: 61

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by ParticleHunter
Hi,

not sure what version of the LFS book you're using, but the book doesn't say you have to unpack the binutils package into $LFS/tools but $LFS/sources, so after making the ../binutils-build directory, your exact location for the binutils build directory will be $LFS/sources/binutils-build, not $LFS/tools/binutils-build

So the exact steps (at least, I did run them this way) are:

lfs@linuxbox[~] cd $LFS/sources (from your newly invoked shell)
lfs@linuxbox[sources] tar -xvjf binutils-2.14.tar.bz2 (i downloaded the .tar.bz2 file)
lfs@linuxbox[sources] cd binutils-2.14
lfs@linuxbox[binutils-2.14] mkdir ../binutils-build
lfs@linuxbox[binutils-2.14] cd ../binutils-build

and from here you can continue with the rest of the commands


Does that really matter? I thought there was something wrong about my use of the time command since it said it didn't found ../binutils-2.14/configure. But if i unpack the packge and create the directory to $LFS/tools or any other, the fact remains that ../binutils-2.14/configure does exist. And actually works if i use it withou the time command. It just doesn't work when i use time { ../binutils-2.14/configure.....&&....&&...}.

Can anyone help?

 
Old 05-10-2004, 02:09 PM   #4
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
I've never timed the build myself, but I've just tried it myself and I can't get it to work either. Why not use a clock? And for what it's worth, I agree with ParticleHunter, you should be building in the sources directory. Good luck with Scratch. You'll learn a lot. I know I did.

Last edited by Andrew Benton; 05-10-2004 at 02:19 PM.
 
Old 05-10-2004, 04:41 PM   #5
mullog
Member
 
Registered: May 2004
Posts: 61

Original Poster
Rep: Reputation: 15
I don't think timing using a clock is the best way to learn.
There has to be a way to put this to work, but i'm beggining to believe the book is wrong(5.1). The book states "time { ./configure ... && ... && ... && make install; }", but that doesn't work.
 
Old 05-10-2004, 04:49 PM   #6
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 47
Maybe time wants an absolute path to the command.

Just a thought.

Last edited by itsjustme; 05-10-2004 at 04:54 PM.
 
Old 05-10-2004, 05:57 PM   #7
Andrew Benton
Senior Member
 
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
time make LDFLAGS="-all-static"
works, if that's any use to you.
 
Old 05-11-2004, 05:19 AM   #8
mullog
Member
 
Registered: May 2004
Posts: 61

Original Poster
Rep: Reputation: 15
Ok, i've tried with ; instead of && and it works(and without ; right before } or else it gives a token error), but it doesn't return the time in the end.

itsjustme, i've tried with absolute path and it's the same thing.
Andrew Benton, yes, individually works, but why doesn't this work?
 
Old 05-11-2004, 08:56 AM   #9
mullog
Member
 
Registered: May 2004
Posts: 61

Original Poster
Rep: Reputation: 15
Ok, i've solved it. It was a problem with the locales variables that time uses. I've tries with other distribution i have installed and it works.

Thanks anyway to everyone that replied.
 
Old 05-11-2004, 10:15 AM   #10
Axion
Member
 
Registered: Jan 2003
Location: Albany, NY
Distribution: Slackware 9.1, Gentoo 2004.1
Posts: 153

Rep: Reputation: 30
Re: How to measure the time to build a package?

Quote:
Originally posted by mullog

-and then tried the following:
time {../binutils-2.14/configure --prefix=/tools --disable-nls && make configure-host && make LDFLAGS="-all-static" && make install && make -C ld clean && make -C ld LDFLAGS="-all-static" LIB_PATH=/tools/lib }

What am i doing wrong?
There needs to be a space after the opening bracket { like there is before the closing bracket.
 
Old 05-11-2004, 11:23 AM   #11
mullog
Member
 
Registered: May 2004
Posts: 61

Original Poster
Rep: Reputation: 15
Re: Re: How to measure the time to build a package?

Quote:
Originally posted by Axion
There needs to be a space after the opening bracket { like there is before the closing bracket.
Yes, i know. Thanks anyway.

 
  


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
how can I measure how much real time is used to run an executable? markhod Linux - General 1 04-07-2005 04:41 AM
Build iso from package AwesomeMachine Linux - Software 1 01-28-2005 04:12 AM
Can I somehow accurately measure the time a operation takes? Like 'unzip -x foo.zip'? brynjarh Linux - Newbie 9 08-18-2004 09:26 PM
accurately measure time rasselin Programming 1 09-05-2003 05:18 PM
how to accurately measure processing time rasselin Programming 3 09-01-2003 11:45 AM

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

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