From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gFnkN97Py2JieQEAbAwnHQ (envelope-from ) for ; Mon, 11 Jul 2022 09:23:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id SPjSN97Py2IzGQEAauVa8A (envelope-from ) for ; Mon, 11 Jul 2022 09:23:10 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A21C33855D for ; Mon, 11 Jul 2022 09:23:10 +0200 (CEST) Received: from localhost ([::1]:53246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oAnl7-0008Ih-8V for larch@yhetil.org; Mon, 11 Jul 2022 03:23:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAnku-0008IY-I2 for help-guix@gnu.org; Mon, 11 Jul 2022 03:22:56 -0400 Received: from cyberdimension.org ([2001:910:1314:ffff::1]:45444 helo=gnutoo.cyberdimension.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1oAnks-00089t-Gm for help-guix@gnu.org; Mon, 11 Jul 2022 03:22:56 -0400 Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1]) by cyberdimension.org (OpenSMTPD) with ESMTP id 232cc40a; Mon, 11 Jul 2022 07:22:03 +0000 (UTC) Received: from primarylaptop.localdomain (localhost [::1]) by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 2dfadb9d; Mon, 11 Jul 2022 07:22:03 +0000 (UTC) Date: Mon, 11 Jul 2022 09:22:48 +0200 From: Denis 'GNUtoo' Carikli To: help-guix@gnu.org, Julien Lepiller Subject: Re: Android.mk build system limitations Message-ID: <20220711092248.3bf46a2d@primarylaptop.localdomain> In-Reply-To: <20220709211727.3e823f9a@primarylaptop.localdomain> References: <20220706172027.22fdd325@primarylaptop.localdomain> <20220709145710.71fc045c@primarylaptop.localdomain> <20220709211727.3e823f9a@primarylaptop.localdomain> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; i686-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/CBmkclhbOLK6H7tVA.GmDaB"; protocol="application/pgp-signature"; micalg=pgp-sha256 Received-SPF: pass client-ip=2001:910:1314:ffff::1; envelope-from=GNUtoo@cyberdimension.org; helo=gnutoo.cyberdimension.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1657524190; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=lKytx1DS+WWOjro5MZpHhP9Mq/qBHszq6h4jBFLXd3M=; b=o1d3W7No+ApxJGqDoo6HEjLgqpl3eF1wzW5mB7GPTawbafksxJUIv3rtEfHVaCudP9O/qS 3gq8GQ4wL7v9CPWrWNe/J+KgOp0Td1D4LVoDrsUalICBe3afM6culb82TpZjcEFERbppss 9myW+N24ymerZfVHIy6ZWyzTrLsRKVlOyJhbU1K03016kZ0pLJbtIQIHd6XwYfEVgDwvE/ L5w+qlTtcuH5nyMpL+U8pWGVSA70paS6VvWkEwBCLke5hRxh57VmQqwr/76GHUlgPZ3E2V 7AYw/lwpnzai3ipFf1z4GtN8rPRaNt+efz8+0aaAY3ileymO+fuI7VDHOD1SFg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657524190; a=rsa-sha256; cv=none; b=c04w4IQ71v6oa96RzEHBZ/wG09IcKaX4K75WJuOKuKoT/oHq8zLTlofy0egkRyOpErxEsS F8+ZTkaoYqKNWMHq37o/uoEPti5CZvLqFunV2XBBVB2af7ydHi9UCHGEtmESuBCNsY4wqa svwTpsqqdI+IO81n8dcoKF4v0H0myvyoRY5/hfVmmwdpSweiEDGEiAb1EEJoMV+flawERq AMRz6q0gNJCvSwuXKBDbbkRWwfpddqlmm5YRUS1I7oB2TllkFNIebGiPeKY33d2mZg7gaW 4CaY07F94xZnGWY31Z5Bnv6B8e6lzRuqzDA7xgfioHOOJI5UiFycfhrlG5RevQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.65 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A21C33855D X-Spam-Score: -3.65 X-Migadu-Scanner: scn0.migadu.com X-TUID: RA0FJzNtIUGq --Sig_/CBmkclhbOLK6H7tVA.GmDaB Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sat, 9 Jul 2022 21:17:27 +0200 Denis 'GNUtoo' Carikli 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=3D 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. --Sig_/CBmkclhbOLK6H7tVA.GmDaB Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmLLz8gACgkQX138wUF3 4mOlQQ//ZpZUkE+UuDx5PBVk2oPVDA7vbnipfPv4gGR2qMq4o1qsnFE9/kWs04+E J5hMijHHVUdYGsGXLegnpv1Pv9OX/D9CUqcE0ZfW7HhRAyNwJMnhHy+5upV1RxeF 9Zjt8bR3dIPk6Vy7ABG6oco3nLpnJo7mIquB/SCGdSAec7Nkz6Qvf1bZuMMwkjpe 59i0pOOZgmq7ltTRz6gsy+eGZ+ZufAq1iVXa/eSaRSZhpOyJrbamEryRqDJY9noR 2OH+rhHJHFO+XTEDP0127q7VjXZ1Im943hDw0zC6KzyzTVqWTuSogmVPua9hie/i maBqn5Akwv6YRiw3s3hUhlkw83+qBIOUlwTb9/6/sgRHkr1pBXcCTt/IRWMk11RS tDa+5Cod7Hl9QQWaEH/UwE8MZdQwpTft2F89xc81aCe9l7D/+Cp2MxY+Q7l5qMIC CDFZohoNv0GxE6jdimydJp234p+VcunaZjGWZDBO2o9b3LRYqCYRAOOwbESNxYym O7HmwsOz/iJP6T4aKLgNWdO2+YZsjx3EP1IOXUXkqlDrvvs08PqZbxp8w+u8pws3 xQJ+zWbLabvwqLl0b8CwIrQx4eqSUryP8Ovm/LMuSeXCltVesClePK4GzTIQcHhO DYAhKXMYzkVZIbEqwQGQ5T86TNXXs4vkld8c/m4JhWFmRFK5+Ss= =dXDY -----END PGP SIGNATURE----- --Sig_/CBmkclhbOLK6H7tVA.GmDaB--