[lfs-support] SOLVED: lfs 7.4 section 5.9.1. Installation of Binutils error: Cannot run C compiled programs

Ron Hartikka hartikka at gmail.com
Sun Nov 17 19:57:14 PST 2013


Thanks Bruce Dubbs and all the group...

I have just repeated again and failed at 7.4 binutils section 5.9 (result
below).

Then, I just gave your reply a more careful read and...

*Wait! What is this "su - lfs"? Minus???*

I probably did type the '-' and get a login shell  - but only in section
4.3.

After that, whenever I rebooted or just logged out I'm sure I did not.

I guess I need a login shell every time?

Does this explain my result below?

Is it a clue that configure says...

checking target system type... x86_64-unknown-linux-gnu

...even though LFS_TGT is set to x86_64-lfs-linux-gnu?

_________________________________________


lfs at ron-Studio-1737:/mnt/lfs/sources$ echo $LFS_TGT
*x86_64-lfs-linux-gnu*

lfs at ron-Studio-1737:/mnt/lfs/sources/binutils-build$
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
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type...* x86_64-unknown-linux-gnu*
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for gcc... x86_64-lfs-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: in
`/mnt/lfs/sources/binutils-build':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details




On Thu, Nov 14, 2013 at 12:17 AM, Bruce Dubbs <bruce.dubbs at gmail.com> wrote:

> Ron Hartikka wrote:
> > I now think the copy-paste theory was wrong.
> > I should not have expected CC to be set after running the configure
> command
> > in 5.9.1.
> > 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?
>
> No.  That is not needed.
>
> After you change to user lfs in the command: su - lfs, what it the
> result from:
>
> $ set
>
> Also, did you delete both the binutils directory and the binutils-build
> directory before reextracting and running the commands in Section 5.9 as
> described in Section 5.3?
>
>    -- Bruce
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
>



-- 
Ron Hartikka
hartikka at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfromscratch.org/pipermail/lfs-support/attachments/20131117/60720e60/attachment.html>


More information about the lfs-support mailing list