LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 05-02-2006, 03:28 PM   #1
hbinded
Member
 
Registered: May 2006
Distribution: Slackware & MyLFScratch
Posts: 37

Rep: Reputation: 15
Question Problems with the Toolchain


I have got to the part where I'm supposed to "Adjust the Toolchain" but when I try to enter these commands, I get no output at all, only a ">".

Code:
SPECFILE=`gcc --print-file specs` &&
sed 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' \
    $SPECFILE > tempspecfile &&
mv -f tempspecfile $SPECFILE &&
unset SPECFILE
I get this:
Code:
SPECFILE=`gcc --print-file specs` &&
>sed 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' \
>    $SPECFILE > tempspecfile &&
>mv -f tempspecfile $SPECFILE &&
>unset SPECFILE
>
I'm using the LFS live CD as a host system. So far I havent hit any problems, till now.

Btw, was I supposed to enter the code as a whole or one line after the other?

Thanks!
 
Old 05-03-2006, 12:37 AM   #2
Jaqui
Member
 
Registered: Jan 2006
Location: Vancouver BC
Distribution: LFS, SLak, Gentoo, Debian
Posts: 291

Rep: Reputation: 36
which version of the book are you using?
[ there shouldn't be any big difference in the adjusting the toolchain, but it always helps to include that since it makes a difference in most of the book.

You are editing the configuration file for gcc itself?
The way it's presented in the book is as a sed script.

Quote:
The next task is to amend the GCC specs file so that it points to the new dynamic linker. A simple sed script will accomplish this:

Code:
SPECFILE=`gcc --print-file specs` &&
sed 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' \
    $SPECFILE > tempspecfile &&
mv -f tempspecfile $SPECFILE &&
unset SPECFILE
It is recommended that the above command be copy-and-pasted in order to ensure accuracy. Alternatively, the specs file can be edited by hand. This is done by replacing every occurrence of /lib/ld-linux.so.2 with /tools/lib/ld-linux.so.2
 
Old 05-03-2006, 08:38 PM   #3
Vitalie Ciubotaru
Member
 
Registered: Dec 2005
Location: Osaka, Japan
Distribution: Ubuntu Trinity
Posts: 153

Rep: Reputation: 30
1. type
Code:
export SPECFILE=`gcc --print-file specs`
2. Separate the commands - don't use "&&", just press "Enter".
 
Old 05-04-2006, 08:35 AM   #4
hbinded
Member
 
Registered: May 2006
Distribution: Slackware & MyLFScratch
Posts: 37

Original Poster
Rep: Reputation: 15
Yeah, it worked. still compiling now as I write. btw, I have read some threads on using live distros as hosts, but none of them has been conclusive. Which distro is fully compatible with lfs "out of the box"? So far I've tried
*Fedora Core 5 - Some commands were reported as not existing e.g. mke2fs
*Knoppix 4.0 & 5.0 - incompatibility with gcc 3
*Ubuntu 5.10 - got this message below.
Code:
lfs@JUU00:/mnt/lfs/sources/binutils-2.15.94.0.2.2$ ../binutils-2.15.94.0.2.2/configure --prefix=/tools --disable-nls
loading cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
So, which Live distro is good at this? I want to be able to surf the net while compiling (next time of course!)

P.s. All the Distros I used were not in anyway remastered.
 
Old 05-04-2006, 12:36 PM   #5
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
pretty much any distro should work, really - including most of those you've tried... the mke2fs error you got in fedora just means you'd need to install mke2fs, or you copuld use another filesystem (i'm using reiserfs, BTW)... the error you got in ubuntu means you either don't have gcc installed or you need to create a cc link to gcc - it's probably that you're missing gcc, though...

either way, i can recommend slackware 10.2 as an LFS host as that's what i'm using and it's worked-out great so far...
 
Old 05-05-2006, 01:01 AM   #6
hbinded
Member
 
Registered: May 2006
Distribution: Slackware & MyLFScratch
Posts: 37

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by win32sux
either way, i can recommend slackware 10.2 as an LFS host as that's what i'm using and it's worked-out great so far...
I've tried Slackware 10.2, I'm currently compiling lfs on my laptop using the live cd and on my desktop using Slackware 10.2. Do you ever have complete freezes when using your PC with Slackware? I thought it was some sort of dma problem, enabled it, but still no avail. My PC just keeps freezing up, even when it's idle. Googled it and found it to be "KDE's QT Layer". How can I disable that? by using gnome??
 
Old 05-05-2006, 08:24 AM   #7
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally Posted by hbinded
I've tried Slackware 10.2, I'm currently compiling lfs on my laptop using the live cd and on my desktop using Slackware 10.2. Do you ever have complete freezes when using your PC with Slackware? I thought it was some sort of dma problem, enabled it, but still no avail. My PC just keeps freezing up, even when it's idle. Googled it and found it to be "KDE's QT Layer". How can I disable that? by using gnome??
no, i haven't experienced any freezes... BTW i don't use kde and stuff, i stick with XFCE...

if you're 100% sure your problem is caused by QT and there's no way to get around it, then yes, using a non-qt window manager or desktop environment and apps should do the trick...
 
Old 05-06-2006, 05:30 AM   #8
midiox
Member
 
Registered: Oct 2005
Location: Rezekne, Latvia
Distribution: LFS
Posts: 31

Rep: Reputation: 15
I recommend the LFS Live CD, because it was OK for me, I have finished my LFS build and the LFS LiveCD was good enough to be the host while building. It has Web browser to read LFS online/offline and the best - it has all the necessary sources on it so I do not need to download them. I was building on WMVare, no problemns with LFS LiveCD, do not know if it may have any problems on a real PC.
 
Old 05-14-2006, 04:21 PM   #9
linuxcbon
Member
 
Registered: May 2006
Posts: 56

Rep: Reputation: 16
I had the same problem

I have the same problem with gcc specs.

This seems to work :
SPECFILE=$(gcc --print-file specs) &&
sed 's@ /lib/ld-linux.so.2@ /tools/lib/ld-linux.so.2@g' $SPECFILE > tempspecfile &&
mv -f tempspecfile $SPECFILE &&
unset SPECFILE
 
Old 05-16-2006, 07:10 PM   #10
hrp2171
Member
 
Registered: Aug 2004
Location: California, USA
Distribution: Ubuntu
Posts: 243
Blog Entries: 3

Rep: Reputation: 30
I thought it was not supposed to give an output that something happened. Mine went OK and I'm getting close to GCC second pass. No problems so far.

LFS Live CD 6.1.1-4 as host on VMWare guest machine.

I like using VMWare for LFS because when I take a break, I just suspend the VM and it's right where I left off the next day.
 
Old 05-17-2006, 09:51 AM   #11
hbinded
Member
 
Registered: May 2006
Distribution: Slackware & MyLFScratch
Posts: 37

Original Poster
Rep: Reputation: 15
Hey there, I finished my LFS on Friday, now I'm moving on to BLFS. Will make this a long term project, because I dont have so much time anymore.
p.s. when building LFS, try the live-CD, because it meets all the required standards, and you won't have any problems with gcc.
pss. when in LFS-Live CD, try start X to bring up xfce, and you will get a desktop, with a web-browser (it's home page is set to the LFS-book on the cd ) If this doesn't work, edit your xorg.conf accordingly, I tell you, it's much easier.
 
  


Reply

Tags
lfs, tips, xconfig


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
Why toolchain and chroot?? thloh85 Linux From Scratch 13 04-11-2006 10:17 PM
Broken toolchain Camino Slackware 9 11-22-2005 10:38 AM
ARM Toolchain Problem richardji Linux - General 2 08-08-2005 11:24 PM
5.9. Adjusting the Toolchain - Error Spudds Linux From Scratch 6 02-23-2005 10:22 AM
6.12. Re-adjusting the Toolchain jobesd Linux From Scratch 2 01-16-2005 02:50 PM


All times are GMT -5. The time now is 02:43 AM.

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