LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Chapter 5 glibc configure: as and ld too old? (https://www.linuxquestions.org/questions/linux-from-scratch-13/chapter-5-glibc-configure-as-and-ld-too-old-774543/)

Linux_ftw 12-09-2009 02:39 PM

Chapter 5 glibc configure: as and ld too old?
 
Hello

So far I have followed the book (LFS-Version 6.5) exactly and have had no troubles until 5.7. It says to configure glibc:

../glibc-2.10.1/configure --prefix=/tools \
--host=$LFS_TGT --build=$(../glibc-2.10.1/scripts/config.guess) \
--disable-profile --enable-add-ons \
--enable-kernel=2.6.18 --with-headers=/tools/include \
libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes

When I type this in (well, copy-and-paste) to the terminal it gives me a couple of things:

configure: WARNING: using cross tools not prefixed with host triplet

some ways down:

checking for as... as
checking version of as... 2.20, bad
checking for ld... ld
checking version of ld... 2.20, bad

and at the end:

configure: error:
*** These critical programs are missing or too old: as ld

I have, so far, used the exact versions of each package specified in the book. The binutils version I downloaded for LFS was 2.19.1. As you can see, it's trying to use my host assembler and linker even though the second line in configure tells it to use the ones in $LFS/tools directory:

--host=$LFS_TGT --build=$(../glibc-2.10.1/scripts/config.guess)

Just to make sure the $LFS_TGT variable was set, I ran:

echo $LFS_TGT

And got:

i686-lfs-linux-gnu

I have a feeling that this is just some small thing I'm overlooking but I can't seem to figure it out.

Thanks in advance!

exvor 12-09-2009 07:53 PM

Do a echo $PATH and make sure that /tools/bin is before anything else. Looks like its trying to use something from the hosts binutils instead of the one you should have just compiled. Also make sure when installing binutils that you do not do the instructions for x86_64 if your not building for that platform shown below.
Code:


case $(uname -m) in
  x86_64) mkdir -v /tools/lib && ln -sv lib /tools/lib64 ;;
esac


Linux_ftw 12-10-2009 05:16 AM

Fixed
 
Thanks for the quick reply exvor, I finally figured it out.

I ran the 'echo $PATH' command and everything was okay, then I noticed the owner of the config.log file was root instead of lfs for some reason (when I ran configure before, it said 'permission denied', so I was running it as sudo). After changing the owner back to lfs and running configure without 'sudo' it finally configured correctly.

The permissions in Ubuntu are wierd. Maybe I should try to build this in a different distro...


All times are GMT -5. The time now is 05:23 AM.