cannot run test program while cross compiling.

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi All,

While doing the cross compilation of pkg_config for directFB for MIPS
target from i86 platform, i am getting the following error.
"checking for extra flags to get ANSI library prototypes... configure:
error: cannot run test program while cross compiling."
Can any body help in this regard?

Thanks in advance.
Regards.
One


Re: cannot run test program while cross compiling.

Quoted text here. Click to load it
I assume you're building an embedded system with a MIPS processor and
Linux?

I was just at the Embedded Systems Conference in Boston, where I
went to a talk where Bill Gatliff said that some programs really don't
like to be cross-compiled, so you really want to be able to build stuff
(like pkg_config) on your target, or at least on something like it but
with more resources.

Never having actually done this, I've just told you everything I know on
this particular subject.  If you need anything more, you need to hold out
for a real expert, or use this reply to do some improved web searches.

--
Tim Wescott
Control systems and communications consulting
We've slightly trimmed the long signature. Click to see the full one.
Re: cannot run test program while cross compiling.

Quoted text here. Click to load it

Your best shot is to look in configure.ac (or configure.in) and see if
there's a "cache variable" for that test.  If so, you can set that
variable in your environment, to the expected answer for your target,
before running configure, and it should bypass the actual test.

If there's no cache variable, you'll need to modify configure.ac (or
configure.in) to set the variable manually (or add a cache variable
and contribute the patch ;), and rebuild configure.

If all else fails, complain to the package maintainers that their
package doesn't support cross compiling.

Re: cannot run test program while cross compiling.
Quoted text here. Click to load it

Without knowing what tool chain, and who (or how) it was built, and
the command used to invoke it, one can only guess at the problem.

The compiler is trying to figure out what flavor of MIPS it is running
on.  When it finds that the MIPS flavor is "x86", it gets upset.

My guess is that the tool chain was built wrong, or your compilation
environment is wrong, or the invocation is wrong.

G.


Site Timeline