cannot run test program while cross compiling.

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

Reply to
Loading thread data ...

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
 Click to see the full signature
Reply to
Tim Wescott

Your best shot is to look in (or 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 (or 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.

Reply to
DJ Delorie

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.


Reply to

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.