LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 12-11-2009, 11:50 PM   #1
eshi14
LQ Newbie
 
Registered: Oct 2009
Posts: 9

Rep: Reputation: 0
gcc installation error


Hi ,
I am in section 6.14 of Linux From Scratch - Version 6.4
While installing gcc i get following errors

root:/sources/gcc-build# ../gcc-4.3.2/configure --prefix=/usr \
> --libexecdir=/usr/lib --enable-shared \
> --enable-threads=posix --enable-__cxa_atexit \
> --enable-clocale=gnu --enable-languages=c,c++ \
> --disable-bootstrap
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /tools/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.
root:/sources/gcc-build#


thanx
 
Old 12-12-2009, 04:29 AM   #2
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,

Gcc cannot be found.

- Are you sure chapter 5 went ok (especially the gcc and the toolchain parts)?
- Is your current chroot environment (especially the path setting) correct?
- Is gcc present in either of these dirs: /bin /usr/bin /sbin /usr/sbin /tools/bin ?
- Did you have any problems with Re-adjusting the Toolchain in chap 6?

I cannot point to anything specific for now, too many things could have gone wrong in the previous steps you did.

Hope this helps.
 
Old 12-12-2009, 05:24 AM   #3
eshi14
LQ Newbie
 
Registered: Oct 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by druuna View Post
Hi,

Gcc cannot be found.

- Are you sure chapter 5 went ok (especially the gcc and the toolchain parts)?
- Is your current chroot environment (especially the path setting) correct?
- Is gcc present in either of these dirs: /bin /usr/bin /sbin /usr/sbin /tools/bin ?
- Did you have any problems with Re-adjusting the Toolchain in chap 6?

I cannot point to anything specific for now, too many things could have gone wrong in the previous steps you did.

Hope this helps.
A1: yes, ch 5 went well.

A2: All my environment variables are set.

A3: gcc is present in /usr/bin and /tools/bin

A4: I didn't have any problem in that section but now that I have re-read it I have a doubt in the first set of commands.

mv -v /tools/bin/{ld,ld-old}
mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld}
ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld


So the there is no file name ld-new,so actually how is it working ...

thanx for helpin...
 
Old 12-12-2009, 05:37 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,

Quote:
mv -v /tools/bin/{ld,ld-old}
mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld}
ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld


So the there is no file name ld-new,so actually how is it working ...
After you execute these commands, there will be no ld-new anymore (it is moved to ld by mv -v /tools/bin/{ld-new,ld}). The whole block switches the previously used ld (from your host) by the newly created ld (created in chapter 5).

The re-adjusting of the toolchain (and the checks that go with it) are crucial.
 
Old 12-12-2009, 06:55 AM   #5
eshi14
LQ Newbie
 
Registered: Oct 2009
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by druuna View Post
Hi,

After you execute these commands, there will be no ld-new anymore (it is moved to ld by mv -v /tools/bin/{ld-new,ld}). The whole block switches the previously used ld (from your host) by the newly created ld (created in chapter 5).

The re-adjusting of the toolchain (and the checks that go with it) are crucial.
thanx...

all went well but i am still getting the same error....what if i try to start again from section 6.....will their be any dependency problem...
 
Old 12-12-2009, 07:53 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
Hi,

I'm not sure if that will work, but you can give it a try. Do remember that certain things are already in place and this could mean you get some informational/warning messages.

If you made a backup after finishing chapter 5 (5.32, the caution part), you can erase everything, unpack the backup and start fresh with chapter 6. I know that works.
 
  


Reply

Tags
compilation, error, gcc



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
Error in installation of gcc salmanmanekia Linux - Newbie 1 07-24-2009 10:41 AM
Error in installation of gcc on SUSE 10. brave heart Linux - Software 10 06-26-2009 03:26 AM
GCC installation error SpecHackers Red Hat 3 04-10-2008 05:17 PM
gcc installation error fails sanity check pgb205 Linux - Software 1 11-09-2007 08:04 PM
GCC doesn't work Binutils configuration or installation error fadelhomsi Linux From Scratch 2 09-20-2007 08:00 AM

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

All times are GMT -5. The time now is 01:56 PM.

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