help-guix
[Top][All Lists]
Advanced

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

Re: Android.mk build system limitations


From: Denis 'GNUtoo' Carikli
Subject: Re: Android.mk build system limitations
Date: Mon, 11 Jul 2022 09:22:48 +0200

On Sat, 9 Jul 2022 21:17:27 +0200
Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> wrote:
> Apparently the issue doesn't seems to be in Guix but in
> android-make-stub: android-make-stub seems to be made for only one
> target at a time.
With all my modifications for my tests, I forgot that by default it
compiled all the HOST targets it founds.

So if I use the defaults, and make all the include $(BUILD_*) become
include $(BUILD_HOST_*), it would try to build all local modules.

It builds them in the order in which they are declared inside the
Android.mk.

The android-make-stub current design prevents it from being able to
parse dependencies correctly:
- It will not build the local modules dependencies before the local
  module(s) that use them unless they are in that order in the
  Android.mk.
- It can link the local module(s) executable(s) against the local
  modules libraries but if the local modules libraries also need to be
  linked to other libraries, it won't try to link the local module
  executable(s) to these other libraries, and the build will fail.

The advantage of the current design is that the android-make-stub code
is relatively simple to understand and contribute to.

android-make-stub also had an issue with includes but that was a bug
and not a limitation of the current design.

So I've sent a patch serie to android-make-stub[1] to address theses
issues, however it won't be able to fix the design limitations.

So once that serie is merged, and android-make-stub is updated in Guix,
we'd still need to workaround the design limitations in guix by:
- Passing some extra libraries to LDFLAGS
- When multiple LOCAL_MODULE are in the Android.mk, and that the build
  order doesn't match the declaration order, we'd need to run make with
  LOCAL_MODULE=<module> for each module to build. The guix.scm I
  mentioned earlier has some example of how to do that.

I'll send patches or open bug reports to update android-make-stub when
that merge is done. And I'll then use the workarounds mentioned above
in my guix.scm to workaround the limitations of android-make-stub.

References:
-----------
[1]https://github.com/daym/android-make-stub/pull/1

Denis.

Attachment: pgphH_Vy2iHCD.pgp
Description: OpenPGP digital signature


reply via email to

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