LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Linux From Scratch - Chapter 5 - Binutils (https://www.linuxquestions.org/questions/linux-from-scratch-13/linux-from-scratch-chapter-5-binutils-493436/)

tompickles 10-18-2006 05:01 AM

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

druuna 10-18-2006 07:16 AM

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.

tompickles 10-18-2006 08:02 AM

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

druuna 10-18-2006 09:08 AM

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.

tompickles 10-18-2006 09:38 AM

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?

deroB 10-18-2006 09:48 AM

pipe the output to less like this:
Code:

ls -l | less
then you can use the arrow keys to scroll up and down :)

druuna 10-18-2006 09:50 AM

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.

tompickles 10-18-2006 09:51 AM

thanks to all.

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

thanks,

Tom

tompickles 10-18-2006 11:16 AM

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

druuna 10-18-2006 11:44 AM

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.

tompickles 10-18-2006 11:50 AM

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

Vitalie Ciubotaru 10-18-2006 04:54 PM

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.

fatsheep 10-18-2006 05:55 PM

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.

druuna 10-18-2006 11:44 PM

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.

tompickles 10-19-2006 07:40 AM

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


All times are GMT -5. The time now is 08:36 AM.