LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-10-2006, 09:12 AM   #1
the2k
Member
 
Registered: Dec 2005
Location: Devon - UK
Distribution: Suse - Desktop, Arch - Laptop, Centos - Server and whatever I fancy on the other machine ;)
Posts: 59

Rep: Reputation: 15
chapter 5.7 concerns


hi there,

I have just started working on my lfs installation using the live cd and it seems to have been going well until i have got to section 5.7 where i am adjusting the toolchain when i issue the command

Code:
SPECFILE=`dirname $(gcc -print-libgcc-file-name)`/specs &&
gcc -dumpspecs > $SPECFILE &&
sed 's@^/lib/ld-linux.so.2@/tools&@g' $SPECFILE > tempspecfile &&
mv -vf tempspecfile $SPECFILE &&
unset SPECFILE
i'm getting the error?

bash: $SPECFILE: ambiguous redirect

now as i'm using lfs to try to improve my knowledge of linux i'm not sure that this is even an error, am just hoping someone has a bit more of an idea than me.

thanks very much
Mike
 
Old 09-10-2006, 10:32 AM   #2
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Rep: Reputation: 30
Yes that shouldn't happen. Looks like a typo.

Please don't be insulted if I remind you that those are 5 seperate commands. I know that konsole doesn't like it if I copy and paste the entire block. To make sure it is done correctly the best thing to do is copy and paste the commands one by one, ignoring all of the "&&"
 
Old 09-10-2006, 03:49 PM   #3
the2k
Member
 
Registered: Dec 2005
Location: Devon - UK
Distribution: Suse - Desktop, Arch - Laptop, Centos - Server and whatever I fancy on the other machine ;)
Posts: 59

Original Poster
Rep: Reputation: 15
when i enter each of the commands in individually i'm getting the error when i type in
Code:
gcc -dumpspecs > $SPECFILE
same error as before

bash: $SPECFILE: ambiguous redirect
 
Old 09-10-2006, 04:11 PM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi,

You probably used the wrong quoting in the first SPECFILE line.

SPECFILE=`dirname $(gcc -print-libgcc-file-name)`/specs

Those are backtics, not single quotes.

gcc -print-libgcc-file-name is a command that needs to be executed. Try echo $SPECFILE after the first command, it should print a directory structure ending with /specs. It should not print dirname $(gcc -print-libgcc-file-name)/specs

Hope this helps.
 
Old 09-10-2006, 04:19 PM   #5
the2k
Member
 
Registered: Dec 2005
Location: Devon - UK
Distribution: Suse - Desktop, Arch - Laptop, Centos - Server and whatever I fancy on the other machine ;)
Posts: 59

Original Poster
Rep: Reputation: 15
that did the trick,

thankyou very much.

if i were building this on a half decent machine i would be copying and pasting from within X however X runs so badly on it that i'm not, which is good because i have just learnt something
 
Old 09-10-2006, 04:21 PM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi,

Glad to be of service
 
Old 09-19-2006, 04:18 PM   #7
penguin_powered
LQ Newbie
 
Registered: Apr 2004
Location: Houston, Texas
Distribution: Linux Mint 13, MATE 32-bit edition
Posts: 24

Rep: Reputation: 15
To 2K,

I've been thinking about going thru LFS somewhere down the road, but I'm really curious, "How much are you learning by going thru LFS?" Like this problem you posted, do you understand what all those commands are doing and why you're executing them?

Maybe at the end you can post an evaluation of the project, the time it took, and how much you think you got out of it for the time invested.

I bet others would find it informative, too.

Thanks and best regards as you go thru LFS, and maybe BLFS afterwards,

John
 
Old 09-20-2006, 02:38 PM   #8
the2k
Member
 
Registered: Dec 2005
Location: Devon - UK
Distribution: Suse - Desktop, Arch - Laptop, Centos - Server and whatever I fancy on the other machine ;)
Posts: 59

Original Poster
Rep: Reputation: 15
the book is quite good at explaining what you are doing and why.

however, typo's (when alcohol has been consumed!) can be a problem so i've junked the last attempt and i'm actually cheating now by building it from within xfce and copying and pasting the commands.

i think i'm learning more now that i have got onto chapter 6 than I did when I was on chapter 5.

I hope that makes a bit of sense? i'll obviously know more as to whether it has been a worthwhile learning exercise when I finish it and start messing about with it.

Mike
 
Old 09-21-2006, 04:23 PM   #9
jkobrien
Member
 
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slackware, LFS, Ubuntu, RedHat, Slamd64
Posts: 507

Rep: Reputation: 30
If I can throw in my 2 cents in response to penguin_powered. I've waded through LFS and BLFS recently - not really done yet, but are you ever?

I've found it a very useful exercise. I know what patches are now and how to apply and troubleshoot them. I have a better grip on libraries, dependencies, system configuration, and partitioning strategies. It exposed me more to the choices that are available - e.g. I finally checked out XFce. I picked up lots of little bash tips (admittedly I was a tcsh user before, so that's not surprising). And, most useful of all, the configure/make/make install cycle no longer holds any terrors for me (this isn't the same thing as saying that it always works for me, or that I always know what to do when it doesn't )

If I add it all up, I probably spent at least a fortnight to get my system to the point where I regarded it as useable (networking, X11). I regard this as time well spent for the reasons above. It's not something to pursue if you need a functional linux system for the day after tomorrow, I know I hardly need to say that. But if you enjoy using linux and like getting an ever deeper understanding of it and especially if, like me, you don't have a formal IT background, (B)LFS is a great exercise.

John
 
Old 10-02-2006, 02:41 PM   #10
penguin_powered
LQ Newbie
 
Registered: Apr 2004
Location: Houston, Texas
Distribution: Linux Mint 13, MATE 32-bit edition
Posts: 24

Rep: Reputation: 15
Thanks guys for your responses! Your comments were very encouraging, John.

I plan on going thru LFS and BLFS as soon as I am able to build another machine to experiment on.

In the meantime, there's plenty to learn. John, you mentioned learning more about Bash; well, a recent Googling session landed me on a link almost 10 years old with some great Bash tricks I have not seen anywhere else. Here's the link:

bash String Manipulations Issue 18
http://linuxgazette.net/issue18/bash.html

John
 
  


Reply

Tags
lfs


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
Considering LFS, a few concerns Baix Linux From Scratch 4 07-27-2006 05:32 AM
Registry Concerns ille.pugil42 Programming 4 01-11-2006 09:52 PM
newbie with HW concerns vswr31 Linux - Hardware 3 05-26-2005 03:30 PM
apache concerns patski888 Linux - Networking 2 07-24-2003 07:41 PM
concerns davidpurple Linux - Newbie 9 10-12-2001 09:38 AM


All times are GMT -5. The time now is 03:07 AM.

Main Menu
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