Error in installing gcc

Jeremy Utley jeremy at jutley.org
Wed Sep 15 02:33:09 PDT 2004


On Wed, 15 Sep 2004 14:47:11 +0530
Avinesh Kumar <avinesh_kumar at persistent.co.in> wrote:

> hi,
>    I am building linux from scratch and following the guidelines given
>    
> in the LFS book 5.1.1.
> I successfully installed binutils as per instruction, but getting
> error 
> in installing gcc. I am using
> all the packages only from the tarball uploaded at
> linuxfromscratch.org 
> "lfs-packages-5.1.1.tar".
> The error message I got is  .......
> 
> [lfs at ps2019 gcc-build]$ ../gcc-3.3.3/configure --prefix=/tools 
> --with-local-prefix=/tools --disable-nls --enable-shared 
> --enable-language=c --with-ld=/tools/bin/ld
> Configuring for a i686-pc-linux-gnu host.
> Created "Makefile" in /mnt/lvm3/sources/gcc-build using "mt-frag"
> /tools/bin/ld: unrecognized option '--as-needed'
> /tools/bin/ld: use the --help option for usage information
> collect2: ld returned 1 exit status
> *** The command 'gcc -o conftest -g -O2   conftest.c' failed.
> *** You must set the environment variable CC to a working compiler.
> [lfs at ps2019 gcc-build]$
> 
> 
> please, help me out.

Please search the mailing list archives before posting to the lists. 
This has been discussed many times before.

Hint: FC2 is causing the problem.

-J-



More information about the lfs-support mailing list