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 06-14-2011, 07:43 PM   #1
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 71

Rep: Reputation: 0
Errors During 1st Build of GCC-4.5.2


Hi,
I've restarted attempt to build LFS and I'm experiencing the following errors during 1st build of GCC:
Code:
86-lfs-linux-gnu/sys-include   
checking for suffix of object files... configure: error: in `/mnt/lfs/sources/gcc-build/i686-lfs-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [all] Error 2
lfs:/mnt/lfs/sources/gcc-build$ config.log
If 'config.log' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf config.log
lfs:/mnt/lfs/sources/gcc-build$ make install
make[1]: Entering directory `/mnt/lfs/sources/gcc-build'
/bin/sh ../gcc-4.5.2/mkinstalldirs /tools /tools
make[2]: Entering directory `/mnt/lfs/sources/gcc-build/fixincludes'
rm -rf /tools/libexec/gcc/i686-lfs-linux-gnu/4.5.2/install-tools
/bin/sh ../../gcc-4.5.2/fixincludes/../mkinstalldirs /tools/libexec/gcc/i686-lfs-linux-gnu/4.5.2/install-tools 
mkdir -p -- /tools/libexec/gcc/i686-lfs-linux-gnu/4.5.2/install-tools
mkdir: cannot create directory `/tools/libexec/gcc/i686-lfs-linux-gnu': Permission denied
make[2]: *** [install] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/fixincludes'
make[1]: *** [install-fixincludes] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build'
make: *** [install] Error 2
I've verified that LFS is set and mounted and that md5sums are correct. Also, here are Binutils errors:
Code:
/usr/bin/install: cannot remove `/tools/share/info/bfd.info': Permission denied
make[4]: *** [install-info-am] Error 1
make[4]: Leaving directory `/mnt/lfs/sources/binutils-build/bfd/doc'
Making install in po
make[4]: Entering directory `/mnt/lfs/sources/binutils-build/bfd/po'
make[4]: Nothing to be done for `install'.
make[4]: Leaving directory `/mnt/lfs/sources/binutils-build/bfd/po'
make[4]: Entering directory `/mnt/lfs/sources/binutils-build/bfd'
make[5]: Entering directory `/mnt/lfs/sources/binutils-build/bfd'
make[5]: Nothing to be done for `install-exec-am'.
test -z "" || /bin/mkdir -p ""
test -z "" || /bin/mkdir -p ""
make[5]: Leaving directory `/mnt/lfs/sources/binutils-build/bfd'
make[4]: Leaving directory `/mnt/lfs/sources/binutils-build/bfd'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/mnt/lfs/sources/binutils-build/bfd'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/mnt/lfs/sources/binutils-build/bfd'
make[1]: *** [install-bfd] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/binutils-build'
make: *** [install] Error 2
Any and all help will be appreciated.
 
Old 06-14-2011, 08:28 PM   #2
AndrewJM
LQ Newbie
 
Registered: Jun 2011
Distribution: LFS svn BLFS svn
Posts: 16

Rep: Reputation: Disabled
In section 4.3 did you issue the chown -v lfs $LFS/tools command?
 
1 members found this post helpful.
Old 06-14-2011, 09:04 PM   #3
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 71

Original Poster
Rep: Reputation: 0
Hi,

Yes I issued the 'chown' commands as directed in para. 4.3. I went back and re-checked and "lfs" was retained as owner in both /tools and /sources.
Thanks for the assistance. Any other suggestions?
 
Old 06-15-2011, 03:10 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

I assume this is LFS 6.8 stable and you are doing chapter 5 gcc pass1. I also assume the binutils errors you posted are from binutils pass 2 (otherwise you should go back to binutils pass 1 and fix that one first, no point in continuing the build if some package fails).

1) Did you use a clean source gcc tree when compiling and building? Always remove the source directory and freshly untar the package before starting.

2) Did you unpack the GMP, MPFR and MPC packages inside the gcc source tree?

3) What does the config.log file tell you (/mnt/lfs/sources/gcc-build/i686-lfs-linux-gnu/libgcc/config.log).

Hope this gets you going again.
 
1 members found this post helpful.
Old 06-15-2011, 09:50 AM   #5
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 71

