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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-10-2004, 08:03 AM
|
#1
|
Member
Registered: May 2004
Posts: 61
Rep:
|
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?

|
|
|
05-10-2004, 11:11 AM
|
#2
|
Member
Registered: Apr 2004
Location: Malaga, Spain
Distribution: LFS
Posts: 129
Rep:
|
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
|
|
|
05-10-2004, 12:24 PM
|
#3
|
Member
Registered: May 2004
Posts: 61
Original Poster
Rep:
|
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?

|
|
|
05-10-2004, 02:09 PM
|
#4
|
Senior Member
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073
Rep:
|
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.
|
|
|
05-10-2004, 04:41 PM
|
#5
|
Member
Registered: May 2004
Posts: 61
Original Poster
Rep:
|
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.
|
|
|
05-10-2004, 04:49 PM
|
#6
|
Senior Member
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571
Rep:
|
Maybe time wants an absolute path to the command.
Just a thought.
Last edited by itsjustme; 05-10-2004 at 04:54 PM.
|
|
|
05-10-2004, 05:57 PM
|
#7
|
Senior Member
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073
Rep:
|
time make LDFLAGS="-all-static"
works, if that's any use to you.
|
|
|
05-11-2004, 05:19 AM
|
#8
|
Member
Registered: May 2004
Posts: 61
Original Poster
Rep:
|
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?
|
|
|
05-11-2004, 08:56 AM
|
#9
|
Member
Registered: May 2004
Posts: 61
Original Poster
Rep:
|
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.
|
|
|
05-11-2004, 10:15 AM
|
#10
|
Member
Registered: Jan 2003
Location: Albany, NY
Distribution: Slackware 9.1, Gentoo 2004.1
Posts: 153
Rep:
|
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.
|
|
|
05-11-2004, 11:23 AM
|
#11
|
Member
Registered: May 2004
Posts: 61
Original Poster
Rep:
|
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.

|
|
|
All times are GMT -5. The time now is 02:50 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|