Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
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.


  Search this Thread
Old 11-17-2004, 01:38 PM   #1
LQ Newbie
Registered: Aug 2004
Distribution: Crux 2.1
Posts: 23

Rep: Reputation: 15
LFS install trouble -- using Knoppix 3.6 as host

Greetings! I am trying to boot from a Knoppix 3.6 CD and install LFS 5.1.1. I am getting the following error when trying to compile gcc:

lfs@ttyp0[gcc-build]$ ../gcc-3.3.3/configure --prefix=/tools --with-local-prefix=/tools --disable-nls --enable-shared --enable-languages=c
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 compiler.
I am at a loss as to how to fix this. I'm thinking I need an earlier version of Knoppix that uses the 2.4 kernel, but I just wanted to ask here before I do that and find out it was a waste of time.
Old 11-17-2004, 02:50 PM   #2
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 469Reputation: 469Reputation: 469Reputation: 469Reputation: 469
Moved: This thread is more suitable in Linux From Scratch and has been moved accordingly to help your thread/question get the exposure it deserves.
Old 11-17-2004, 09:10 PM   #3
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
/tools/bin/ld: unrecognized option '--as-needed'
ld is telling you that it doesn't recognize the --as-needed flag. This is recently new addition to ld so the one your using may not support it. My slackware's ld doesn't support it (or atleast doesn't mention it in the man pages), but lfs's ld does. You may just have to update to a new version of binutils (in your /tools), or make sure you compiled yours with the proper flags. . It appears my ld does support it, but I am also following the unstable (6.1) version of LFS. Not sure if this will work, but if your still working from your host system you can try unsetting LDFLAGS as well (unset LDFLAGS).

Last edited by 95se; 11-17-2004 at 09:14 PM.
Old 11-18-2004, 07:09 AM   #4
Andrew Benton
Senior Member
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
That's right, the --as-needed function wasn't in binutils-2.1.4 which you're trying to build for dear old LFS-5.1. The solution is to build LFS-6


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
make configure-host for binutils-2.16.1 fails under 7.0-cross-lfs-20051019-x86_64 Basel Linux From Scratch 2 10-24-2005 11:07 PM
Host System's LFS installs with shotokan Linux From Scratch 8 04-16-2005 03:34 PM
LFS install trouble -- using debian sarge as host gremesh Linux From Scratch 1 11-23-2004 06:53 PM
Installing Lilo bootloader from knoppix CD for LFS nmares Linux - Software 3 10-07-2004 08:45 AM
LFS without a host system? (read on..I need more subject space than I have) JoeLinux Linux From Scratch 4 01-31-2002 04:30 PM

All times are GMT -5. The time now is 08:21 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration