LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (http://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   gcc installation error (http://www.linuxquestions.org/questions/linux-from-scratch-13/gcc-installation-error-775094/)

eshi14 12-11-2009 11:50 PM

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

druuna 12-12-2009 04:29 AM

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.

eshi14 12-12-2009 05:24 AM

Quote:

Originally Posted by druuna (Post 3788650)
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...

druuna 12-12-2009 05:37 AM

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.

eshi14 12-12-2009 06:55 AM

Quote:

Originally Posted by druuna (Post 3788691)
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...

druuna 12-12-2009 07:53 AM

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.


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