Original Poster
Rep: Reputation: 0
Hi,

I found that I had a "binutils-build" in "/mnt/lfs/". I don't know how I put it there. After each package installation I "cd ..","rm -rf" build directory, then "rm -rf" un-tarred directory. When I restarted I deleted the sdb6 partition and re-created it using Gparted but I didn't delete the packages and patches that were still intact in Downloads and /mnt/lfs/sources. I have, since, removed packages and patches and re-installed them. Hence, the config.log no longer exists. Thanks for your help. I know where to come if I need more help. I appreciate it.
 
Old 06-15-2011, 10:06 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
You're welcome
 
1 members found this post helpful.
Old 06-15-2011, 11:03 AM   #7
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 71

Original Poster
Rep: Reputation: 0
Hi,

Well I have some errors during 1st run of binutils-2.21. Here they are:lfs:/mnt/lfs/sources/binutils-build$ make install
make[1]: Entering directory `/mnt/lfs/sources/binutils-build'
/bin/sh ../binutils-2.21/mkinstalldirs /tools /tools
make[2]: Entering directory `/mnt/lfs/sources/binutils-build/bfd'
make install-recursive
make[3]: Entering directory `/mnt/lfs/sources/binutils-build/bfd'
Making install in doc
make[4]: Entering directory `/mnt/lfs/sources/binutils-build/bfd/doc'
test -z "/tools/share/info" || /bin/mkdir -p "/tools/share/info"
/usr/bin/install -c -m 644 ../../../binutils-2.21/bfd/doc/bfd.info '/tools/share/info'
/usr/bin/install: cannot remove `/tools/share/info/bfd.info': Permission denied
make[4]: *** [install-info-am] Error 1
make[4]: Leaving directory `/mnt/lfs/sources/binutils-build/bfd/doc'
Making install in po
make[4]: Entering directory `/mnt/lfs/sources/binutils-build/bfd/po'
make[4]: Nothing to be done for `install'.
make[4]: Leaving directory `/mnt/lfs/sources/binutils-build/bfd/po'
make[4]: Entering directory `/mnt/lfs/sources/binutils-build/bfd'
make[5]: Entering directory `/mnt/lfs/sources/binutils-build/bfd'
make[5]: Nothing to be done for `install-exec-am'.
test -z "" || /bin/mkdir -p ""
test -z "" || /bin/mkdir -p ""
make[5]: Leaving directory `/mnt/lfs/sources/binutils-build/bfd'
make[4]: Leaving directory `/mnt/lfs/sources/binutils-build/bfd'
make[3]: *** [install-recursive] Error 1
make[3]: Leaving directory `/mnt/lfs/sources/binutils-build/bfd'
make[2]: *** [install] Error 2
make[2]: Leaving directory `/mnt/lfs/sources/binutils-build/bfd'
make[1]: *** [install-bfd] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/binutils-build'
make: *** [install] Error 2

Do you have any suggestions as to what could be causing these errors? Thanks.
 
