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

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

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


From: William
Subject: Re: [Mingw-cross-env-list] Cross compiling for android
Date: Sun, 15 Apr 2012 12:28:08 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

Hello,

MXE includes :
- a Makefile
- a set of compile commands (libpng.mk file for example) and patches (libpng-1-fixes.patch file for example) for hundreds of packages, that are called by the main Makefile - each *.mk file provides information to download and cross-compile the package
- it is built on top of mingw.org and gcc
- it targets windows 32 bits

The name "MXE" stands for multi : it is supposed in the near futur to do the same kink of thing for other types of builds : mac os, static/dynamic, etc... But for the moment, it only builds on top of mingw.org , for windows.

I call this set of *.mk files the "mingw.org repository". I have just opened a similar project, called "cross-platform", based on MXE, that includes the mingw.org repository, but that also has a "mingw-w64 repository" (which allows you to build 32/64 bit programs). All this is integrated in a unique "MXE" framwork : it works the same way as mxe, it just has an additional parameter for specifying the repository : "mingw.org" or "mingw-w64". The mingw-w64 repository is much more experimental, and based on the mingw.org repository. https://github.com/william3/cross-platform. MXE may integrate such work in the futur.

I think it would be great if the "cross-platform" project could fit yours, but I am not sure if that it is possible. I don't understand or know the packages you are talking about. To fit in it, the question is "would it be possible to transform your scripts in a set of MXE *.mk files" ? That may be the case.

"I'd suggest to have an installation of necessitas as requirement, but this could also be built partly as "make gcc" and "make qt". > in addition to the "mingw.org repository" and the "mingw-w64 repository", there could be a "android repository", I guess. In the "mxe/mingw.org repository", gcc is the base of cross-compilation. It is built on top of mingw.org API. In the "mingw-w64 repository", gcc is base of cross-compilation, and it is built on top of mingw-w64 project API. What about yours?

"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?" > The big question... For the moment, I think the first step in the MXE integration would be to go through my "cross-platform" project. Here, you duplicate, or not, depending on your needs.

"For now, I'll probably stick to the upper scripts (see step 4) and write some additional on my own". Please come to the the cross-platform project and see if that suits your needs. your scripts could be adapted, maybe, without so much difficulty ? you would be the father of an android cross-platform system ;-)

The "cross-platform" project is an experimental branch. It is an extension of the MXE project. You could download the "cross-platform" thing, but you will need to refer to the mingw-cross-env project for further help and guidelines.

I hope I did not say too many stupidities !

Regards,
William

On 04/14/2012 12:37 PM, Lothar May wrote:
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]