LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 01-15-2007, 05:43 PM   #1
ChrisScott
Member
 
Registered: Nov 2006
Location: St Albans, England
Distribution: Fedora c3/5, Suse pro 10/openSuse 10.2, RHES, Zenwalk.....
Posts: 97

Rep: Reputation: 15
Adjusting toolchain problem (in temport system)


Hi all,

This is the first time I have attemped LFS. I am following the LFS project page guide.

I have installed glibc into $LFS/tools (whilst making tempory system) and so far everything seems fine. The first problem comes with the command:
Code:
mv /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
as i386-pc-linux-gnu does not exist. I looked in /tools and found i686-pc-linux-gnu so used that instead, ie
Code:
mv /tools/1686-pc-linux-gnu/bin/{ld,ld-old}
this didn't return any errors so I assume it worked although maybe this problem is a symptom of an earlier mistake?

There was also an ambiguous redirect error for
Code:
gcc -dumpspecs > $SPECFILE
I got around this by using a file SPECFILE not a variable - again this did not return any errors so I assumed it worked! (you know what they say about assumptions!!!)

The final error - the one I can't get around - is when I use
Code:
find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \: &&
rm
which returns
Code:
find: invalid predicate '-print-libgcc-file-name)/include/*'
I am using a HP omnibook notebook with P3 processor.
I have tried from scratch four times now with the same errors.

Any help would be appreciated.

Cheers
 
Old 01-16-2007, 01:15 AM   #2
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Rep: Reputation: 30
Quote:
I have installed glibc into $LFS/tools (whilst making tempory system) and so far everything seems fine. The first problem comes with the command:

Code:
mv /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
This usually means that you $PATH is wrong, and you are using the hosts gcc. Try "which gcc" if the reply is not /tools/bin/gcc then you have a problem.

The rest of your issues usually arise from typos, mistaking 's for `s etc. But for now you really want to get the first problem sorted. If PATH is wrong then you probably want to double check everything you did when setting up the lfs user, and if this does turn out to be the problem then you probably want to start over (thankfully you are not too far in).

Hope you get it sorted.
 
Old 01-16-2007, 05:13 AM   #3
ChrisScott
Member
 
Registered: Nov 2006
Location: St Albans, England
Distribution: Fedora c3/5, Suse pro 10/openSuse 10.2, RHES, Zenwalk.....
Posts: 97

Original Poster
Rep: Reputation: 15
Cheers Daws

Yeah, your right: I'm using /usr/bin/gcc!
How can I change that? As I said I've started again a number of times so I'm sure I've been following the guide correctly. I was using --prefix=/tools and --with-local-prefix=/tools when I configured gcc, is that right?

Thanks!
 
Old 01-16-2007, 06:57 AM   #4
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Rep: Reputation: 30
Yup that sounds right but that is not where PATH is set. After you have downloaded the packages you have to create an "lfs" user, and you should remember something like this (as lfs):

Code:
cat > ~/.bash_profile << "EOF"
exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash
EOF
and this:

Code:
cat > ~/.bashrc << "EOF"
set +h
umask 022
LFS=/mnt/lfs
LC_ALL=POSIX
PATH=/tools/bin:/bin:/usr/bin
export LFS LC_ALL PATH
EOF
This part is very important. This ensures you have a clean environment in which to build, it also means every time you login as "lfs" your PATH should, in theory, be set to /tools/bin:/bin:/usr/bin.

My guess is that something went wrong here. Maybe you didn't create the lfs user properly or maybe something weird is going on the host system. When you are logged in you can always check it with "echo $PATH" though.

Anyway good luck with it. It took me more than 5 retries before I got it to work so don't worry about that. If you have any more problems people around here are always willing to help.
 
Old 01-16-2007, 05:07 PM   #5
ChrisScott
Member
 
Registered: Nov 2006
Location: St Albans, England
Distribution: Fedora c3/5, Suse pro 10/openSuse 10.2, RHES, Zenwalk.....
Posts: 97

Original Poster
Rep: Reputation: 15
Yeah I did that as you said so that's probably not the problem! I've been using the LFS live cd as the host so I'll give it a go with SUSE or Fedora (Any personal preferences?). Thanks for all the help.
 
Old 01-16-2007, 05:12 PM   #6
Daws
Member
 
Registered: May 2006
Location: UK
Distribution: Debian, Linux From Scratch
Posts: 416
Blog Entries: 1

Rep: Reputation: 30
I quite like Debian actually, but it shouldn't make much difference distro to distro.
 
Old 01-21-2007, 09:26 AM   #7
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 800

Rep: Reputation: 100Reputation: 100
Gentoo

Gentoo works pretty well too. I'm currently doing LFS through ssh to another comp on my network using the Gentoo live cd.
 
  


Reply


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
5.7. Adjusting the Toolchain - sanity issue... yanger Linux From Scratch 2 11-12-2008 04:52 AM
adjusting the toolchain bourbonstreet Linux From Scratch 5 11-05-2006 11:43 AM
Held on 5.9. Adjusting the Toolchain satimis Linux From Scratch 2 06-30-2005 06:36 AM
5.9. Adjusting the Toolchain - Error Spudds Linux From Scratch 6 02-23-2005 09:22 AM
6.12. Re-adjusting the Toolchain jobesd Linux From Scratch 2 01-16-2005 01:50 PM


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