Old 06-15-2011, 11:20 AM   #8
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Quote:
Originally Posted by gdawg
/usr/bin/install -c -m 644 ../../../binutils-2.21/bfd/doc/bfd.info '/tools/share/info'
/usr/bin/install: cannot remove `/tools/share/info/bfd.info': Permission denied
make[4]: *** [install-info-am] Error 1
That points to an already existing /tools/share/info/bfd.info, owned by another user then the lfs user used in chapter 5.

Did you do these steps before starting (in this order)?

- as root chmod -v a+wt $LFS/sources
- as lfs user chown -v lfs $LFS/tools and chown -v lfs $LFS/sources

Another thing that comes to mind: You've been redoing this part, are you sure there are no leftovers from the previous tries? Might be a good idea to scratch everything and start completely fresh.

Hope this helps.
 
Old 06-15-2011, 01:45 PM   #9
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 71

Original Poster
Rep: Reputation: 0
Hi,

I deleted sdb6 partition and then re-created it using GParted. This may be a dumb question but when I become "root", should I use "su -" or "su"? Also, exactly how should I use the "wget" command, using the "wget-list" that is referenced in para. 3.1 of manual version 6.8? I've tried several times to incorporate the "wget-list" in the command and have not been successful. Thanks for your assistance.
 
Old 06-15-2011, 01:59 PM   #10
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by gdawg View Post
when I become "root", should I use "su -" or "su"?
You have to use su -

su does not set the full root environment, su - does.

Quote:
Also, exactly how should I use the "wget" command, using the "wget-list" that is referenced in para. 3.1 of manual version 6.8? I've tried several times to incorporate the "wget-list" in the command and have not been successful. Thanks for your assistance.
First download and safe the wget-list file (this one).

Then execute the given command:
Code:
wget -i /path/to/downloaded/wget-list -P $LFS/sources
Assuming that LFS is set to /mnt/lfs, all the packages will now be downloaded and put into /mnt/lfs/sources.

Hope this clears things up a bit.
 
1 members found this post helpful.
Old 06-16-2011, 07:33 AM   #11
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 71

Original Poster
Rep: Reputation: 0
Hi,

Thank you for the information. I usually use "su -" but the other day, for some reason, I couldn't copy a file from Downloads to /mnt/lfs/sources with that command until I used "su". I have deleted and recreated partition sdb6 and changed host to PCLinuxOS. I am more familiar with it than I am with openSUSE which was a recent installation. I'll see how it goes. Thanks again.
 
Old 06-16-2011, 09:29 AM   #12
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by gdawg View Post
Thank you for the information.
Quote:
.... and changed host to PCLinuxOS.
Just in case: Do make sure it complies with the LFS Host System Requirements
 
Old 06-16-2011, 07:30 PM   #13
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 71

Original Poster
Rep: Reputation: 0
Hi,

Thanks for the reminder about the "Host System Script". It checked "compilation OK". I'm now at para.6.71, Linux Kernel and I'm getting errors when I run "make mrproper". Here is the output:
Quote:
root:/sources# cd linux-2.6.39.1
root:/sources/linux-2.6.39.1# make mrproper
/bin/sh: find: command not found
/bin/sh: line 5: xargs: command not found
make: *** [clean] Error 127
Also, when I checked "echo $LFS" and "df -h | grep $lfs" they weren't set or mounted. I reset and remounted them and re-ran "make mrproper" but there was no change. I have downloaded and installed the latest linux kernel header but that didn't change results of command "make mrproper". I first ran it on "linux-2.6.37' and got same result. I do appreciate all help.
 
Old 06-17-2011, 02:10 AM   #14
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

It looks like some commands cannot be found or are not present on your system.

- Are find and xargs installed? If not: something went very wrong in the earlier chapters.

- You still seem to have problems with LFS not being set and the partition not being mounted, could you have re-created your previous problem (parts installed on a mounted $LFS and parts that are installed when LFS wasn't mounted)? You might want to check this reply

Hope this helps.
 
1 members found this post helpful.
Old 06-17-2011, 09:21 AM   #15
gdawg
Member
 
Registered: Jul 2010
Location: USA, New Mexico
Distribution: Several
Posts: 71

Original Poster
Rep: Reputation: 0
Hi,

I cd'd into "/bin" and the only entry for "/sh" is a link to bash:
Quote:
lrwxrwxrwx 1 root root 4 Nov 10 2010 sh -> bash*
Upon opening the link there was a bunch of goggledygook that was unintelligible to me. Today, "echo $LFS" showed that LFS was set but "df -h | grep $LFS" showed nothing. I re-mounted LFS and verified that "/etc/fstab" setting was ok. I guess I'll delete the partition and start over. I've certainly had practice doing that. Thanks for your kind help and patience.
 
  


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
[SOLVED] Error While Trying Build of Binutils (1st Attempt) gdawg Linux From Scratch 23 06-12-2011 09:42 AM
remove the gcc-build, binutils-build, etc after make @d4M Linux From Scratch 6 01-26-2009 04:29 AM
Build kernel with GCC, errors? newtovanilla Linux - Newbie 19 05-05-2008 03:17 PM
GCC errors in ndiswrapper build karloslambchop Linux - Wireless Networking 3 05-26-2006 02:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 02:14 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
Open Source Consulting | Domain Registration