LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 10-18-2006, 05:01 AM   #1
tompickles
Member
 
Registered: Oct 2006
Location: UK
Distribution: Vista, Gentoo
Posts: 61

Rep: Reputation: 15
Linux From Scratch - Chapter 5 - Binutils


I'm having some trouble building a Linux from Scratch system using their own Live CD as a base OS.
I am using the Live CD version x84-6.2-2.

I have followed the book up to the beginning of Chapter 5 before getting stuck.

I have copied all the packages to my hard drive form the live CD using: cp -R /lfs-sources $LFS/sources

When trying to complie Binutils my problems arose. When entering: mkdir -v ../bintuils-build
I received a message sdaying that I can't do that because permission is denied. I then manually created $LFS/sources/binutils-build

When I entered ../lfs-sources/binutils-2.16.1/configure --prefix=/tools --disable-nls the promt returned that there was 'No such file or directory'

I am probably doing something really stupid but any help would be greatly appreciated.


Thanks,

Tom
 
Old 10-18-2006, 07:16 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

All the chapters concerning installation assume that you have already unzipped/packed the archive and cd-ed to that directory. I.e:

cd $LFS/sources - this is where all the archives can be found.
tar jxf <some.package>.tar.bz2 - unzip/unpack package.
cd <some.package> - cd to package directory

Again: The book assumes that you have done the above already.

For most of the chapters all is done from here, but for some (binutils being one of those) it is needed to create a building dir (the source directory they talk about is the directory you are in at the moment). You do that as follows:

mkdir ../<some.package>-build - create build directory for package.
cd ../<some.package>-build - goto build directory.

Hope this clears things up a bit.
 
Old 10-18-2006, 08:02 AM   #3
tompickles
Member
 
Registered: Oct 2006
Location: UK
Distribution: Vista, Gentoo
Posts: 61

Original Poster
Rep: Reputation: 15
Thanks, I'll try that and reply on how I get on.

Just one other point, if in the Live CD itself:

cd /lfs-sources
ls

there is a massive list of all the packages and patches.

Does:
less then pressing tab then y followed by enter, display all the files in the current workign directory?

Thanks again,

Tom

Last edited by tompickles; 10-18-2006 at 08:46 AM.
 
Old 10-18-2006, 09:08 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Quote:
Originally Posted by tompickles
Thanks, I'll try that and reply on how I get on.
You're welcome

Quote:
Just one other point, if in the Live CD itself:

cd /lfs-sources
ls

there is a massive list of all the packages and patches.

Does:
less then pressing tab then y followed by enter, display all the files in the current workign directory?
ls does that. less and more (see man less/more) shows output, one screenfull at the time.
I don't know what you're trying to do with the tab and y.....

Anyway, hope this helps.
 
Old 10-18-2006, 09:38 AM   #5
tompickles
Member
 
Registered: Oct 2006
Location: UK
Distribution: Vista, Gentoo
Posts: 61

Original Poster
Rep: Reputation: 15
haha, what I meant was.... with ls, if there is more than a screenfull of files, then you can only see the last screenfull. Is there anyway I can slowly scroll through the contents of a folder allowing me to view each file name?
 
Old 10-18-2006, 09:48 AM   #6
deroB
Member
 
Registered: Dec 2005
Location: Sydney, Australia
Distribution: Arch Linux
Posts: 208

Rep: Reputation: 30
pipe the output to less like this:
Code:
ls -l | less
then you can use the arrow keys to scroll up and down
 
Old 10-18-2006, 09:50 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,



ls -l | less or ls -l | more

You should take a look at the manpage that comes with less. It can do a lot more then show-one-page-at-the-time.
 
Old 10-18-2006, 09:51 AM   #8
tompickles
Member
 
Registered: Oct 2006
Location: UK
Distribution: Vista, Gentoo
Posts: 61

Original Poster
Rep: Reputation: 15
thanks to all.

update on progress, i am currently 'make bootstrap'ing GCC, no problems as yet, fingers crossed!

thanks,

Tom
 
Old 10-18-2006, 11:16 AM   #9
tompickles
Member
 
Registered: Oct 2006
Location: UK
Distribution: Vista, Gentoo
Posts: 61

Original Poster
Rep: Reputation: 15
hi all,

