SOLVED: x86_64 binutils "cannot run C compiled programs"

Ryan Twitchell tryan2stor at
Sat Oct 22 19:40:48 PDT 2005

I'm not sure if there's a better place to post for cross-compiling
issues, since there isn't a mailing list for it. If this is the wrong
place I apologize in advance.

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
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 spent a little over two hours chasing down errors in the config.log
file that were completely unrelated to this error. I guess you have to
be familiar with the fact that config prints messages to this log
labeled as errors that are not critical enough errors to stop the
program. Before realizing I was on the wrong path I learned all about
the usefulness of gmp on BSD machines ;p


Yahoo! FareChase: Search multiple travel sites in one click.

More information about the lfs-support mailing list