LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 03-21-2007, 07:14 AM   #1
LDJ
Member
 
Registered: Nov 2004
Posts: 80

Rep: Reputation: 15
<n00b Q> 5.3.1 installation of binutils


I've followed the first few pages of LFS (using the LFS-Book-6.2 and the LFS live CD v 6.2-5) and hit a problem at the first step. The book states:

Quote:
Nowprepare Binutilsforcompilation:
../binutils-2.16.1/configure --prefix=/tools --disable-nls
but when I do that I get the following error:

Quote:
lfs:/mnt/lfs/binutils-build$ ../binutils-2.16.1/configure --prefix=/tools --disable-nls
bash: ../binutils-2.16.1/configure: No such file or directory
Obviously I'm running it from the wrong directory, but I thought all commands had to be run from the $LFS directory (i.e. /mnt/lfs)?

Im missing something obvious I know, but if anyone could point me in the right direction i'd be apprecaited.

Thanks
 
Old 03-21-2007, 11:26 AM   #2
na5m
Member
 
Registered: Jan 2005
Location: california
Distribution: O.A.M. (Overmonitoring Address Matrix) Release 2.2 with 2120 Patch
Posts: 37

Rep: Reputation: 17
you need to execute the command(s) from inside the directory
of the package you're installing (the one you just untarred). For example:
Code:
lfs:/mnt/lfs/sources$ tar xf binutils-2.16.1.tar.bz2
lfs:/mnt/lfs/sources$ cd binutils-2.16.1
lfs:/mnt/lfs/sources/binutils-2.16.1$ mkdir -v ../binutils-build
lfs:/mnt/lfs/sources/binutils-2.16.1$ cd ../binutils-build
lfs:/mnt/lfs/sources/binutils-build$ ../binutils-2.16.1/configure --prefix=/tools --disable-nls
$LFS is the directory that is going to be your
new Linux From Scratch root directory in Chapter 6, so
you should do your untarring of the packages in some
subdirectory of $LFS. You can name this
subdirectory whatever you like, but 'sources' is a good
choice. After you've untarred the package, cd into the
newly created subdirectory (i.e. /mnt/lfs/sources/binutils-2.16.1)
and follow the commands from the book.
 
Old 03-21-2007, 12:16 PM   #3
LDJ
Member
 
Registered: Nov 2004
Posts: 80

Original Poster
Rep: Reputation: 15
Ok, thanks. So using the LFS liveCD I assume I dont need to download any of the files and patches and can just copy them from the CDROM to the $LFS/Sources directory then?
 
Old 03-21-2007, 04:08 PM   #4
Zention
Member
 
Registered: Mar 2007
Posts: 119

Rep: Reputation: 16
LFS is a just a book really - following all the instructions to the letter will result in a system built from the book - though it does let itself down in not showing the cd to the source directory each time (I think there is a note about this at the start of the pertinent chapter).

If you are going down the LFS route then of course it is wise to know exactly what each command is doing and what it expects in relation to your environment.

The present working directory is basic but of course very important.

LFS defaults to the notion of having a directory structure of:

/sources/
/sources/<sourcepkg>.tgz
/sources/<sourcepkg>/
/sources/<sourcepkg>-build/

Now of course you can build inside the sourcepkg dir though it is often unadvisable.

The reasons is the problem of name clash, but really it is about keeping the build distinct from the source.

This way you could build a number of distinct packages from the same source and maintain different build directories.

Should the build directory really be below the sources directory, a build is not really a source but a stage prior to deployment, anyway the choice is yours.

With LFS they advise you delete the build directory and sourcepkg dir after deployment and of course this saves a few Meg. But, if you are building a package system host to deploy/install to other hosts then it may be advisable to keep them around in which case a more flexible directory structure could be envisioned.

Last edited by Zention; 03-21-2007 at 04:13 PM.
 
Old 03-21-2007, 04:19 PM   #5
LDJ
Member
 
Registered: Nov 2004
Posts: 80

Original Poster
Rep: Reputation: 15
It says in the book that if you download the LiveCD then you dont need to download anything else becuase all the packages and patches are on the CD. I've mounted the cdrom (mount /dev/cdrom /mnt/cdrom) and browsed the CD but cannot see these on here to copy to my sources dir. do i have to manually download them all then?
 
Old 03-21-2007, 04:47 PM   #6
Zention
Member
 
Registered: Mar 2007
Posts: 119

Rep: Reputation: 16
No idea - I just got everything from the source locations bar a couple of things that had got removed so those were taken from LFS servers.

well find is your friend, so go to the CD directory.

find ./ -name "*.patch"

if you get permission denied then up yourself to root.
 
Old 03-22-2007, 11:25 AM   #7
na5m
Member
 
Registered: Jan 2005
Location: california
Distribution: O.A.M. (Overmonitoring Address Matrix) Release 2.2 with 2120 Patch
Posts: 37

Rep: Reputation: 17
If you booted the livecd, then you don't need to mount the cd at all.
Peek into the /lfs-sources directory and you will find all of
the tarballs and patches that the book requires. Have fun!

Last edited by na5m; 03-22-2007 at 11:26 AM.
 
Old 03-22-2007, 11:29 AM   #8
BobTheSlackUser
Member
 
Registered: Feb 2007
Distribution: Slackware, Linux From Scratch
Posts: 47

Rep: Reputation: 1
And if you ever forget what na5m said, just type in "Greeting" at your bash prompt and you get a message telling you where the sources and book is.

Oh yeah, and yes, just copy all the sources to the hard disk (under sources, like the book says) and begin the installation.

Bob
 
Old 03-23-2007, 07:36 AM   #9
LDJ
Member
 
Registered: Nov 2004
Posts: 80

Original Poster
Rep: Reputation: 15
Whoops! my Bad!
I didnt even bother reading the 'greeting' message at the start.

/hangs his head in shame!

Thanks for the pointers guys
 
  


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
n00b Stuck on FC6 Installation shaggerz Linux - Hardware 2 02-26-2007 12:06 PM
gcc binutils installation for programming m68k ratnakarreddy Linux - Newbie 3 05-20-2006 08:23 AM
5.3.1 Installation of Binutils microsoft/linux Linux From Scratch 8 10-22-2005 01:41 PM
Problem with binutils first pass / bison & flex installation peristaltic Linux From Scratch 3 03-20-2005 11:17 AM
Installation of binutils....can't mkdir...../binutils-build hmonster Linux From Scratch 6 08-22-2004 05:07 AM


All times are GMT -5. The time now is 10:54 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration