LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Problems with the Toolchain (https://www.linuxquestions.org/questions/linux-from-scratch-13/problems-with-the-toolchain-440972/)

hbinded 05-02-2006 02:28 PM

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!

Jaqui 05-02-2006 11:37 PM

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”

Vitalie Ciubotaru 05-03-2006 07:38 PM

1. type
Code:

export SPECFILE=`gcc --print-file specs`
2. Separate the commands - don't use "&&", just press "Enter".

hbinded 05-04-2006 07:35 AM

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.

win32sux 05-04-2006 11:36 AM

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... :)

hbinded 05-05-2006 12:01 AM

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??

win32sux 05-05-2006 07:24 AM

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...

midiox 05-06-2006 04:30 AM

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.

linuxcbon 05-14-2006 03:21 PM

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

hrp2171 05-16-2006 06:10 PM

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.

hbinded 05-17-2006 08:51 AM

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.


All times are GMT -5. The time now is 07:59 PM.