Re: How To Configure for Android?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/07/2013 12:56 PM, Jeffrey Walton wrote:
> 
> $ ./configure --host=arm --build=arm --with-sysroot=$ANDROID_SYSROOT

> configure:3644: error: cannot run C compiled programs.
> If you meant to cross compile, use `--host'.
> See `config.log' for more details
> 
> I'm not sure why I'm trying to trick the build system with host=arm
> since the host is x86_64.

You're lying.  You're telling configure that your compiler is on an
arm-based host, when it is really on an x86_64-based host.  Because your
--host and --build match, configure then assumes that you are not
cross-compiling.  To cross-compile, --host and --build MUST be
different.  Don't lie to configure.  Try

 ./configure --host=x86_64 --build=arm

or even better, use full target triples, as in:

 ./configure --host=x86_64-unknown-linux-gnu --build=...

(I don't know the target triple for an android system, unfortunately).

> And it feels like I am not specifying the
> target properly, but `configure --help` does not list any target
> configuration options.

config.guess will show you a reasonable guest for host (there's a bug
request that we shouldn't require explicit --host any more, now that
we've had years of config.guess doing it right - but that's a story for
another thread and a future autoconf release; it would still be years
before you could ever assume all packages have been retooled to avoid
needing an explicit --host); and reading config.sub will show you all
the known triples that GNU software has tried to target.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux