SOLVED: x86_64 binutils "cannot run C compiled programs"

Ken Moffat ken at
Sun Oct 23 04:59:32 PDT 2005

On Sat, 22 Oct 2005, Ryan Twitchell wrote:

> I'm posting this for the sake of anyone else who experiences the same
> problem and might benefit from some advice:
> When running "make configure-host" for Binutils, in LFS Version
> 7.0-cross-lfs-20051019-x86_64:
> ...
> checking for i686-pc-linux-gnu-gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... configure: error: cannot run C
> compiled programs.
> If you meant to cross compile, use `--host'.
> See `config.log' for more details.
> make: *** [configure-libiberty] Error 1
> ...
> In my case this was caused by all my library files being installed into
> /lib64, not /lib and then changing the "specs" file to look in /lib
> after being done with the libraries in the /tools directory. Using the
> x86_64 book, the "pure64" concept is to install all libraries into /lib
> (which is best). Somehow all of mine were installed in /lib64 up to
> this point regardless.

   I think you might be confusing two different versions of the book - 
pure64 is x86_64-64 (should all work, except for grub), x86_64 is a 
conventional multilib build (32-bit in /lib, 64-bit in /lib64) which 
people tell me works, but on which there are still rough edges (see e.g. 
lfs-dev this week about perl).

   The different versions of the Cross-LFS book share a lot of the text, 
so it is *possible* that some of the instructions have been corrupted by 
editing other parts of the book.  However, the specs patch is different 
for pure64, and the perl code to amend the specs file in section 10.5 
differs.  If you think any of the book is wrong, lfs-dev is probably the 
correct place to discus it (and you should at least skim the postings on 
lfs-dev, perhaps by using the archives, if you are building *any* 
development version of LFS).

   das eine Mal als Tragödie, das andere Mal als Farce

More information about the lfs-support mailing list