From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 09 12:25:04 2022 Received: (at submit) by debbugs.gnu.org; 9 Apr 2022 16:25:04 +0000 Received: from localhost ([127.0.0.1]:38574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndDtY-0005I1-2S for submit@debbugs.gnu.org; Sat, 09 Apr 2022 12:25:04 -0400 Received: from lists.gnu.org ([209.51.188.17]:58744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndDtW-0005Hh-Ln for submit@debbugs.gnu.org; Sat, 09 Apr 2022 12:25:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56276) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndDtW-0006nF-Gi for bug-guix@gnu.org; Sat, 09 Apr 2022 12:25:02 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:44247) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ndDtU-0001DE-Jt for bug-guix@gnu.org; Sat, 09 Apr 2022 12:25:02 -0400 Received: from hermia.goebel-consult.de ([87.176.135.168]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1N4Qbu-1o5AeF3qbu-011OHw for ; Sat, 09 Apr 2022 18:24:57 +0200 Received: from [127.0.0.1] (hermia.goebel-consult.de [192.168.110.7]) by hermia.goebel-consult.de (Postfix) with ESMTP id 936C35FB16 for ; Sat, 9 Apr 2022 18:25:05 +0200 (CEST) Message-ID: <73a4b99c-23db-ac72-2a09-1c454dc1b3e5@crazy-compilers.com> Date: Sat, 9 Apr 2022 18:24:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Content-Language: en-US From: Hartmut Goebel To: bug-guix Subject: build-systems: inconsistent use of standard-packages Organization: crazy-compilers.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:gteSFSLNzdKtNFq+0JTmKV5XsDN2E69YNAJtmnI7sqB0rrPrG5+ 3VV5BIdVePlwdrox/1PnmlCv30dqnXd2jVxlHJ/0eHh8klaetc6Njit4NsFO1NpgufAaLl0 FWmBuNmojFDgQDBdzVVk5e935mpTwN8orWQHqcpvoPdbCsgJ0we2WUg9n+FxOeCQ7XcBuy5 oLpo9C9sP27CIIvjKYK6g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:5XBY4rwbs6k=:JEzlyRHTyJheXzqcZGwWJX yl6BwkxhPlDNH+AsE74uqacabNOgUojSAbGFXuJyi9UM+nDuOMt2EOSkuHP7hemHzmyJd8PLI zN2QC+2u3FMv1UtFSFKE68jjQNo1cm2H2gEUOHS9Aw/zU3JfplRE1MOpF4vYrqxQY7c2ZOzwX ZLs/bKjiR9dz916K07xfloAoMGgyXBbYCJ+ARW2fpB2+gh+OtKpnZHcD+LwBoVaFbx/+TzQYT Xk6nHay5jIdYf0cdFajjMXWQJwMRljdfbJWcb9hqMRyt7QHlrspvz8+dIBTewCsoFqY5z1wrP XHP/j61SeyQ9PBTTFTc2vkb6HENOQjnNUF6bF2R9dv2Q1C5gxkL8dURphfSrbFyoHRDUNSRnB 4uXLIg6VMMzazmHKgIcHcgwZ/4n28wGWoFFCFZlHnMkOXtn1+9DXSye/mjmC60pEGtLUJSOMp WrnNNk3ybUsTtG3WHqfa1r7e6BgmRgCecqCYyMb4z0MybDjJ7xnWBFkdjXJ6+DNv8F697J366 HErcZirUMEW17Q3HgGUO0c9CkYof8Nj9cuJlF/4PCr3pqIv6mpapfcFnNGyJzzggeE6bAR8/x 58Qk6imWmohxKRSCCw7IRviogShMIjXdGuCp2MMtIYh5RJwghyQqwgkanH++OQJ/bSi5VEXAr Gv9KzjN/RTWr82avOu0CoMWphrZf6qER767WIfF+3Z8ZN/9LbISLYw7EIfjkVl7a8IzCQlGYt UZZKZKQQYOebmkXL Received-SPF: none client-ip=212.227.126.133; envelope-from=h.goebel@crazy-compilers.com; helo=mout.kundenserver.de 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Build-systems are adding „@(standard-packages)“ inconsistently to „host-packages“ or „build-packages”. For one developing a new build-system it is not clear which is the correct form. Some (e.g. texlive, ruby, python) add it to „host-inputs“)          (host-inputs `(,@(if source                               `(("source" ,source))                               '())                         ,@inputs                          ;; Keep the standard inputs of 'gnu-build-system'.                          ,@(standard-packages))) Some add it to „build-inputs (e.g. gnu, cmake, qt):     (build-inputs `(,@(if source                           `(("source" ,source))                           '())                     ,@`(("cmake" ,cmake))                     ,@native-inputs                     ,@(if target                           ;; Use the standard cross inputs of                           ;; 'gnu-build-system'.                           (standard-cross-packages target 'host)                           '())                     ;; Keep the standard inputs of 'gnu-build-system'.                     ,@(standard-packages))) Expected: Either a) review and align the code of all build-systems, or b) add a comment to every build-system briefly explaining why in host resp. build-packages here, c) document how and why to use which form. Since as far as I've seen there is no detailed „How to write a build-system“, developers (well, me :-) tend to develop new build-systems based on existing ones. Thus (a) or (b) seem the easier and quicker solution. Reproduce: grep -A5 -B5 standard-packages guix/build-system/*.scm -- Regards Hartmut Goebel | Hartmut Goebel | h.goebel@crazy-compilers.com | | www.crazy-compilers.com | compilers which you thought are impossible | From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 09 13:52:57 2022 Received: (at 54820) by debbugs.gnu.org; 9 Apr 2022 17:52:57 +0000 Received: from localhost ([127.0.0.1]:38652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndFGb-0007TR-7g for submit@debbugs.gnu.org; Sat, 09 Apr 2022 13:52:57 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:48864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ndFGZ-0007TH-57 for 54820@debbugs.gnu.org; Sat, 09 Apr 2022 13:52:56 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by albert.telenet-ops.be with bizsmtp id Ghst270014UW6Th06hstg7; Sat, 09 Apr 2022 19:52:53 +0200 Message-ID: <27c029b24af9da1871ad95d1fbfd1dec86a4e9d2.camel@telenet.be> Subject: Re: bug#54820: build-systems: inconsistent use of standard-packages From: Maxime Devos To: Hartmut Goebel , 54820@debbugs.gnu.org Date: Sat, 09 Apr 2022 19:52:48 +0200 In-Reply-To: <73a4b99c-23db-ac72-2a09-1c454dc1b3e5@crazy-compilers.com> References: <73a4b99c-23db-ac72-2a09-1c454dc1b3e5@crazy-compilers.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-LBYQmc7TM4abvKvKFtdC" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1649526773; bh=JGNTxY4tYCB77mCI3TTXRf9Uf9FrF1hbWsmXO9impdA=; h=Subject:From:To:Date:In-Reply-To:References; b=n0U2+cM2Q5nu+d+HLAeQL/QKQmYAdZV4k1aAAZTioNmCooGAiYikIelt+pSY3kQCE 8qZy+rC1+uQWXJbzg6JZXQI0TuQ79a/iLgJ6bCz6vtUu+zLfG9KWOunO9R4cCbz1mL Skht+VKEzm/3X87xjlONxHXYvRTCb10KnZFBhDPWRfYm+ILFfoonC8O6RgSMywo2vI Y18DN7a4Ipre2RJOBc25KSaVgAreiY94U5SUlNPu6kEV0J1GbZHvMNSS7cUmfffF0e 0IkEhwl9gMJnRuoVoalRCJFuhk6XtuXunR+odrUlrJp0GbVt28FxxCNzL7dh/Gv+sv niiDVGeO24eVg== X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54820 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-LBYQmc7TM4abvKvKFtdC Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hartmut Goebel schreef op za 09-04-2022 om 18:24 [+0200]: > Build-systems are adding =E2=80=9E@(standard-packages)=E2=80=9C inconsist= ently to=20 > =E2=80=9Ehost-packages=E2=80=9C or =E2=80=9Ebuild-packages=E2=80=9D. For = one developing a new=20 > build-system it is not clear which is the correct form. >=20 > Some (e.g. texlive, ruby, python) add it to =E2=80=9Ehost-inputs=E2=80=9C= ) FWIW, the latest version of corrects it for font-build-system. > [...] > Some add it to =E2=80=9Ebuild-inputs (e.g. gnu, cmake, qt): > [...] The reason in cross-compilation support: * host-inputs =E2=89=88 inputs =20 * build-inputs =E2=89=88 native-inputs=20 There's also this comment from (guix build-system) ;; Here we use build/host/target in the sense of the GNU tool chain (info ;; "(autoconf) Specifying Target Triplets"). (build-inputs bag-build-inputs ;list of packages (default '())) (host-inputs bag-host-inputs ;list of packages (default '())) And (autoconf)Specifying Target Triplets: '--build=3DBUILD-TYPE' the type of system on which the package is being configured and compiled. It defaults to the result of running 'config.guess'. Specifying a BUILD-TYPE that differs from HOST-TYPE enables cross-compilation mode. '--host=3DHOST-TYPE' the type of system on which the package runs. By default it is the same as the build machine. Specifying a HOST-TYPE that differs from BUILD-TYPE, when BUILD-TYPE was also explicitly specified, enables cross-compilation mode. (standard-packages) contains a tar, gzip, awk ... which are typically only needed as native-inputs, so they go in 'build-inputs'. There's also the complication that the cross-compilation system of glibc is apparently different from other packages: ;; The cross-libc is really a target package, but for bootstrapping ;; reasons, we can't put it in 'host-inputs'. Namely, 'cross-gcc' is a ;; native package, so it would end up using a "native" variant of ;; 'cross-libc' (built with 'gnu-build'), whereas all the other package= s ;; would use a target variant (built with 'gnu-cross-build'.) (target-inputs (if (and target implicit-cross-inputs?) (standard-cross-packages target 'target) '())) Also, (standard-packages) only contains a non-cross-compiling gcc, so (standard-cross-packages) (used when cross-compiling) adds a cross-compilin= g gcc. Greetings, Maxime. --=-LBYQmc7TM4abvKvKFtdC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYlHH8BccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7q6ZAQD2hR39G4nDAy5EM4aC27A4hPnh EqbyqybG4EWQOjOWnwD/f7kcO2WX4O0RwWcTFBKW/94uhhiPQnWZ89JheVLyrAA= =XoNg -----END PGP SIGNATURE----- --=-LBYQmc7TM4abvKvKFtdC--