[Top][All Lists]

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

Re: How To Configure for Android?

From: Eric Blake
Subject: Re: How To Configure for Android?
Date: Mon, 07 Oct 2013 13:05:12 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130923 Thunderbird/17.0.9

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

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]