LFS 5.1 on Fedora Core 2 GCC Configure Errors

Richard A Downing FBCS richard at 109bean.org.uk
Thu May 27 22:06:33 PDT 2004

Ryan Julian wrote:
> I'm doing an LFS with Fedora Core 2 as my host.
> I am just into chapter 5 and am trying to configure GCC for compilation. 
> The command it type is this:
> ../gcc-3.3.3/configure --prefix=/tools --with-local-prefix=/tools 
> --disable-nls --enable-shared --enable-languages=c
> This is the ouput after executing:
> Configuring for a i686-pc-linux-gnu host.
> Created "Makefile" in /mnt/lfs/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 compile 
>                                              r.
> Does anybody have any idea what is causing this problem?
> Thanks in advance,
> Ryan Julian

Fedora Core 2 is causing the problem, because it is Linux-2.6.x based 
and LFS 5 is Linux-2.4.x based.  You'll need an older distro, or you 
could try building LFS-unstable.

The big problem with LFS-unstable on x86 platforms is that some 
applications require patching to compile with gcc-3.4.x.  And, of 
course, it is UNSTABLE!  Caveat Aedificator (Builder Beware).

Richard A Downing FBCS CITP

More information about the lfs-support mailing list