mingw-cross-env-list
[Top][All Lists]
Advanced

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

[Mingw-cross-env-list] Cross compiling for android


From: Lothar May
Subject: [Mingw-cross-env-list] Cross compiling for android
Date: Sat, 14 Apr 2012 12:37:37 +0200

Hi,

this may be slightly off topic, but still related to the project:

In the last few days I tried to cross compile several libs for android
in order to (eventually) build PokerTH for android devices. I did the
following (in an Ubuntu 12.04 i386 virtual machine):
1. Install OpenJDK
2. Install necessitas
http://sourceforge.net/p/necessitas/home/necessitas/ in order to have
Qt for android and the build environment.
3. Install g++, curl, cmake, ruby (requirements for the following scripts)
4. Get some build scripts from
https://github.com/mevansam/cmoss/tree/master/build-ios using
git clone -b master https://github.com/mevansam/cmoss.git
5. Change the "tar zxvf" statements to "tar jxvf" statements in
build-libgcrypt.sh and build-libgpg-error.sh
6. Remove build-yajl.sh from build-all.sh (seems broken). I removed
other packages because I didn't need them so others may also be
broken.
7. Set ANDROID_API_LEVEL="8" in build-all.sh (for android 2.2)
8. [Fix sourceforge download links in .sh scripts]
9. Run ./build-all.sh /your/installation/of/necessitas/android-ndk-r6b/

With some limitations (e.g. no boost::random, seemingly no
std::wstring), this works. However, there are still many things broken
or manual actions required. For example, if I open a project in the
necessitas Qt Creator and build it,first of all I get loads of errors.
The include paths provided in the .pro files for the project seem to
be ignored, and also /usr/include is included before the android
system includes. In the end I renamed /usr/include and put a symlink
from /usr/include to /your/build/of/cmoss/bin/include. Now a lot
things do actually compile (did not yet come to linking though)!

To come to the point:
I actually don't know where to commit the results of these efforts in
order to have a proper build system for android. I could provide them
to the upper script list to improve them, but they do not seem to be
well maintained. I could provide feedback to necessitas but I think
they are not very much interested in building other libs. But maybe
some other people here are interested in cross compiling for android
so the mxe build system could be used for this. But I actually don't
know where to start. I'd suggest to have an installation of necessitas
as requirement, but this could also be built partly as "make gcc" and
"make qt". Also, this is probably related to the discussion of the
architecture for the build system using mingw-w64, how do I properly
integrate this in mxe, without cloning everything?

For now, I'll probably stick to the upper scripts (see step 4) and
write some additional on my own. Still, if someone is also interested
in this or if there is any other feedback, I'd very much welcome it.

Regards,
Lothar



reply via email to

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