LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   How to measure the time to build a package? (https://www.linuxquestions.org/questions/linux-from-scratch-13/how-to-measure-the-time-to-build-a-package-179908/)

mullog 05-10-2004 08:03 AM

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?

:newbie:

ParticleHunter 05-10-2004 11:11 AM

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

mullog 05-10-2004 12:24 PM

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

:confused: :confused:

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?

:newbie:

Andrew Benton 05-10-2004 02:09 PM

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.

mullog 05-10-2004 04:41 PM

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.

itsjustme 05-10-2004 04:49 PM

Maybe time wants an absolute path to the command.

Just a thought.

Andrew Benton 05-10-2004 05:57 PM

time make LDFLAGS="-all-static"
works, if that's any use to you.

mullog 05-11-2004 05:19 AM

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?

mullog 05-11-2004 08:56 AM

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.

Axion 05-11-2004 10:15 AM

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.

mullog 05-11-2004 11:23 AM

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.

:newbie:


All times are GMT -5. The time now is 12:41 PM.