error while configuring gcc-3.3.3 (pass1)
hi,
i am having trouble running configure while building gcc-3.3.3 (pass1). The command i have used is ../gcc-3.3.3/configure --prefix=/tools \ --with-local-prefix=/tools \ --disable-nls --enable-shared \ --enable-languages=c the error response i am getting is : Configuring for a i686-pc-linux-gnu host. Created "Makefile" in /mnt/lfs/untar/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. my system is a p4, running fedora 2 as the host OS. gcc as well as ld are being recognised at the command prompt. if anyone can figure out whats going wrong it wd be gr8. thanks in advance. alex |
Im sure you used copy & paste to use the command given in the book and accidentally copied & pasted something, which was just a suggestion to put your own stuff in here
the error message tells you: /tools/bin/ld: unrecognized option '--as-needed' this is - of course - not a valid option to configure and therefore it has to fail on that one check the command you issued ! |
Shouldn't you be building in /mnt/lfs/sources? Does the user lfs have read, write or execute permissions in /mnt/lfs/untar?
|
Hello,
i got exactly the same problem and I solved it by downloading the newest version of binutils (2.15). With this version is shipped a new ld program which supports the "--as-needed" switch. Seemed to work for me. good luck with your lfs, Doktor Prokt |
Re: error while configuring gcc-3.3.3 (pass1)
I found while using Knoppix to build my LFS 5.11 that I had to set the CC environment variable to point to the gcc-2.95 instead gcc-3.3 that /usr/bin/gcc was linked to. As soon as I did this the error went away.
Quote:
|
All times are GMT -5. The time now is 03:25 PM. |