no troubles at all, until trying to unzip/unpack tcl8.4.13-src.tar.gz

i have been using the command:

tar jxf tcl8.4.13-src.tar.gz

however, this returns:

tar: Child returned status 2
tar: Error exit delayed from previous errors


again, as a newbie to the linux shell, that i'm probably doing sumthing stupid, probably in using tar jxf

help is much appreciated

thanks,

Tom

Last edited by tompickles; 10-18-2006 at 11:37 AM.
 
Old 10-18-2006, 11:44 AM   #10
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

You need to use the appropriate options for the tar command.

This (tcl8.4.13-src.tar.gz) is a gzipped tar archive and needs the z option as in tar zxf tcl8.4.13-src.tar.gz.
*.tar.bz2 is a bzip2-ed tar archive and needs the j option as in tar jxf binutils-2.16.1.tar.bz2.

Hope this helps.
 
Old 10-18-2006, 11:50 AM   #11
tompickles
Member
 
Registered: Oct 2006
Location: UK
Distribution: Vista, Gentoo
Posts: 61

Original Poster
Rep: Reputation: 15
thanks a lot!

that works fine. I knew i would have to change something in the jxf bit, but had no idea what to change or what to.

thanks again,

Tom
 
Old 10-18-2006, 04:54 PM   #12
Vitalie Ciubotaru
Member
 
Registered: Dec 2005
Location: Osaka, Japan
Distribution: Ubuntu Trinity
Posts: 153

Rep: Reputation: 30
I solved this even easier. Maybe may tar is a special one, but I just do
Code:
tar -xvf
and it unpacks any .gz or .bz2 file without any complaints.
 
Old 10-18-2006, 05:55 PM   #13
fatsheep
Member
 
Registered: Sep 2006
Posts: 79

Rep: Reputation: 15
Quote:
Originally Posted by Vitalie Ciubotaru
I solved this even easier. Maybe may tar is a special one, but I just do
Code:
tar -xvf
and it unpacks any .gz or .bz2 file without any complaints.
That's interesting. I've been using -xjf for .bz2 and -xzf for .gz (which are the correct options if you look in the man page for tar). But I guess tar can also automatically select the right option for the archive.

Last edited by fatsheep; 10-18-2006 at 05:58 PM.
 
Old 10-18-2006, 11:44 PM   #14
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Quote:
I solved this even easier. Maybe may tar is a special one, but I just do
tar -xvf
and it unpacks any .gz or .bz2 file without any complaints.
Where did you get that tar version? Because what you are saying is very hard to believe and definitely untrue for the tar version i've worked with. You need the extra option if it is not a plain tar file. Without the j or z option the bz2/gz file will not be unpacked and extracted.

Not using the correct options causes errors (or strange behaviour at the least):

$ tar -xvf xawtv-3.95.tar.gz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Archive contains obsolescent base-64 headers
tar: Read 2771 bytes from xawtv-3.95.tar.gz
tar: Error exit delayed from previous errors

Hope this clears things up a bit.
 
Old 10-19-2006, 07:40 AM   #15
tompickles
Member
 
Registered: Oct 2006
Location: UK
Distribution: Vista, Gentoo
Posts: 61

Original Poster
Rep: Reputation: 15
I have now got up to chapter 6 with no hiccups, until now.

I am trying to configure glibc using
../glibc-2.3.6 --prefix=/usr \
--disable-profile --enable-add-ons \
--enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc


This returns however:

...........
checking for gcc... gcc
checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
See 'config.log' for more details.


Any help is much appreciated

Tom
 
  


Reply



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
lfs chapter 6.11 Binutils-2.16.1 make problems Nislick Linux From Scratch 3 08-15-2006 05:25 PM
Installation of binutils....can't mkdir...../binutils-build hmonster Linux From Scratch 6 08-22-2004 04:07 AM
can't compile binutils (chapter 6) alaios Linux From Scratch 2 03-24-2004 04:00 PM
binutils chapter 5 pass 2 qod Linux From Scratch 3 11-03-2003 12:39 PM
ali aladdin v agp stinks :scratch: :scratch: :scratch: Mr Marmmalade Linux - Hardware 1 07-08-2003 05:11 AM

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

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