Hi Domen,
Domen Vrankar wrote:
I'm using this tutorila: http://x.cygwin.com/docs/cg/prog-build-cross.html
for building a cygwin cross compiler for linux.
I built binutils sucessfully but when trying to build gcc I get:
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
This happens even though I use --host=i686-pc-linux.
Has annyone an idea why this is happening?
I'm using Debian etch, server with two 32 bit pentium processors
I would strongly recommend the use of crosstool for this. See
http://www.kegel.com/crosstool/ for details.
Here is some advice from
http://www.kegel.com/crosstool/crosstool-0.42/doc/crosstool-howto.html:
Crosstool, and probably gcc and glibc's configure scripts, assume that
directory names do not contain any spaces. This is often violated on
Windows. Please take care to not use directory names with spaces in them
when running crosstool. It might work, but if it doesn't, you've been
warned. (Same goes for Mac OS X.)
crosstool creates some really deeply nested directories while building, so
filenames are quite long. This has two consequences:
First, on some versions of Windows, filenames (including directory) can't be
longer than 240 chars. To avoid exceeding this limit, don't run crosstool in
a directory with a long name.
Second, the maximum length of commandlines is extremely short. Since
crosstool uses commandlines that include multiple filenames, they can exceed
the limit very quickly. You can avoid this problem by using the "mount"
command's options. e.g. mount /bin and /usr/bin with -X or "-o cygexec" (see
the cygwin faq, and/or mount the crosstool directory with "-o managed" (see
the cygwin doc for "mount").
It's easy to run afoul of either of these two.
HTH,
Vin Shelton
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/