[lfs-support] SOLVED: lfs 7.4 section 5.9.1. Installation of Binutils error: Cannot run C compiled programs
hartikka at gmail.com
Wed Nov 13 20:05:12 PST 2013
I now think the copy-paste theory was wrong.
I should not have expected CC to be set after running the configure command
I was unfamiliar with the idea of passing environment vars to a single
program on the command line.
I have used shells for a long time and not learned that till now.
So, that's why I'm here!
Thanks to all.
My section 7.4 binutils section 5.9 has failed again after another full
repeat of chapter 5 done with care.
This time I noticed the warning in 5.7 glibc-2.18 said that autoconf was
missing (along with the expected msgfmt).
Will I need autoconf for 7.4 binutils section 5.9?
On Wed, Nov 13, 2013 at 12:19 PM, Pierre Labastie
<pierre.labastie at neuf.fr>wrote:
> Le 13/11/2013 04:27, Ron Hartikka a écrit :
> > This looks like virgo's problem at...
> > I was pasting from the 7.4 online book into a terminal window.
> > I got to this point (5.9.1):
> > *CC=$LFS_TGT-gcc \
> > AR=$LFS_TGT-ar \
> > RANLIB=$LFS_TGT-ranlib \
> > ../binutils-2.23.2/configure \
> > --prefix=/tools \
> > --disable-nls \
> > --with-lib-path=/tools/lib \
> > --with-sysroot*
> > I selected all of that at once, middle-mouse-pasted it into my terminal,
> and hit return.
> > I had entered many multilined commands this way and all seemed to work.
> > But this time, like Virgo, I got this error:
> > *Cannot run C compiled programs*
> > I repeated all of chapter 5 up to there with the same result.
> > I studied the situation and found that echo $CC produced a blank line.
> > So CC was not set. Nor, as I recall, were AR and RANLIB.
> Neither CC, nor AR or RANLIB should be set. So echo $CC *should* produce
> a blank line.The way the command above is done allows to set those
> variables temporarily during the executionof configure. A more relevant
> test could be "echo $LFS_TGT-gcc", or "$LFS_TGT-gcc --version".
> Typing one line at a time without the backslashes does not work the way
> it is intended to, because the variables CC, etc are not passed to
> configure! Unless you exported those variables to the environment, you
> have built binutils pass 2 with the host compiler, not the one you built
> during gcc pass1.
> Normally, if you have carefully followed the steps in chapter 4, you may
> log in and out and back to the lfs user, and always get the same
> If you get garbbled pasting from the html book (I doubt it, because in
> this case, it would have shown up during the preceding steps), you may
> try akh suggestions. But I suspect some environment problem (LFS_TGT or
> othervariablesnot set or not exported). So please check it.
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
hartikka at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lfs-support