From unknown Fri Sep 05 09:30:08 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#49025 <49025@debbugs.gnu.org> To: bug#49025 <49025@debbugs.gnu.org> Subject: Status: [PATCH core-updates 00/37] Support cross-compilation with meson Reply-To: bug#49025 <49025@debbugs.gnu.org> Date: Fri, 05 Sep 2025 16:30:08 +0000 retitle 49025 [PATCH core-updates 00/37] Support cross-compilation with mes= on reassign 49025 guix-patches submitter 49025 Maxime Devos severity 49025 normal tag 49025 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:22:22 2021 Received: (at submit) by debbugs.gnu.org; 14 Jun 2021 15:22:22 +0000 Received: from localhost ([127.0.0.1]:47467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoPt-0003mF-Ki for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:22:21 -0400 Received: from lists.gnu.org ([209.51.188.17]:59914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoPs-0003m7-8C for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:22:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsoPr-0000Zc-W1 for guix-patches@gnu.org; Mon, 14 Jun 2021 11:22:20 -0400 Received: from laurent.telenet-ops.be ([2a02:1800:110:4::f00:19]:51572) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsoPp-0005zM-G3 for guix-patches@gnu.org; Mon, 14 Jun 2021 11:22:19 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3NB2500K0mfAB4013NBn4; Mon, 14 Jun 2021 17:22:11 +0200 Message-ID: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> Subject: [PATCH core-updates 00/37] Support cross-compilation with meson From: Maxime Devos To: guix-patches@gnu.org Date: Mon, 14 Jun 2021 17:22:11 +0200 Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623684132; bh=x1eWo3QX4Ry2pHMBqhd/LUaQEMWIsO298q5JjZCWWS8=; h=Subject:From:To:Date; b=saCWJk5VnoAY/rIUH96lYLdSLc+UcABC6a/ciXnmT2yGz232QfnPzAwalYRXAviYW fB33wgsK4omIumykn30aGMsrXNuscexIny2aqcMeLlZwgcJdrYP7iwI0bH8QADjhkZ En2lIHQLLdEg4s3eTJl/aaJ5CHOTwTwQYnOM5F1hYd92p0CEn5oWqQWA7WN0UKTqsl LDnwJfRSGAPuLP/ClvlAuli4/7/mzKod/NVA85Yk7lT6hg/VLkyO2UKNqHmnub9TEk JYFrfEDC1kn4y64llv+l1hbwNpPi33/l3WDJoDDu0rvIlzSz+v+avYQ1O1IlyCl/ne PGHXrH77GKlZA== Received-SPF: pass client-ip=2a02:1800:110:4::f00:19; envelope-from=maximedevos@telenet.be; helo=laurent.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.7 (/) 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: -2.3 (--) This patch series adds cross-compilation support to meson-build-system. meson-build-system is used by many gtk applications (sometimes directly, sometimes because a dependency uses meson-build-system). This has been tested with ./pre-inst-env guix build --target=i686-linux-gnu glib on a x86_64-linux system. The build succeeds, and "guix gc --references ..." looked reasonable to me. Meson cross-compilation is implemented by the last patch. The one-before-last patch works-around the brokenness of GCC cross-compilers on current core-updates (see ;). The first two patches define a few utilities target-linux?, target-x86-32? and target-x86-64? which are used by the last patch, but could be useful elsewhere as well. The third patch is used in various cross-compilation fixes. The other 34 patches are cross-compilation fixes for dependencies of glib, and follow-up patches making the package definitions somewhat nicer IMHO (like removing trailing #t from phases, and computing derivation for some architecture-independent packages when cross-compiling and compiling natively). Maxime Devos (37): utils: Define target-linux? predicate. utils: Define a target-x86-32? and target-x86-64? predicate. packages: Define this-package-input and this-package-native-input. net-base: Make #:builder argument a G-expression. net-base: Fix cross-compilation, eliminating %build-inputs & friends net-base: Don't cross-compile. tzdata: Don't bother with cross-compiling. libgpg-error: Remove trailing #f from phases. libgpg-error: Prevent silent miscompilation some systems. libgpgerror: Maybe fix a cross-compilation bug. libgpg-error: Fix cross-compilation error. libgcrypt: Fix cross-compilation build error. wrap-python3: Make #:builder a G-exp instead of a raw S-exp. wrap-python3: Fix cross-compilation. python: Fix reference to input when cross-compiling. openssl: Remove trailing #t from phases. openssl: Make the #:phases argument a G-expression. openssl: Use G-exp machinery for referring to outputs. openssl: Move documentation instead of copying and deleting it. openssl: Move all man pages to separate output, not only man3. openssl: Find bin/env when cross-compiling. openssl: Extract logic for computing CONFIGURE_TARGET_ARCH. readline: Make #:configure-flags a G-expression. readline: Fix build error when cross-compiling. bash: Make #:configure-flags a G-expression. bash: Fix cross-compilation build error. fontconfig: Make the #:configure-flags argument a G-expression. fontconfig: Fix build error when cross-compiling. glib: Use a correct python in scripts when cross-compiling. glib: Verify the cross-compiled python is used in installed scripts. glib: Look up "tzdata" in 'native-inputs', not 'inputs'. tk: Make #:configure-flags a G-expression. tk: Do not use %build-inputs when cross-compiling. libelf: Use the cross-compiler when cross-compiling. opendht: Correct 'nettle' variable name in inputs. cross-base: Fix cross-compiler for i686-linux-gnu. meson: Support cross-compilation. Makefile.am | 1 + gnu/packages/admin.scm | 44 ++++--- gnu/packages/base.scm | 9 ++ gnu/packages/bash.scm | 39 +++--- gnu/packages/cross-base.scm | 63 ++++++++- gnu/packages/elf.scm | 48 ++++--- gnu/packages/fontutils.scm | 8 +- gnu/packages/glib.scm | 34 ++++- gnu/packages/gnupg.scm | 60 ++++++--- gnu/packages/networking.scm | 2 +- gnu/packages/python.scm | 51 ++++---- gnu/packages/readline.scm | 27 ++-- gnu/packages/tcl.scm | 14 +- gnu/packages/tls.scm | 142 ++++++++++---------- guix/build-system/meson.scm | 200 ++++++++++++++++++++++++++--- guix/build/meson-configuration.scm | 71 ++++++++++ guix/packages.scm | 29 +++++ guix/utils.scm | 26 ++++ tests/packages.scm | 34 +++++ tests/utils.scm | 40 ++++++ 20 files changed, 728 insertions(+), 214 deletions(-) create mode 100644 guix/build/meson-configuration.scm base-commit: 92803cbef5affa3dbbf049262e1fcf290d8d8622 From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:37:08 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:37:08 +0000 Received: from localhost ([127.0.0.1]:47495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoeC-00049z-Hg for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:08 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:45738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoeA-00049r-Q7 for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:07 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3d42500f0mfAB4013d5M6; Mon, 14 Jun 2021 17:37:05 +0200 Message-ID: <719b5bd1487e883362f08afaec6facd58dec1f81.camel@telenet.be> Subject: [PATCH core-updates 08/37] libgpg-error: Remove trailing #f from phases. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:37:04 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-rQAImhbgCCXR0WX7Aaum" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685025; bh=2mNuqtGeAfIWD7O6+ZcW4PfyUsI/Hgiw0epAcaPxFOw=; h=Subject:From:To:Date:In-Reply-To:References; b=rMDN+/RbGPMilY53Ke7GprIdu8Fc/qpBuPP5FU/8Nn6fuc+e7hwamNRpQRfWFUlam TZIxILpVSGOFEupglAx4iZuLqA3fD0pX+zpbN75VV3deCW/QFzxvtX2cxfz0Kw2GD4 atfoz5z55OT1iiAwjIY5euZjydDs2+gW44Te86djMTGZNqiQg+kfXs+Z/xNZTchas+ JVLpQTiZYEx4PD9cBFmoglPMZocKJbwdpJtYw+sJrreYU/n65ZZvczDDAUhyANIsp7 stAIr2LD3AucBYkOzr6MXN0VrGidl3W6yrb4kSLZzv6sNjJ0FyJscynIVTN7aNPZyn +cyH2kJmGLclQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-rQAImhbgCCXR0WX7Aaum Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit These aren't required anymore. * gnu/packages/gnupg.scm (libgpgerror)[arguments]{cross-symlinks}: Remove trailing #f. --- gnu/packages/gnupg.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --=-rQAImhbgCCXR0WX7Aaum Content-Disposition: attachment; filename="0008-libgpg-error-Remove-trailing-f-from-phases.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0008-libgpg-error-Remove-trailing-f-from-phases.patch"; charset="us-ascii" diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index cb481b38e1..2f44e6ec6a 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -114,8 +114,7 @@ (string-append x "-unknown-linux-gnu"))))) (symlink (string-append "lock-obj-pub." triplet ".h") - "src/syscfg/lock-obj-pub.linux-gnu.h")) - #t)))) + "src/syscfg/lock-obj-pub.linux-gnu.h")))))) '())) (native-inputs `(("gettext" ,gettext-minimal))) (home-page "https://gnupg.org") --=-rQAImhbgCCXR0WX7Aaum-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:37:15 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:37:15 +0000 Received: from localhost ([127.0.0.1]:47499 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoeI-0004AH-OO for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:15 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:45738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoeG-00049r-VG for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:14 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3dC2500C0mfAB4013dCMt; Mon, 14 Jun 2021 17:37:12 +0200 Message-ID: <48d3a94eacade6a6c34f9258f084fd2ac3ee4d8e.camel@telenet.be> Subject: [PATCH core-updates 09/37] libgpg-error: Prevent silent miscompilation some systems. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:37:12 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-mnRhsXEnMhYAGlzsfp88" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685032; bh=6vTiQPb5qis4UWl8wp9f8t/yYv0pHVlVbDOMqZ61kL8=; h=Subject:From:To:Date:In-Reply-To:References; b=c4WZhlzh9eyplTKekG6c89uFkd243RsEGMk0WsoAlQb92eWokXY2Xx9LvvqQQWBvB pj7h/Lwqn+wFT0xoXih88kZqNXMEshJrLY5v5b0jDIELhpPEt4anWv2vFOA9jA81HE f8mc7cfuh68hYFPKNSc4/0bJpH67vPCFZjBZVu5BPi8+Qj99D0OuhHAaVvzhY4aFAU CPOvjgG0ib/Q24lHRH9eWOL8/pQOSy09jOrDenT+e4WlmJNSIOFmdab5pBYFtiuCck olS+L7Cw5FXlxfJNIwsWvHHy1xnAxQ/tfO9dmH5pNsMoknxAdxCW+k2fUuHMW6Za6M by7oX/dbTFDeQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-mnRhsXEnMhYAGlzsfp88 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit * gnu/packages/gpg.scm (libgpgerror)[arguments]<#:phases>{cross-symlinks}: Only link to src/syscfg/lock-obj-pub.linux-gnu.h if the package is being compiled for a Linux target. Do not link either if the architecture is unknown, as the headers vary with the architecture. --- gnu/packages/gnupg.scm | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) --=-mnRhsXEnMhYAGlzsfp88 Content-Disposition: attachment; filename="0009-libgpg-error-Prevent-silent-miscompilation-some-syst.patch" Content-Transfer-Encoding: 8bit Content-Type: text/x-patch; name="0009-libgpg-error-Prevent-silent-miscompilation-some-syst.patch"; charset="UTF-8" diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 2f44e6ec6a..de213d381f 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2018 Björn Höfling ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Fredrik Salomonsson +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -77,6 +78,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system perl) #:use-module (guix build-system python) + #:use-module (ice-9 match) #:use-module (srfi srfi-1)) (define-public libgpg-error @@ -94,27 +96,37 @@ (build-system gnu-build-system) (arguments (if (%current-target-system) - `(#:modules ((ice-9 match) - (guix build gnu-build-system) + `(#:modules ((guix build gnu-build-system) (guix build utils)) #:phases (modify-phases %standard-phases ;; When cross-compiling, some platform specific properties cannot ;; be detected. Create a symlink to the appropriate platform - ;; file. See Cross-Compiling section at: + ;; file if required. Note that these platform files depend on + ;; both the operating system and architecture! + ;; + ;; See Cross-Compiling section at: ;; https://github.com/gpg/libgpg-error/blob/master/README (add-after 'unpack 'cross-symlinks - (lambda* (#:key target inputs #:allow-other-keys) - (let ((triplet - (match (string-take target - (string-index target #\-)) - ("armhf" "arm-unknown-linux-gnueabi") - ("mips64el" "mips-unknown-linux-gnu") - (x - (string-append x "-unknown-linux-gnu"))))) - (symlink - (string-append "lock-obj-pub." triplet ".h") - "src/syscfg/lock-obj-pub.linux-gnu.h")))))) + (lambda _ + (define (link triplet source) + (symlink (string-append "lock-obj-pub." triplet ".h") + (string-append "src/syscfg/lock-obj-pub." + source ".h"))) + ,(let* ((target (%current-target-system)) + (architecture + (string-take target (string-index target #\-)))) + (cond ((target-linux? target) + (match architecture + ("armhf" + `(link "arm-unknown-linux-gnueabi" "linux-gnu")) + ("mips64el" + `(link "mips-unknown-linux-gnu" "linux-gnu")) + ;; Don't always link to the "linux-gnu" + ;; configuration, as this is not correct for + ;; all architectures. + (_ #t))) + (#t #t))))))) '())) (native-inputs `(("gettext" ,gettext-minimal))) (home-page "https://gnupg.org") --=-mnRhsXEnMhYAGlzsfp88-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:37:19 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:37:19 +0000 Received: from localhost ([127.0.0.1]:47503 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoeN-0004AZ-2R for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:19 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:41494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoeL-0004AR-Gm for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:18 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id H3dG250020mfAB4063dGr2; Mon, 14 Jun 2021 17:37:16 +0200 Message-ID: <1006ad56f7750b41a6566edc2310105b80434aef.camel@telenet.be> Subject: [PATCH core-updates 01/37] utils: Define target-linux? predicate. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:37:16 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-EXoauoUcFIELojDkzoZx" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685036; bh=O3dLFRNgrcLOgQ05ElriE16zWpQ323uQya/Y3etXMcg=; h=Subject:From:To:Date:In-Reply-To:References; b=Y0PBhrUQRLo5Fx/mqii8n9z21RomunWGj/BeBWtt1tx24htP+WrFhBqi2zieNnQk8 1IEcfYBxZFDfoR53uYrf8NqLjkMWmY1ev1pCw/bi088qxeUn63BSRdptRKgFC0BerD QuuwDPRlNzwnSx7pFE+WOkrn2Dvpxo+fJehtm1e5zkZmKW0tsnNEyCsp9pKmIOppsl VI4YAanrSV0wkpUAVWDmoxPobGtmMBxKEnNWuWcOtZRCYvF2Sq0JVYxBzp+5ejS/fc e1Z2eq2odUHFLjmFJZNeD5gnakgdwdX/5meObBNq0WNI5sgswTzbZ+q4DMl80ajAxJ 2ZdoMt5dblG6w== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-EXoauoUcFIELojDkzoZx Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit * guix/utils.scm (target-linux?): New predicate. * tests/utils.scm ("target-linux?"): Test it. ("target-mingw?"): Also test ‘target-mingw?’. --- guix/utils.scm | 6 ++++++ tests/utils.scm | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) --=-EXoauoUcFIELojDkzoZx Content-Disposition: attachment; filename="0001-utils-Define-target-linux-predicate.patch" Content-Transfer-Encoding: 8bit Content-Type: text/x-patch; name="0001-utils-Define-target-linux-predicate.patch"; charset="UTF-8" diff --git a/guix/utils.scm b/guix/utils.scm index 19990ceb8a..4ff2602e23 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2020 Maxim Cournoyer ;;; Copyright © 2021 Simon Tournier ;;; Copyright © 2021 Chris Marusich +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -81,6 +82,7 @@ %current-system %current-target-system package-name->name+version + target-linux? target-mingw? target-arm32? target-aarch64? @@ -543,6 +545,10 @@ a character other than '@'." (idx (values (substring spec 0 idx) (substring spec (1+ idx)))))) +(define* (target-linux? #:optional (target (or (%current-target-system) + (%current-system)))) + (string-contains target "linux")) + (define* (target-mingw? #:optional (target (%current-target-system))) (and target (string-suffix? "-mingw32" target))) diff --git a/tests/utils.scm b/tests/utils.scm index 7fcbb25552..80a0e669a4 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2016 Mathieu Lirzin ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -289,6 +290,22 @@ skip these tests." (string-closest "hello" '("kikoo" "helo" "hihihi" "halo")) (string-closest "hello" '("aaaaa" "12345" "hellohello" "h")))) +(test-equal "target-linux?" + '(#t #f #f #t) + (map (compose ->bool target-linux?) + '("i686-linux-gnu" "i686-w64-mingw32" + ;; Checking that "gnu" is present is not sufficient, + ;; as GNU/Hurd exists. + "i686-pc-gnu" + ;; Some targets have a suffix. + "arm-linux-gnueabihf"))) + +(test-equal "target-mingw?" + '(#f #f #t) + (map (compose ->bool target-mingw?) + '("i686-linux-gnu" "i686-pc-gnu" + "i686-w64-mingw32"))) + (test-end) (false-if-exception (delete-file temp-file)) --=-EXoauoUcFIELojDkzoZx-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:37:23 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:37:24 +0000 Received: from localhost ([127.0.0.1]:47507 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoeR-0004Aq-G0 for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:23 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:37390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoeP-0004Ah-78 for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:21 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id H3dK2500Q0mfAB4063dL7F; Mon, 14 Jun 2021 17:37:20 +0200 Message-ID: Subject: [PATCH core-updates 03/37] packages: Define this-package-input and this-package-native-input. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:37:19 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-aqdcE9fvlHxGDfwQgr/Y" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685040; bh=gxbilsOjCrADWcUWiU6E8vOBaNo7+d1LXmx/BF1mapI=; h=Subject:From:To:Date:In-Reply-To:References; b=Xk/Kh/fopx4WO50aJ3mMeBos+tfC8pnZWRG2lTsU5dXfMefTKyFP0JpDDrKmCfSga qIOgxaRpNLWHX6hTyDtdIXTsL8BLp2Eq1JNJ8+imjkaSZRujDuz6oO7oBCa0nfDTUf 5tU9t6UvSODXbJIscuzEVtlyKp3RUgU+otcurQ5SLqBh8FkSgwgyuDUXvyhrZZYZKb 1uunDYG/9kiwBMj2PeMTGmkHTswO1Bdfmm8cV8wfuRbH6ucQ8XRMD/imoZ8kHUMoMX fvrXV0n8+5h6W7a9zwxURAm9uavAJl+jghNbQS7ulgwLC0pEVvv10ir2B5G3reYoX1 ZIFht05lm5vDw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-aqdcE9fvlHxGDfwQgr/Y Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit These macros are intended to be used in build phases. More precisely, (assoc-ref %build-inputs "input") can be replaced by #$(this-package-input "input") or #+(this-package-native-input "native-input") as appropriate. * guix/packages.scm (package-input, package-native-input): New (unexported) procedures. (this-package-input, this-package-native-input): New macros. --- guix/packages.scm | 29 +++++++++++++++++++++++++++++ tests/packages.scm | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) --=-aqdcE9fvlHxGDfwQgr/Y Content-Disposition: attachment; filename="0003-packages-Define-this-package-input-and-this-package-.patch" Content-Transfer-Encoding: 8bit Content-Type: text/x-patch; name="0003-packages-Define-this-package-input-and-this-package-.patch"; charset="UTF-8" diff --git a/guix/packages.scm b/guix/packages.scm index a66dbea1b7..80c8bbebf0 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -108,6 +108,9 @@ deprecated-package package-field-location + this-package-input + this-package-native-input + package-direct-sources package-transitive-sources package-direct-inputs @@ -513,6 +516,32 @@ object." #f))) (_ #f))) +(define (package-input package name) + "Return the package input NAME of PACKAGE--i.e., an input +from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not +considered. If this input does not exist, return #f instead." + (and=> (or (assoc-ref (package-inputs package) name) + (assoc-ref (package-propagated-inputs package) name)) + car)) + +(define (package-native-input package name) + "Return the native package input NAME of PACKAGE--i.e., an input +from the ‘native-inputs’ field. If this native input does not exist, +return #f instead." + (and=> (assoc-ref (package-native-inputs package) name) + car)) + +(define-syntax-rule (this-package-input name) + "Return the input NAME of the package being defined--i.e., an input +from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not +considered. If this input does not exist, return #f instead." + (package-input this-package name)) + +(define-syntax-rule (this-package-native-input name) + "Return the native package input NAME of the package being defined--i.e., +an input from the ‘native-inputs’ field. If this native input does not +exist, return #f instead." + (package-native-input this-package name)) ;; Error conditions. diff --git a/tests/packages.scm b/tests/packages.scm index 47d10af5bc..91ec38e4cc 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -1851,6 +1852,39 @@ (package-location (specification->package "guile@2")) (specification->location "guile@2")) +(test-eq "this-package-input, exists" + hello + (package-arguments + (dummy-package "a" + (inputs `(("hello" ,hello))) + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-input, exists in propagated-inputs" + hello + (package-arguments + (dummy-package "a" + (propagated-inputs `(("hello" ,hello))) + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-input, does not exist" + #f + (package-arguments + (dummy-package "a" + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-native-input, exists" + hello + (package-arguments + (dummy-package "a" + (native-inputs `(("hello" ,hello))) + (arguments (this-package-native-input "hello"))))) + +(test-eq "this-package-native-input, does not exists" + #f + (package-arguments + (dummy-package "a" + (arguments (this-package-native-input "hello"))))) + (test-end "packages") ;;; Local Variables: --=-aqdcE9fvlHxGDfwQgr/Y-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:37:28 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:37:28 +0000 Received: from localhost ([127.0.0.1]:47511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoeV-0004B8-Th for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:28 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:45738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoeU-00049r-9V for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:26 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3dR2500S0mfAB4013dRPV; Mon, 14 Jun 2021 17:37:25 +0200 Message-ID: Subject: [PATCH core-updates 13/37] wrap-python3: Make #:builder a G-exp instead of a raw S-exp. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:37:25 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-LMINSdcJEwFJd3XxnDEc" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685046; bh=1qeLHwmVYIRx4Ue2kBqdwmyXBFtamfF8FXSEaCaqb2w=; h=Subject:From:To:Date:In-Reply-To:References; b=qhTcRSpGiVMJEzEBmTLqH7oG9Lprx+toSPJrAUWcTNoz4pwlGUupEpsYa1e8GzUQd NUHCtaSNzDZWZp5GWh2Ik2Mmbe5hxVchp4tPdsVFgLZFzA/tCo+EzVvpB2nztWLKSt /n+v+6s5x/XOtVySbgr2Pzsh4QGO/l1u1PBuMgjCcqNVNuFThMe82OF6K43DdIugBb eYiDmOoTMHKFROMjvoGQS6mBSy2FYHZHX3+wScgdfcGYs+u4YZUc5VhgGLzJyzrddh hJGWFhoG4f5X34G5NIJSXZwvXCWzcJ1TrQMZq1HHi5im9KzPLbeTVmOOYTi6fA+aKB VpRA+/3clVJDQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-LMINSdcJEwFJd3XxnDEc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit This allows using ungexp later. * gnu/packages/python.scm (wrap-python3)<#:builder>: Make this a G-expression. --- gnu/packages/python.scm | 46 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) --=-LMINSdcJEwFJd3XxnDEc Content-Disposition: attachment; filename="0013-wrap-python3-Make-builder-a-G-exp-instead-of-a-raw-S.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0013-wrap-python3-Make-builder-a-G-exp-instead-of-a-raw-S.patch"; charset="us-ascii" diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index b2ec486d7a..9628836567 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -573,29 +573,29 @@ for more information."))) (arguments `(#:modules ((guix build utils)) #:builder - (begin - (use-modules (guix build utils)) - (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) - (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) - (mkdir-p bin) - (for-each - (lambda (old new) - (symlink (string-append python old) - (string-append bin "/" new))) - `("python3" ,"pydoc3" ,"idle3" ,"pip3") - `("python" ,"pydoc" ,"idle" ,"pip")) - ;; python-config outputs search paths based upon its location, - ;; use a bash wrapper to avoid changing its outputs. - (let ((bash (string-append (assoc-ref %build-inputs "bash") - "/bin/bash")) - (old (string-append python "python3-config")) - (new (string-append bin "/python-config"))) - (with-output-to-file new - (lambda () - (format #t "#!~a~%" bash) - (format #t "exec \"~a\" \"$@\"~%" old) - (chmod new #o755) - #t))))))) + ,#~(begin + (use-modules (guix build utils)) + (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) + (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) + (mkdir-p bin) + (for-each + (lambda (old new) + (symlink (string-append python old) + (string-append bin "/" new))) + `("python3" ,"pydoc3" ,"idle3" ,"pip3") + `("python" ,"pydoc" ,"idle" ,"pip")) + ;; python-config outputs search paths based upon its location, + ;; use a bash wrapper to avoid changing its outputs. + (let ((bash (string-append (assoc-ref %build-inputs "bash") + "/bin/bash")) + (old (string-append python "python3-config")) + (new (string-append bin "/python-config"))) + (with-output-to-file new + (lambda () + (format #t "#!~a~%" bash) + (format #t "exec \"~a\" \"$@\"~%" old) + (chmod new #o755) + #t))))))) (synopsis "Wrapper for the Python 3 commands") (description "This package provides wrappers for the commands of Python@tie{}3.x such --=-LMINSdcJEwFJd3XxnDEc-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:37:32 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:37:32 +0000 Received: from localhost ([127.0.0.1]:47515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoea-0004BQ-6A for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:32 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:45738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoeY-00049r-On for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:31 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3dW250060mfAB4013dWQ2; Mon, 14 Jun 2021 17:37:30 +0200 Message-ID: <52ef98617777bb5553dbaa830f39def091999684.camel@telenet.be> Subject: [PATCH core-updates 14/37] wrap-python3: Fix cross-compilation. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:37:30 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-kSIBoZxaK5XnPG+S5HmN" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685050; bh=vOVficC9U8uPwTBfojzKpbaV8Yuj5zuhKsr10MgGED8=; h=Subject:From:To:Date:In-Reply-To:References; b=grdUY+5ihICF2brGIg2gFCNfSsE3b9FeWgLqSLObIeq+UXfgBftJLG5ZklbXmdhp1 puocVJ5wAEeaOJsrq8lJgYxxCKgr0C9GR7pk26T/Qb+Q3rJBnpUg10hDLvZGC7OLHL 2aT5y09F4JjuFsn3MPMzWJV714OMADoSDnwAaLS9cEC6wSfohTlYOq627RDu2g2jzb OprEW4PJf6vmVCRMKzYL/EvQH1yWEtBsZjdJMDgnjqpTbTy+bEgjV7k7mXQOrpTVRZ 9yhpiWQ5gACh5WgkJKcieCrVbqo0Qei01nqcrtPI0g89CP/LkYPVllqg15AaKG2dDW sZ34UyhiZslKw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-kSIBoZxaK5XnPG+S5HmN Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit When cross-compiling, "bash" is missing from %build-inputs, leading to a build error. Use this-package-input instead of %build-inputs to resolve this. While we're at it, eliminate all uses of %outputs and %build-inputs. * gnu/packages/python.scm (wrap-python3)[arguments]<#:builder>: Eliminte %outputs and %build-inputs. --- gnu/packages/python.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --=-kSIBoZxaK5XnPG+S5HmN Content-Disposition: attachment; filename="0014-wrap-python3-Fix-cross-compilation.patch" Content-Transfer-Encoding: 8bit Content-Type: text/x-patch; name="0014-wrap-python3-Fix-cross-compilation.patch"; charset="UTF-8" diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 9628836567..fbad0b65b8 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -60,6 +60,7 @@ ;;; Copyright © 2019 Tanguy Le Carrour ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020, 2021 Greg Hogan +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -575,8 +576,8 @@ for more information."))) #:builder ,#~(begin (use-modules (guix build utils)) - (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) - (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) + (let ((bin (string-append #$output "/bin")) + (python #$(file-append (this-package-input "python") "/bin/"))) (mkdir-p bin) (for-each (lambda (old new) @@ -586,8 +587,7 @@ for more information."))) `("python" ,"pydoc" ,"idle" ,"pip")) ;; python-config outputs search paths based upon its location, ;; use a bash wrapper to avoid changing its outputs. - (let ((bash (string-append (assoc-ref %build-inputs "bash") - "/bin/bash")) + (let ((bash #$(file-append (this-package-input "bash") "/bin/bash")) (old (string-append python "python3-config")) (new (string-append bin "/python-config"))) (with-output-to-file new --=-kSIBoZxaK5XnPG+S5HmN-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:37:37 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:37:38 +0000 Received: from localhost ([127.0.0.1]:47519 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoef-0004Bg-KH for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:37 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:45738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoed-00049r-8H for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:35 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3da2500K0mfAB4013daQW; Mon, 14 Jun 2021 17:37:34 +0200 Message-ID: <97624d382b54763e0753a1e9526be77c521907c4.camel@telenet.be> Subject: [PATCH core-updates 12/37] libgcrypt: Fix cross-compilation build error. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:37:34 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-tmE5pNVtBTNjjBUHUTMV" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685054; bh=nv31MQlIII2/PGkn8qfb8Jqa7C1agUnjicNAqERTAM0=; h=Subject:From:To:Date:In-Reply-To:References; b=ZepTO7DxgtDn44xt0tJ4J/V5E1s50U/law24EbFUsI0qwLdrCv9wkvQXbGnTjM30i TB0fSLNNlqD5umnMpbQimuCDw7MTzEQxlUJElBCSO/CRFLvaIEwW/52szQWBS1k2Ky n4IIhiEjfMf6txVEt/Owua5T8H9FYMcIuY12g+amEFEg/wnCpU42pj9xlTJyBNRbJU 010EHinJFSbk80XzaxMaYSrG0vA8tesX2E69EmrWFTmsPHCbZ71198/8grZBRlSrzx uZDcyg9wMxZOo8QnO1eqD3NZMOJMT58uS/vidjvRraEKZpymEvomXuvbrdvY3GOQie SgpDJZG47JVcg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-tmE5pNVtBTNjjBUHUTMV Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit When cross-compiling a package using gnu-build-system, %build-inputs does not exist. But libgcrypt uses %build-inputs anyway. Fix it. * gnu/packages/gnupg.scm (libgcrypt)[arguments]<#:configure-flags>: Make this a G-exp instead of a raw S-exp. Eliminate %build-inputs and use this-package-input instead. --- gnu/packages/gnupg.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) --=-tmE5pNVtBTNjjBUHUTMV Content-Disposition: attachment; filename="0012-libgcrypt-Fix-cross-compilation-build-error.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0012-libgcrypt-Fix-cross-compilation-build-error.patch"; charset="us-ascii" diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 1fee30584c..35cfdf6f43 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -74,6 +74,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) @@ -169,11 +170,12 @@ Daemon and possibly more in the future.") ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one. `(#:configure-flags - (list (string-append "--with-gpg-error-prefix=" - (assoc-ref %build-inputs "libgpg-error-host")) - ;; When cross-compiling, _gcry_mpih_lshift etc are undefined - ,@(if (%current-target-system) '("--disable-asm") - '())))) + ,#~(list (string-append "--with-gpg-error-prefix=" + #$(this-package-input "libgpg-error-host")) + ;; When cross-compiling, _gcry_mpih_lshift etc are undefined + #$@(if (%current-target-system) + #~("--disable-asm") + #~())))) (outputs '("out" "debug")) (home-page "https://gnupg.org/") (synopsis "Cryptographic function library") --=-tmE5pNVtBTNjjBUHUTMV-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:37:42 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:37:42 +0000 Received: from localhost ([127.0.0.1]:47523 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoej-0004Bx-Ry for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:42 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:41494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoej-0004AR-1g for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:41 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id H3dg2500M0mfAB4063dgu4; Mon, 14 Jun 2021 17:37:40 +0200 Message-ID: <948fec07fa2cea1e1860da413757ea8755c16a89.camel@telenet.be> Subject: [PATCH core-updates 10/37] libgpgerror: Maybe fix a cross-compilation bug. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:37:40 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-6kqImzZJtvvz39KmDjvx" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685060; bh=z9K2MAy6IWZv0IqH2jaAHv6vH2p9yOpDS7BaqtlOtDo=; h=Subject:From:To:Date:In-Reply-To:References; b=bZeVcCSwvXdLIJex/lCmpnMCwoDohEBqxwNScvtiG3vORKOfMUQMN830GxJbmivWo Gu5yXCqLPDHktRFeSL7+Lzaz4DYJe/XgLLCDhZtNzdxqjF+/PR1fLe47+LgedTqG6f IHk0KqhNcF6sJ20ddSJnUnGvW+anhV01gEKeSgHmLlpQV88fcs0n5HLsUCuDbXBOMu SCSSalfNgQs8RXG8J76KmLFnC/JK9divRahsGHU3jk9VISQjSJ7HcWwJ3X2NsekqWw YF0KzPJMln/EM4IUBX2YSJ00Fj7vtf864HtICCqxQ65hsTBnBP0yvN/Q0hsCd4WCQ7 b1cWKfLrs8pUQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-6kqImzZJtvvz39KmDjvx Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Previously, a symlink was created at src/syscfg/lock-obj-pub.linux-gnu.h pointing at lock-obj-pub.MANGLED-TARGET.h. I would think this has to be the other way around, but I am not really sure. * gnu/packages/gnupg.scm (gnupg)[arguments]<#:phases>{cross-symlinks}(link): Switch 'triplet' and 'source'. --- gnu/packages/gnupg.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --=-6kqImzZJtvvz39KmDjvx Content-Disposition: attachment; filename="0010-libgpgerror-Maybe-fix-a-cross-compilation-bug.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0010-libgpgerror-Maybe-fix-a-cross-compilation-bug.patch"; charset="us-ascii" diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index de213d381f..f5d4118af9 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -110,9 +110,9 @@ (add-after 'unpack 'cross-symlinks (lambda _ (define (link triplet source) - (symlink (string-append "lock-obj-pub." triplet ".h") + (symlink (string-append "lock-obj-pub." source ".h") (string-append "src/syscfg/lock-obj-pub." - source ".h"))) + triplet ".h"))) ,(let* ((target (%current-target-system)) (architecture (string-take target (string-index target #\-)))) --=-6kqImzZJtvvz39KmDjvx-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:37:47 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:37:47 +0000 Received: from localhost ([127.0.0.1]:47527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoep-0004CE-39 for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:47 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:45738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoen-00049r-N0 for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:46 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3dl250040mfAB4013dlRn; Mon, 14 Jun 2021 17:37:45 +0200 Message-ID: Subject: [PATCH core-updates 11/37] libgpg-error: Fix cross-compilation error. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:37:45 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-rQPIJHfkrt46h0WgPwrp" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685065; bh=xCISRmw/NcIj16CSXxBmMUhAtPL418p40XYo8HWSSlA=; h=Subject:From:To:Date:In-Reply-To:References; b=fcXc55pyk7GZCkvmVFMSLEKdaAHYOnyaL8RuaQ8ud/2niUE14M+h27Y/Jg68Ew8kM eAzENkmFFt9bIM1virCxpH7/sFP69/0F6qhKp/lVZIoA+aO2gIr//ahtO7qD0Pi2kB pR6f12HENfSF2bVP7ok/Kwq8fFugovTTgt2Rly3QEjy5AoemIw9slro8KIVzEQFm4g 1t2P8n39i8eDBACgLlnS1iEM0Paw0lgp3Uwmt7G5YJ/1A5MWC7c7Wjnw05WHgQEa++ wajgDFRqOutAFqKpQBdqmBybUm38jlXk2KTzLbmGUbHewu2pEaB5/YJNGQYfuEC1Rf Eql+8e7oQ5P1g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-rQPIJHfkrt46h0WgPwrp Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit TODO: inform upstream about the cross-compilation error. * gnu/packages/gnupg.scm (libgpg-error)[arguments]{fix-gen-lock-obj.sh}: Prevent generated header files from being sprinkled with ‘\c’. --- gnu/packages/gnupg.scm | 7 +++++++ 1 file changed, 7 insertions(+) --=-rQPIJHfkrt46h0WgPwrp Content-Disposition: attachment; filename="0011-libgpg-error-Fix-cross-compilation-error.patch" Content-Transfer-Encoding: 8bit Content-Type: text/x-patch; name="0011-libgpg-error-Fix-cross-compilation-error.patch"; charset="UTF-8" diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index f5d4118af9..1fee30584c 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -100,6 +100,13 @@ (guix build utils)) #:phases (modify-phases %standard-phases + ;; If this is left out, some generated header + ;; files will be sprinkled with ‘\c’, which + ;; the compiler won't like. + (add-after 'unpack 'fix-gen-lock-obj.sh + (lambda _ + (substitute* "src/gen-lock-obj.sh" + (("if test -n `echo -n`") "if ! test -n `echo -n`")))) ;; When cross-compiling, some platform specific properties cannot ;; be detected. Create a symlink to the appropriate platform ;; file if required. Note that these platform files depend on --=-rQPIJHfkrt46h0WgPwrp-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:37:50 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:37:50 +0000 Received: from localhost ([127.0.0.1]:47531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoes-0004CT-Ct for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:50 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:45738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoer-00049r-1o for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:49 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3do2500P0mfAB4013doSL; Mon, 14 Jun 2021 17:37:48 +0200 Message-ID: <087c14ca9722ecea88b38f7d023c8e8997a8bf09.camel@telenet.be> Subject: [PATCH core-updates 16/37] openssl: Remove trailing #t from phases. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:37:48 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-sW8Zu+pZr2bM6gaKXIXC" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685068; bh=B7MwnXvSxDVdE3dfX7pzPjcManizK182q4YsL6oTrkI=; h=Subject:From:To:Date:In-Reply-To:References; b=g0FK+eweD6DezoyMJ5VwJf2xlZJVmwVUksyuXPszC+GKlY+8NgYOB2YL0Nr5Ia8fq /AlbF60sgjBTkq6VZ7ZY4R/37PH4b3N5/DjzPk1Adlbk4wnBtD27cOx05FqdpScKlh WXISXA5S9k20A4M2tZfdS/bbQJhq41pGijeqSuDKKFTFvnYif/OmHNOrEJnQqtw/Ot bu7S7x0axSH4XMcfRvJZ5J6JECfMRkQemp9rkZJYStdyzXcbFIp7C6a0tBOeZmMTZw a48y7pxEMtJLUjz9ovaNvmMUglOW4R7xgvsR+EuwuBU7UxfFnYxbU3D588ZhI/IEUR Y2xFbWA5XE2BA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-sW8Zu+pZr2bM6gaKXIXC Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Delete trailing #t. --- gnu/packages/tls.scm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) --=-sW8Zu+pZr2bM6gaKXIXC Content-Disposition: attachment; filename="0016-openssl-Remove-trailing-t-from-phases.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0016-openssl-Remove-trailing-t-from-phases.patch"; charset="us-ascii" diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 608a7d05b8..5bfc5545db 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -366,8 +366,7 @@ required structures.") ((string-prefix? "powerpc64" target) "linux-ppc64") ((string-prefix? "powerpc" target) - "linux-ppc"))) - #t))) + "linux-ppc")))))) '()) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) @@ -406,8 +405,7 @@ required structures.") (for-each (lambda (file) (install-file file slib) (delete-file file)) - (find-files lib "\\.a$")) - #t))) + (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation (lambda* (#:key outputs #:allow-other-keys) ;; Move man3 pages and full HTML documentation to "doc". @@ -420,8 +418,7 @@ required structures.") (copy-recursively man3 man-target) (delete-file-recursively man3) (copy-recursively html html-target) - (delete-file-recursively html) - #t))) + (delete-file-recursively html)))) (add-after 'install 'remove-miscellany (lambda* (#:key outputs #:allow-other-keys) @@ -430,8 +427,7 @@ required structures.") (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" ,(package-version this-package) - "/misc")) - #t)))))) + "/misc")))))))) (native-search-paths (list (search-path-specification (variable "SSL_CERT_DIR") --=-sW8Zu+pZr2bM6gaKXIXC-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:37:55 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:37:55 +0000 Received: from localhost ([127.0.0.1]:47535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoew-0004Ck-LA for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:54 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:37390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoev-0004Ah-Ax for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:53 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id H3ds2500i0mfAB4063dsBN; Mon, 14 Jun 2021 17:37:53 +0200 Message-ID: <6ef2004dd9701ac6e886ba121b3fe0a113741aa3.camel@telenet.be> Subject: [PATCH core-updates 17/37] openssl: Make the #:phases argument a G-expression. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:37:52 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-lSLuRJRRJqrHCSk2uzHE" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685073; bh=kTSjcdjvjf+9HkDG4i3zlg/A9UJgJ7JJ4bB5EfYFO6k=; h=Subject:From:To:Date:In-Reply-To:References; b=EfnSj3WDTM+YnK+5xCbNzNT18CmFY+tcBPaBik3KR2AkXU6gAMkFZPY6qyl6DZ5I7 IYGS1HWWT0YBgCOf/1SqoHQJ+uDnj3/JOe5rBA/l28gZfAkeot1mepv+j8rPYCuzq1 ey7v15MiyHSDJ150uYEpYHVyZuhIWhPCdanMq0tQIElANi2KmxbjKs5ZPxS4a65BOF JcQHESl+fGK0VrXOV7I9C9FD0Ca1AZABxvHgkoNK8oDlBZGoYyIZWieP/QrwgeEbWV 8I6SPP3wekDbL7k2lW6Q7RAdrBLiBEAtp1lHN+Kfss9WckiVT9ZfM+AtIW4DVgxlcG iXxByk4FPucWA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-lSLuRJRRJqrHCSk2uzHE Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit This allows using this-package-native-input later. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Make this a G-expression. (openssl-1.0)[arguments]<#:phases>: Likewise. --- gnu/packages/tls.scm | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) --=-lSLuRJRRJqrHCSk2uzHE Content-Disposition: attachment; filename="0017-openssl-Make-the-phases-argument-a-G-expression.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0017-openssl-Make-the-phases-argument-a-G-expression.patch"; charset="us-ascii" diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 5bfc5545db..9de9a78e84 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -38,6 +38,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system perl) @@ -341,9 +342,10 @@ required structures.") ;; so we explicitly disallow it here. #:disallowed-references ,(list (canonical-package perl)) #:phases + ,#~ (modify-phases %standard-phases - ,@(if (%current-target-system) - '((add-before + #$@(if (%current-target-system) + #~((add-before 'configure 'set-cross-compile (lambda* (#:key target outputs #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) @@ -367,7 +369,7 @@ required structures.") "linux-ppc64") ((string-prefix? "powerpc" target) "linux-ppc")))))) - '()) + #~()) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -377,9 +379,9 @@ required structures.") (("/usr/bin/env") (string-append (assoc-ref %build-inputs "coreutils") "/bin/env"))) - (invoke ,@(if (%current-target-system) - '("./Configure") - '("./config")) + (invoke #$@(if (%current-target-system) + #~("./Configure") + #~("./config")) "shared" ;build shared libraries "--libdir=lib" @@ -388,13 +390,13 @@ required structures.") ;; conventional. (string-append "--openssldir=" out "/share/openssl-" - ,(package-version this-package)) + #$(package-version this-package)) (string-append "--prefix=" out) (string-append "-Wl,-rpath," lib) - ,@(if (%current-target-system) - '((getenv "CONFIGURE_TARGET_ARCH")) - '()))))) + #$@(if (%current-target-system) + #~((getenv "CONFIGURE_TARGET_ARCH")) + #~()))))) (add-after 'install 'move-static-libraries (lambda* (#:key outputs #:allow-other-keys) ;; Move static libraries to the "static" output. @@ -426,7 +428,7 @@ required structures.") ;; scripts. Remove them to avoid retaining a reference on Perl. (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" - ,(package-version this-package) + #$(package-version this-package) "/misc")))))))) (native-search-paths (list (search-path-specification @@ -471,7 +473,7 @@ required structures.") ;; Parallel build is not supported in 1.0.x. ((#:parallel-build? _ #f) #f) ((#:phases phases) - `(modify-phases ,phases + #~(modify-phases #$phases (add-before 'patch-source-shebangs 'patch-tests (lambda* (#:key inputs native-inputs #:allow-other-keys) (let ((bash (assoc-ref (or native-inputs inputs) "bash"))) @@ -494,9 +496,9 @@ required structures.") ;; Override this phase because OpenSSL 1.0 does not understand -rpath. (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) - (invoke ,@(if (%current-target-system) - '("./Configure") - '("./config")) + (invoke #$@(if (%current-target-system) + #~("./Configure") + #~("./config")) "shared" ;build shared libraries "--libdir=lib" @@ -504,12 +506,12 @@ required structures.") ;; PREFIX/ssl. Change that to something more ;; conventional. (string-append "--openssldir=" out - "/share/openssl-" ,version) + "/share/openssl-" #$version) (string-append "--prefix=" out) - ,@(if (%current-target-system) - '((getenv "CONFIGURE_TARGET_ARCH")) - '()))))) + #$@(if (%current-target-system) + '((getenv "CONFIGURE_TARGET_ARCH")) + '()))))) (delete 'move-extra-documentation) (add-after 'install 'move-man3-pages (lambda* (#:key outputs #:allow-other-keys) @@ -534,7 +536,7 @@ required structures.") ;; scripts. Remove them to avoid retaining a reference on Perl. (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" - ,version "/misc")) + #$version "/misc")) #t))))))))) (define-public libressl --=-lSLuRJRRJqrHCSk2uzHE-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:37:59 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:37:59 +0000 Received: from localhost ([127.0.0.1]:47539 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsof1-0004D0-0h for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:59 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:41494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoez-0004AR-1i for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:37:57 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id H3dw2500A0mfAB4063dwx5; Mon, 14 Jun 2021 17:37:56 +0200 Message-ID: <9f50356b729d98eb09b66c55caa95791b1fe3209.camel@telenet.be> Subject: [PATCH core-updates 18/37] openssl: Use G-exp machinery for referring to outputs. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:37:56 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-C1zB4ihXX/E8Gsy5UlVk" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685076; bh=KLlMYyFZOSGpAA6P7XtX2q2k7QZAvy1ChdIPsS6tTa4=; h=Subject:From:To:Date:In-Reply-To:References; b=GPgH0CCc6v8RTapun7o/Wesv27Z+5cbQ6x+cfAqTOXHAZNvx+pfFoH33ienpB6Jvw 6dlIRHMSGoAhHab0fiVSVZyzKHZJ1QiNgNCM5WhF9PDCyOkQhexPzM+DOAiBJfIITS powMdPdFIASJCSNXLOmp93g4n5knno1NYDPulq3aRferel/SEjCDf8Pcnqp6sirdqQ Ymk2mzhiafHxH+bd8A6qYl2aA0e29uZaaL7eazsV1U2l951znT6BUEOu8TFRX9Xfqx o1VfPjA5TQsbc5vAc07RGSOFxKTRU6ePr06dCH3nC2quc3jEODFVpXOg2obzyl514+ PmQQFaJMSkE/g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-C1zB4ihXX/E8Gsy5UlVk Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit This doesn't fix anything broken, just for simplifying the code a little while we're rebuilding the world anyway. IMHO this makes the code a little more readable. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Don't refer to the association list 'outputs', use #$output, #$output:doc and #$output:static instead. --- gnu/packages/tls.scm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) --=-C1zB4ihXX/E8Gsy5UlVk Content-Disposition: attachment; filename="0018-openssl-Use-G-exp-machinery-for-referring-to-outputs.patch" Content-Transfer-Encoding: 8bit Content-Type: text/x-patch; name="0018-openssl-Use-G-exp-machinery-for-referring-to-outputs.patch"; charset="UTF-8" diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 9de9a78e84..90211c733d 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020 Maxim Cournoyer +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -347,7 +348,7 @@ required structures.") #$@(if (%current-target-system) #~((add-before 'configure 'set-cross-compile - (lambda* (#:key target outputs #:allow-other-keys) + (lambda* (#:key target #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) (setenv "CONFIGURE_TARGET_ARCH" (cond @@ -371,8 +372,8 @@ required structures.") "linux-ppc")))))) #~()) (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) + (lambda _ + (let* ((out #$output) (lib (string-append out "/lib"))) ;; It's not a shebang so patch-source-shebangs misses it. (substitute* "config" @@ -398,23 +399,23 @@ required structures.") #~((getenv "CONFIGURE_TARGET_ARCH")) #~()))))) (add-after 'install 'move-static-libraries - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; Move static libraries to the "static" output. - (let* ((out (assoc-ref outputs "out")) + (let* ((out #$output) (lib (string-append out "/lib")) - (static (assoc-ref outputs "static")) + (static #$output:static) (slib (string-append static "/lib"))) (for-each (lambda (file) (install-file file slib) (delete-file file)) (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; Move man3 pages and full HTML documentation to "doc". - (let* ((out (assoc-ref outputs "out")) + (let* ((out #$output) (man3 (string-append out "/share/man/man3")) (html (string-append out "/share/doc/openssl")) - (doc (assoc-ref outputs "doc")) + (doc #$output:doc) (man-target (string-append doc "/share/man/man3")) (html-target (string-append doc "/share/doc/openssl"))) (copy-recursively man3 man-target) @@ -423,13 +424,12 @@ required structures.") (delete-file-recursively html)))) (add-after 'install 'remove-miscellany - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; The 'misc' directory contains random undocumented shell and Perl ;; scripts. Remove them to avoid retaining a reference on Perl. - (let ((out (assoc-ref outputs "out"))) - (delete-file-recursively (string-append out "/share/openssl-" - #$(package-version this-package) - "/misc")))))))) + (delete-file-recursively (string-append #$output "/share/openssl-" + #$(package-version this-package) + "/misc"))))))) (native-search-paths (list (search-path-specification (variable "SSL_CERT_DIR") --=-C1zB4ihXX/E8Gsy5UlVk-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:38:01 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:38:01 +0000 Received: from localhost ([127.0.0.1]:47543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsof3-0004DI-Cu for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:01 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:37390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsof2-0004Ah-A3 for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:00 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id H3dz2500X0mfAB4063dzCb; Mon, 14 Jun 2021 17:37:59 +0200 Message-ID: <9ab608462ae4c89963a8c4c0eb15a50e554e9c98.camel@telenet.be> Subject: [PATCH core-updates 19/37] openssl: Move documentation instead of copying and deleting it. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:37:59 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-hoKjsyZL5eOtF+fQupZT" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685080; bh=te925f3EUl5smCK7r5p7vBFmEOA/ftcMQdqMDBtfvz4=; h=Subject:From:To:Date:In-Reply-To:References; b=MyxNWdZspEj6EHhr2527rXqq7ChKqpwoI/qXhuAYKlSs5UmaMxdp+VoovExdpmRUM Xan7l4P5lYvQMXZUEltmWYG8SLSzBbyoW1HqMW7cSU/Nk0jZYeGcP8bvG4VCjIi4gW TeGWfxM+KSTHVS0hwr+iJL4kSNPzliNkGkK+g6gANMHr1RL/PcEPTXErh9FdusMx+B zRnpCt+PAEO593wAJpDVqfHpoyzMvJkE9rYIqUcoOmetxeM1t6iuEGlod4zLSP+XE7 G3sQ/ctSlyve8/Mut8Fti4ElBcW8m5BbiMNU8xLCK7O2BWyQNv5FMDrEyf7lvw+7yz qDY0cs5wEePVA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-hoKjsyZL5eOtF+fQupZT Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit * gnu/packages/tls.scm (openssl)[arguments]<#:phases>{move-extra-documentation}: Use 'rename-file' instead of 'copy-recursively' and 'delete-file-recursively'. --- gnu/packages/tls.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --=-hoKjsyZL5eOtF+fQupZT Content-Disposition: attachment; filename="0019-openssl-Move-documentation-instead-of-copying-and-de.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0019-openssl-Move-documentation-instead-of-copying-and-de.patch"; charset="us-ascii" diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 90211c733d..9aa0b5a212 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -418,10 +418,10 @@ required structures.") (doc #$output:doc) (man-target (string-append doc "/share/man/man3")) (html-target (string-append doc "/share/doc/openssl"))) - (copy-recursively man3 man-target) - (delete-file-recursively man3) - (copy-recursively html html-target) - (delete-file-recursively html)))) + (mkdir-p (dirname man3-target)) + (mkdir-p (dirname html-target)) + (rename-file man3 man-target) + (rename-file html html-target)))) (add-after 'install 'remove-miscellany (lambda _ --=-hoKjsyZL5eOtF+fQupZT-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:38:05 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:38:05 +0000 Received: from localhost ([127.0.0.1]:47556 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsof7-0004Eg-Jz for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:05 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:41494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsof5-0004AR-Qa for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:04 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id H3e32500C0mfAB4063e3xw; Mon, 14 Jun 2021 17:38:03 +0200 Message-ID: <4dd136f941566e2aec0e86121a40cb2d38952d38.camel@telenet.be> Subject: [PATCH core-updates 21/37] openssl: Find bin/env when cross-compiling. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:38:03 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-zehZEI7kwi329JaV4Q+P" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685083; bh=uCLyFHAdGzsxq1oiuobOF0Zs8lLgSM/ioa9UNVIbOb8=; h=Subject:From:To:Date:In-Reply-To:References; b=jU69cewSYlwaauhp5cQK0SN6Ni6KtMK5W55hl5jfs9shF0Ww4w2tWQ9k2rC/iqPnc kpY6hcr7n5sFc8f2kpYFZ7ZXVAj3PH95B5kTUnxmAcyldAma5bjQ2RpwzVsmD0IPUf myXiAnb2uTwl5zl2LLzNpVv/9a8+x0SSZalNNCRD1G0koT2LWQ28umcpT5gPzDmq5A BbDASFUBMyy/18a9qJnFP3X+MEmIzZ+ILSh3tAtEzRbBSnfc8Z340MLG6fi50kBKol I/u8Sx8Tq8qRhy3kfsUCAVFIzNOvyMvpL4kzzHnULgXt0yKBecoLMPKY/0poFuKNR5 q7wmbSwVJYQOw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-zehZEI7kwi329JaV4Q+P Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit %build-inputs does not exist when cross-compiling, so find bin/env by another way. * (openssl)[arguments]<#:phases>{configure}: Don't use '%build-inputs', use 'which' instead. --- gnu/packages/tls.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --=-zehZEI7kwi329JaV4Q+P Content-Disposition: attachment; filename="0021-openssl-Find-bin-env-when-cross-compiling.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0021-openssl-Find-bin-env-when-cross-compiling.patch"; charset="us-ascii" diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index c178806805..a4e754e27f 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -376,10 +376,10 @@ required structures.") (let* ((out #$output) (lib (string-append out "/lib"))) ;; It's not a shebang so patch-source-shebangs misses it. + ;; Don't use (assoc-ref %build-inputs "coreutils"), as + ;; %build-inputs is not defined when cross-compiling. (substitute* "config" - (("/usr/bin/env") - (string-append (assoc-ref %build-inputs "coreutils") - "/bin/env"))) + (("/usr/bin/env") (which "env"))) (invoke #$@(if (%current-target-system) #~("./Configure") #~("./config")) --=-zehZEI7kwi329JaV4Q+P-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:38:13 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:38:13 +0000 Received: from localhost ([127.0.0.1]:47565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofB-0004Fe-Rv for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:13 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:45738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofA-00049r-1g for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:08 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3e72500N0mfAB4013e7VT; Mon, 14 Jun 2021 17:38:07 +0200 Message-ID: <21aa622c4f4153b6b4d3c61118a3f08b98a9ab13.camel@telenet.be> Subject: [PATCH core-updates 22/37] openssl: Extract logic for computing CONFIGURE_TARGET_ARCH. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:38:07 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-avipg2rb04ublacEgsrv" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685087; bh=SB2vME/5ejSsqY2A+fZfvee8EhsMpmKKjvlHX221cOE=; h=Subject:From:To:Date:In-Reply-To:References; b=avcTg39Q8UF3nztM66WemRNpu7RSh9g8FP3PIUnxLVNgOLlzIebpT25uH0O1jSatO i1h1kT8pemU+lGqaCEgvRhlK8irdrqrYBjkxMoMJ2I0iRR9nqCPTmFXcqX0+UZ7xVe l7OY6Ee40DhCRqj4JqZOhZoYXugNwotDTCHkLmJDgM+2zqsezXwNM7LFDY//F4f02i fiZ+2/XC6+V9jVo8qwP6Jch39ntfLDj3to1o508OBOT0f2iNmWjsfVLaerlFCyw66F CNsPT5y6vGz/3c53Yyl21srigaUW8W3jViD+EjijOKuqOVGRQcGJ1WzKkAnmBy3Th4 /RJGwUg1CARlw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-avipg2rb04ublacEgsrv Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit By computing this value outside the build code, new targets can be added without causing rebuilds for other targets. * gnu/packages/tls.scm (target->openssl-target): New procedure. (openssl)[arguments]<#:phases>{set-cross-compile}: Use it. --- gnu/packages/tls.scm | 46 ++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 19 deletions(-) --=-avipg2rb04ublacEgsrv Content-Disposition: attachment; filename="0022-openssl-Extract-logic-for-computing-CONFIGURE_TARGET.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0022-openssl-Extract-logic-for-computing-CONFIGURE_TARGET.patch"; charset="us-ascii" diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index a4e754e27f..af91e42888 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -313,6 +313,31 @@ required structures.") (define-public guile3.0-gnutls (deprecated-package "guile3.0-gnutls" gnutls)) +(define (target->openssl-target target) + "Return the value to set CONFIGURE_TARGET_ARCH to when cross-compiling +OpenSSL for TARGET." + ;; Keep this code outside the build code, + ;; such that new targets can be added + ;; without causing rebuilds for other targets. + (cond ((string-prefix? "i586" target) + "hurd-x86") + ((string-prefix? "i686" target) + "linux-x86") + ((string-prefix? "x86_64" target) + "linux-x86_64") + ((string-prefix? "mips64el" target) + "linux-mips64") + ((string-prefix? "arm" target) + "linux-armv4") + ((string-prefix? "aarch64" target) + "linux-aarch64") + ((string-prefix? "powerpc64le" target) + "linux-ppc64le") + ((string-prefix? "powerpc64" target) + "linux-ppc64") + ((string-prefix? "powerpc" target) + "linux-ppc"))) + (define-public openssl (package (name "openssl") @@ -351,25 +376,8 @@ required structures.") (lambda* (#:key target #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) (setenv "CONFIGURE_TARGET_ARCH" - (cond - ((string-prefix? "i586" target) - "hurd-x86") - ((string-prefix? "i686" target) - "linux-x86") - ((string-prefix? "x86_64" target) - "linux-x86_64") - ((string-prefix? "mips64el" target) - "linux-mips64") - ((string-prefix? "arm" target) - "linux-armv4") - ((string-prefix? "aarch64" target) - "linux-aarch64") - ((string-prefix? "powerpc64le" target) - "linux-ppc64le") - ((string-prefix? "powerpc64" target) - "linux-ppc64") - ((string-prefix? "powerpc" target) - "linux-ppc")))))) + #$(target->openssl-target + (%current-target-system)))))) #~()) (replace 'configure (lambda _ --=-avipg2rb04ublacEgsrv-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:38:22 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:38:22 +0000 Received: from localhost ([127.0.0.1]:47569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofF-0004Fp-Pm for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:22 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:41494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofD-0004AR-Kv for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:12 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id H3eB250050mfAB4063eBzz; Mon, 14 Jun 2021 17:38:11 +0200 Message-ID: Subject: [PATCH core-updates 36/37] cross-base: Fix cross-compiler for i686-linux-gnu. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:38:11 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-oH9qGEQAoJZ+smm4Quia" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685091; bh=WplP20+eB7mSS6oq9iP70QmaGoawFZIEwLgO+cNm+aw=; h=Subject:From:To:Date:In-Reply-To:References; b=M1XL1VCQ/JIqJfNbS0E+jjEGp9cqx9B9fB0txie1AgAXUxAb5AQRgvD88WNQ9k0RO En0tkczhdEy4/WCw6sFBHe+OKv5ezM2iXm6L7G1z038m3McggMrJ7HgWQllHfnNq0H xrt+HMAChIYys8eCi+SQjSm+lw5aNm10sRWqP+ozt49IrSIQZcK8vS7hGxGZou5kut qG1gw+TteCEliKS14E37yzB8RbtAVsYqPVX76Y4fhXzZRO5Y6SGkkjTDge37o7oZ60 4yeIkKOil844KSaxQpq8feg/Qg60707NVQXm987e1fUvRp/DL4WojDnjkuaZhYysOq GUsUS/OfT8X4g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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 (-) --=-oH9qGEQAoJZ+smm4Quia Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit GCC doesn't find libgcc_s.so anymore and looks in the wrong location. Fix this (well, more a work-around really). * gnu/packages/cross-base.scm (cross-gcc-arguments)<#:configure-flags>: Add --with-toolexecdir, such that libstdc++ ends up in the right place. Add --with-slibdir such that libgcc_s.so end up in the right place. (cross-gcc-arguments)<#:phases>{move-shared-libraries}: New phase, moving libraries in the correct place. Delete .la files, libasan.so and libusan.so to prevent circular references. Likewise, fix a reference in libstdc++.so.VERSION-gdb.py. --- gnu/packages/cross-base.scm | 63 +++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 3 deletions(-) --=-oH9qGEQAoJZ+smm4Quia Content-Disposition: attachment; filename="0036-cross-base-Fix-cross-compiler-for-i686-linux-gnu.patch" Content-Transfer-Encoding: 8bit Content-Type: text/x-patch; name="0036-cross-base-Fix-cross-compiler-for-i686-linux-gnu.patch"; charset="UTF-8" diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 9487ac9238..995b4ae065 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2019, 2020, 2021 Marius Bakke ;;; Copyright © 2019 Carl Dong ;;; Copyright © 2020 Mathieu Othacehe +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,6 +34,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (srfi srfi-1) @@ -169,9 +171,26 @@ base compiler and using LIBC (which may be either a libc package or #f.)" )) ;; Install cross-built libraries such as libgcc_s.so in - ;; the "lib" output. + ;; the "lib" output. At least for version 8.4.0, GCC + ;; will put libstdc++ in ${toolexecdir}/lib instead. + ;; (A bug?) So set --with-toolexecdir as well. + ,@(if libc - `((string-append "--with-toolexeclibdir=" + `((string-append "--with-toolexecdir=" + (assoc-ref %outputs "lib")) + (string-append "--with-toolexeclibdir=" + (assoc-ref %outputs "lib") + "/" ,target "/lib")) + '()) + ;; At least for GCC 8.0, libgcc_s.so and libstdc++.so + ;; are not installed in the location specified in + ;; --with-toolexeclibdir so GCC will not find it + ;; when cross-compiling, say, GNU Hello. + ;; + ;; Work-around by specifying slibdir. This is not + ;; sufficient, see move-shared-libraries below. + ,@(if (and libc (version>=? (package-version xgcc) "8.0")) + `((string-append "--with-slibdir=" (assoc-ref %outputs "lib") "/" ,target "/lib")) '()) @@ -193,7 +212,45 @@ base compiler and using LIBC (which may be either a libc package or #f.)" ,flags)) flags)) ((#:phases phases) - `(cross-gcc-build-phases ,target ,phases)))))) + (if (and libc (version>=? (package-version xgcc) "8.0")) + #~(modify-phases (cross-gcc-build-phases #$target #$phases) + (add-after 'install 'move-shared-libraries + (lambda _ + (let* ((slib (format #f "~a/~a/lib/" #$output:lib #$target)) + (badlib (format #f "~a/~a/lib/" #$output #$target)) + (libs (map basename (find-files badlib #:fail-on-error? #t)))) + (for-each + (lambda (lib) + (let ((from (string-append badlib lib)) + (to (string-append slib lib))) + (when (file-exists? to) + (error "~a was found twice, refusing to overwrite!" + lib)) + ;; The debugging script libstdc++.so.VERSION-gdb.py has + ;; reference to #$output. Correct it. + (when (string-suffix? "-gdb.py" lib) + (substitute* from + (("libdir = '(.*)'") + (string-append "libdir = '" slib "'"))) + (system* "cat" from)) + ;; The .la files have references to BADLIB, + ;; leading to cyclic references between + ;; the outputs of the package. Remove them + ;; and hope noone notices. + ;; + ;; Likewise, libasan.so.* and libubsan.so.* + ;; have references to #$output. + (if (or (string-suffix? ".la" lib) + (string-prefix? "libasan.so" lib) + (string-prefix? "libubsan.so" lib)) + (delete-file from) + (rename-file from to)))) + libs) + ;; If you have "cyclic references" problems, + ;; uncomment this and use --keep-failed to figure + ;; things out. + (copy-recursively #$output:lib "out-test"))))) + #~(cross-gcc-build-phases #$target #$phases))))))) (define (cross-gcc-patches xgcc target) "Return GCC patches needed for XGCC and TARGET." --=-oH9qGEQAoJZ+smm4Quia-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:38:23 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:38:23 +0000 Received: from localhost ([127.0.0.1]:47575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofO-0004GF-QF for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:23 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:45738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofH-00049r-MG for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:16 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3eF250050mfAB4013eFYK; Mon, 14 Jun 2021 17:38:15 +0200 Message-ID: <1c6f166aa09333a575a5249fdb395cf1b59ad947.camel@telenet.be> Subject: [PATCH core-updates 04/37] net-base: Make #:builder argument a G-expression. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:38:15 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-NWGIT1MGPe7D4qTZCzlE" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685095; bh=F0LQlc52A3WRTY1kOYijXentyYV4rzyXJT81/RjV9wU=; h=Subject:From:To:Date:In-Reply-To:References; b=nfeFq8/nU01K99gdGFZKmFaHIfxQTU7E6T4z4Gmm99o8K0K8pAF4izb5zf+a1SuJH QuQIWnefCoRYKMC3jWfJjW1+tbyf2TCtLTCImMmH3CAdU5nAQTwbfsH7aNCZv2kgRy iseAlSH6nZllQgwaWDqfYmXzNATR53L86g3uYTD96DsQ6f3sbUKEACFTbDOzXQt1PQ eBltrYL00WqIxuHnQ1nAn2shkWoFNCmWjAM1AcuWz0JxifPyv0bEsRe3M2PxJCw3ep Fl5N/LXe/yx9AZ0xs1IoIOetx7SS7zwhK85zzdAqQfjjTx7ge15wRzJ+4ptW2D24mW NRKT2JV5+g7lA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-NWGIT1MGPe7D4qTZCzlE Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit This allows using ungexp-native and this-package-native-input later. * gnu/packages/admin.scm (net-base)[arguments]{#:builder}: Make this a G-expression. --- gnu/packages/admin.scm | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) --=-NWGIT1MGPe7D4qTZCzlE Content-Disposition: attachment; filename="0004-net-base-Make-builder-argument-a-G-expression.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0004-net-base-Make-builder-argument-a-G-expression.patch"; charset="us-ascii" diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 531686fdbb..5c7e41f51b 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -74,6 +74,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (gnu packages) #:use-module (gnu packages algebra) #:use-module (gnu packages autogen) @@ -936,25 +937,25 @@ to allow automatic login and starting any app.") (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) - #:builder (begin - (use-modules (guix build utils) - (srfi srfi-26)) - - (let* ((source (assoc-ref %build-inputs "source")) - (tar (assoc-ref %build-inputs "tar")) - (xz (assoc-ref %build-inputs "xz")) - (output (assoc-ref %outputs "out")) - (etc (string-append output "/etc"))) - (setenv "PATH" (string-append xz "/bin")) - (invoke (string-append tar "/bin/tar") "xvf" - source) - (chdir ,(string-append "netbase-" version)) - (mkdir-p etc) - (for-each copy-file - '("etc-services" "etc-protocols" "etc-rpc") - (map (cut string-append etc "/" <>) - '("services" "protocols" "rpc"))) - #t)))) + #:builder ,#~(begin + (use-modules (guix build utils) + (srfi srfi-26)) + + (let* ((source (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar")) + (xz (assoc-ref %build-inputs "xz")) + (output (assoc-ref %outputs "out")) + (etc (string-append output "/etc"))) + (setenv "PATH" (string-append xz "/bin")) + (invoke (string-append tar "/bin/tar") "xvf" + source) + (chdir #$(string-append "netbase-" version)) + (mkdir-p etc) + (for-each copy-file + '("etc-services" "etc-protocols" "etc-rpc") + (map (cut string-append etc "/" <>) + '("services" "protocols" "rpc"))) + #t)))) (native-inputs `(("tar" ,tar) ("xz" ,xz))) (synopsis "IANA protocol, port, and RPC number assignments") --=-NWGIT1MGPe7D4qTZCzlE-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:38:23 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:38:23 +0000 Received: from localhost ([127.0.0.1]:47577 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofP-0004GM-5L for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:23 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:37390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofL-0004Ah-PZ for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:20 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id H3eK2500B0mfAB4063eKFS; Mon, 14 Jun 2021 17:38:19 +0200 Message-ID: <1d2e246e4d21a5b3d7b4232478d51b04bbf9434e.camel@telenet.be> Subject: [PATCH core-updates 05/37] net-base: Fix cross-compilation, eliminating %build-inputs & friends From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:38:19 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-lSes7Ookdzmcs3uBiRIC" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685099; bh=r4nFZNWcGI3MO/Oqsl7UNynuqHxLQ4x318YLbObD7zA=; h=Subject:From:To:Date:In-Reply-To:References; b=JLVeY3WOPqETBVBCNdWJmt+VJME2OKHemYWkL2zqpmUeib5sVjEwS5MiOSD6NoN9T l+YmO/cPkIWwjDzxgg3wgqFtXUD0sZi21Q6+9Yi8NPrLtGjMTI4CLADU0v/o3qHy6a F22hZ/bgiE3zYguNK171XCzmROrVNgjKVK+wdYRTSROHkKV+4e2gGFGaIYByh3e3zo 44FTuDz5mGtABKuEDjEPtB1lwYgLgtOcZLrzauAgNilFOLN9ZAuk50gJnh6q6DPW96 Rf3tG85VZh+DjvPawCqSMBCTN/FJ4rSHaYtoAeAoBoJbru0YDL+lFCBEpawsDkgFbJ D4RJvtMU+SSKQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-lSes7Ookdzmcs3uBiRIC Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit "source" is not in %build-inputs when cross-compiling, so another approach for referring to the package source code is needed. * gnu/packages/admin.scm (net-base)[arguments]<#:builder>: Eliminate %build-inputs and %outputs. --- gnu/packages/admin.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --=-lSes7Ookdzmcs3uBiRIC Content-Disposition: attachment; filename="0005-net-base-Fix-cross-compilation-eliminating-build-inp.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0005-net-base-Fix-cross-compilation-eliminating-build-inp.patch"; charset="us-ascii" diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 5c7e41f51b..f499a1252b 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -941,10 +941,10 @@ to allow automatic login and starting any app.") (use-modules (guix build utils) (srfi srfi-26)) - (let* ((source (assoc-ref %build-inputs "source")) - (tar (assoc-ref %build-inputs "tar")) - (xz (assoc-ref %build-inputs "xz")) - (output (assoc-ref %outputs "out")) + (let* ((source #+(package-source this-package)) + (tar #+(this-package-native-input "tar")) + (xz #+(this-package-native-input "xz")) + (output #$output) (etc (string-append output "/etc"))) (setenv "PATH" (string-append xz "/bin")) (invoke (string-append tar "/bin/tar") "xvf" --=-lSes7Ookdzmcs3uBiRIC-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:38:25 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:38:25 +0000 Received: from localhost ([127.0.0.1]:47581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofR-0004Gf-Ex for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:25 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:45738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofP-00049r-RR for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:24 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3eP250040mfAB4013ePZK; Mon, 14 Jun 2021 17:38:23 +0200 Message-ID: Subject: [PATCH core-updates 06/37] net-base: Don't cross-compile. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:38:23 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-bEIAu+5HtWRTT/dCuNJW" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685103; bh=D6h4efNC/N0zpFdlOyJY4D28DmCroi3j7Er55HedB14=; h=Subject:From:To:Date:In-Reply-To:References; b=VqOQnmtzUdWlXTTwCrlHVFWuXWoKOryq1fWYwrDvWDTk6q6cO255tnx7lHRifE5+r vVQKsD0QyQ0sZ1T3I/4CgTkA30FXtnBBpvEmBXNp2gJVuVBvi246IL7SrxWKLOLdnw OHbhROOfO0Z9LMctv1bauSfGC9FphIYw8lgHNOU//rURnX3eGfM0OIlFBewBBCmiYv o3whY7x9Fqul8lTovcFa4VUAyzd4G4FWrZCwO07mboiF/bYQGBQF04YOkxPkeFomws /iWT0lX/AQiyR8iUAVSUOya3ggizLhTg9xM7gseNJMHF/wNsj9di5RGSJ682BIYo0A Gbp2J0VyXDu4A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-bEIAu+5HtWRTT/dCuNJW Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit net-base is pure data, so cross-compiling is pointless. * gnu/packages/admin.scm (net-base)[arguments]<#:target>: Set to #f. (net-base)[arguments]<#:allowed-references>: Disallow all references. --- gnu/packages/admin.scm | 5 +++++ 1 file changed, 5 insertions(+) --=-bEIAu+5HtWRTT/dCuNJW Content-Disposition: attachment; filename="0006-net-base-Don-t-cross-compile.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0006-net-base-Don-t-cross-compile.patch"; charset="us-ascii" diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index f499a1252b..5e41ba9967 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -937,6 +937,11 @@ to allow automatic login and starting any app.") (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) + ;; This package consists solely of architecture-independent + ;; tables. Cross-compilation is pointless! Make sure we'll + ;; always get the same derivation. + #:target #f + #:allowed-references () #:builder ,#~(begin (use-modules (guix build utils) (srfi srfi-26)) --=-bEIAu+5HtWRTT/dCuNJW-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:38:35 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:38:36 +0000 Received: from localhost ([127.0.0.1]:47587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofY-0004Gz-M6 for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:35 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:41494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofX-0004AR-Qb for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:32 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id H3eX250080mfAB4063eX3f; Mon, 14 Jun 2021 17:38:31 +0200 Message-ID: Subject: [PATCH core-updates 24/37] readline: Fix build error when cross-compiling. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:38:31 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-Cj6srlUTSTwtPQPD9N94" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685111; bh=RKxkeCHfovsAToDBHfs64Zan6oKgzXW30j7DLxYwIyo=; h=Subject:From:To:Date:In-Reply-To:References; b=YyHJPyLZgXSXnnDpUnxQHuR/H3rgGYDxxtovR+eMDxG7qgv7jlFLs270hekq05O/J Uzc6BoZZ4Z7Q6Sy+Zix5yC/AMhfPppMOexHC+Gx5Yht4Y0SYBs0flQS8XeFJuykQqN ncpFryNHpWCUlfP9VlmRahiOZv3PjqcltAAw0tdSVwXZI2fIPkhxBD17mY3XRO/TkG yvtH9YvoeFxNymq0rPtphtrbAhUCYlqtmHRF5mGyRg0+U4JUnrYNyalSYn+Ay7JD+Z kY0dMuGXUcIgKNKh51cTD6EnJN0ar2B6nnrIwuGIGW7VCv07Vysa9booyzS5Y3FY+f cJ/4Llgm3XQ1A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-Cj6srlUTSTwtPQPD9N94 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit %build-inputs does not exist when cross-compiling, so use this-package-input instead. * gnu/packages/readline.scm (readline)[arguments]<#:configure-flags>: Use this-package-input instead of %build-inputs. --- gnu/packages/readline.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --=-Cj6srlUTSTwtPQPD9N94 Content-Disposition: attachment; filename="0024-readline-Fix-build-error-when-cross-compiling.patch" Content-Transfer-Encoding: 8bit Content-Type: text/x-patch; name="0024-readline-Fix-build-error-when-cross-compiling.patch"; charset="UTF-8" diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm index 6cfa24c666..f9f2797247 100644 --- a/gnu/packages/readline.scm +++ b/gnu/packages/readline.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019, 2020 Marius Bakke +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -77,9 +78,10 @@ (build-system gnu-build-system) (propagated-inputs `(("ncurses" ,ncurses))) (arguments `(#:configure-flags - ,#~(list (string-append "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib") + ,#~(list (string-append + "LDFLAGS=-Wl,-rpath -Wl," + #$(this-package-input "ncurses") + "/lib") ;; This test does an 'AC_TRY_RUN', which aborts when ;; cross-compiling, so provide the correct answer. --=-Cj6srlUTSTwtPQPD9N94-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:38:40 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:38:40 +0000 Received: from localhost ([127.0.0.1]:47591 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoff-0004HH-UC for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:40 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:37390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofe-0004Ah-FP for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:38 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id H3ed2500R0mfAB4063eeJi; Mon, 14 Jun 2021 17:38:38 +0200 Message-ID: <41a77275fd874e715de39219e0d1798d71519164.camel@telenet.be> Subject: [PATCH core-updates 25/37] bash: Make #:configure-flags a G-expression. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:38:37 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-SPIxnxJg3ZFpC2Hjki3P" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685118; bh=5xbDPLdRjbOi0V9Px4ElNJStLkpmVkRsZpnjmjhWdEA=; h=Subject:From:To:Date:In-Reply-To:References; b=m7lzH2Rcys+hS+YbAAglLLIhcl0IG5TQvLhu3I6Tk28MOma7rzEzT4DfuNpuYOKFj XWKNylFUrfWj35uz05AgKD4vSa3L+6GiKL1TU6e+o7fKkMarl1FH+lT16pOXRyI78r Dp7Jne55kxLiYP7gvYEMQ5aRmby3j6Ib5yCyOSppxP3JtxMkL7RXL8aUCvI9B9ew61 LpS2M0kMvoeC9iAE4mONE9IHFzlOyfL3aJMYcGzoa7yqWnyrLBWGmtI3+LA5QUvv7k xQy8MuDsxdS4PdlUz2pOr1hGd6hC5Xyrb0TKC5yA4e+s+DBUkpYL6D2bCe2DhGasz6 08bFI0YT4tc+g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-SPIxnxJg3ZFpC2Hjki3P Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit This allows using this-package-input later. * gnu/packages/bash.scm (bash)[arguments]<#:configure-flags>: Make this a G-expression instead of a raw S-expression. --- gnu/packages/bash.scm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) --=-SPIxnxJg3ZFpC2Hjki3P Content-Disposition: attachment; filename="0025-bash-Make-configure-flags-a-G-expression.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0025-bash-Make-configure-flags-a-G-expression.patch"; charset="us-ascii" diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 7e98367bbb..b3af873a66 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -109,15 +109,15 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." "-DSSH_SOURCE_BASHRC") " ")) (configure-flags - ``("--with-installed-readline" - ,,(string-append "CPPFLAGS=" cppflags) - ,(string-append - "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "readline") - "/lib" - " -Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib"))) + #~`("--with-installed-readline" + ,#$(string-append "CPPFLAGS=" cppflags) + ,(string-append + "LDFLAGS=-Wl,-rpath -Wl," + (assoc-ref %build-inputs "readline") + "/lib" + " -Wl,-rpath -Wl," + (assoc-ref %build-inputs "ncurses") + "/lib"))) (version "5.1")) (package (name "bash") @@ -143,8 +143,8 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." `(;; When cross-compiling, `configure' incorrectly guesses that job ;; control is missing. #:configure-flags ,(if (%current-target-system) - `(cons* "bash_cv_job_control_missing=no" - ,configure-flags) + #~(cons* "bash_cv_job_control_missing=no" + #$configure-flags) configure-flags) ;; Bash is reportedly not parallel-safe. See, for instance, --=-SPIxnxJg3ZFpC2Hjki3P-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:38:47 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:38:47 +0000 Received: from localhost ([127.0.0.1]:47597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofn-0004Hc-5e for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:47 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:41494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofm-0004AR-6V for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:46 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id H3el2500L0mfAB4063el5Y; Mon, 14 Jun 2021 17:38:45 +0200 Message-ID: <008530a77ab5e357e737ff63d4594ceeaaf76a62.camel@telenet.be> Subject: [PATCH core-updates 27/37] fontconfig: Make the #:configure-flags argument a G-expression. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:38:45 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-ls0KfjzsSNYOseiZxrHR" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685125; bh=Tob/oPvFnoA1kgM2N+Dv+i+7eWQPp7DgUwlFvYv3VIo=; h=Subject:From:To:Date:In-Reply-To:References; b=q2ppO3lttRap0x8sBFTlRtsXbgxiwU8E9JV14jzx5s6fibMMGCJqr7Bg84EfNEtdf 5uhPvXM6n/SvNpb8zqEYPnE5tGTYsOsi63yHLiToIv0bbUK/PXoDTvYlL5tAmfbYV6 LZfy/idDKgK8KXYpaa1MXNDtPb04tT8m9Z6ruPWPVqo0XRt1SqT24/y3kTL6zA55gM gfCyG/9ZI09oyyrbdfkMPoTTeTirJhsWsPyFYCD7123l+1s6wznu6x9Cvc2FIhiqv0 phzHOiBhbdFfaqVjpEwlRymcu0f4MMAlzUNS6bygG8wKdZobNh4acLCwpMg/PLQC3J zEAH1fvIG+JRw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-ls0KfjzsSNYOseiZxrHR Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit This allows using #$(this-package-input ...) later. * gnu/packages/fontutils.scm (fontconfig)[arguments]<#:configure-flags>: Make this a G-expression instead of a raw S-expression. (fontconfig-with-documentation)[arguments]<#:configure-flags>: Likewise. --- gnu/packages/fontutils.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --=-ls0KfjzsSNYOseiZxrHR Content-Disposition: attachment; filename="0027-fontconfig-Make-the-configure-flags-argument-a-G-exp.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0027-fontconfig-Make-the-configure-flags-argument-a-G-exp.patch"; charset="us-ascii" diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index dbce5beba8..234f11129a 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -64,6 +64,7 @@ #:use-module (gnu packages xorg) #:use-module (gnu packages tex) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix svn-download) @@ -347,6 +348,7 @@ Font Format (WOFF).") ("python" ,python-minimal))) ;to avoid a cycle through tk (arguments `(#:configure-flags + ,#~ (list "--disable-docs" "--with-cache-dir=/var/cache/fontconfig" ;; register the default fonts @@ -400,7 +402,7 @@ high quality, anti-aliased and subpixel rendered text on a display.") (arguments (substitute-keyword-arguments (package-arguments fontconfig) ((#:configure-flags configure-flags) - `(delete "--disable-docs" ,configure-flags)) + #~(delete "--disable-docs" #$configure-flags)) ((#:phases phases '%standard-phases) `(modify-phases ,phases (add-after 'install 'move-man-sections --=-ls0KfjzsSNYOseiZxrHR-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:38:51 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:38:51 +0000 Received: from localhost ([127.0.0.1]:47601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofr-0004Hu-D4 for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:51 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:37390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofq-0004Ah-9p for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:50 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id H3ep2500X0mfAB4063epME; Mon, 14 Jun 2021 17:38:50 +0200 Message-ID: <945171e6c288773a500fa10ffa6dd945fdf1172f.camel@telenet.be> Subject: [PATCH core-updates 28/37] fontconfig: Fix build error when cross-compiling. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:38:49 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-gy0/o24kN7mUSKbtI+L0" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685130; bh=1XnIP0FFB67ygBf4Lh4m4zUhIvtCGWYv89LLbNkPgnc=; h=Subject:From:To:Date:In-Reply-To:References; b=Q6D1YX89wNVaBemq8wSP9fsi6vcsCdXhJjSdLQ3qajNZRKgnj3mUtADmhpUKwu7P9 P9gBptul/Y/aLaZoQsZAH5sH9RzOF7CAGshaNsOJ1edZMy8A4mY4MBIJaxPKr07ql7 WwvCWpdEXfAFPAzJYFj1cPdrsai6XZgW5ndIMQWVO3bar0oPHIQr6tYlDOc+O2DDaV fEDrzL0M+Zyl/qqVoLGZUn2up6jJcb5/vr/p5v9/uqIgL1dTqWmuIkEJbmDn/fXQlx E18kMNOsMq1Cc4ZiJygd0I/8ZdASrVBhV7jHDgquQNDQf3YPI8uUL2WRXqtlPobFMd HTDhMaAcETEZg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-gy0/o24kN7mUSKbtI+L0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit %build-inputs does not exist when cross-compiling, so use #$(this-package-input ...) instead. * gnu/packages/fontutils.scm (fontconfig)[arguments]<#:configure-flags>: Use this-package-input instead of %build-inputs. --- gnu/packages/fontutils.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --=-gy0/o24kN7mUSKbtI+L0 Content-Disposition: attachment; filename="0028-fontconfig-Fix-build-error-when-cross-compiling.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0028-fontconfig-Fix-build-error-when-cross-compiling.patch"; charset="us-ascii" diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 234f11129a..b0d40efeae 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -353,8 +353,8 @@ Font Format (WOFF).") "--with-cache-dir=/var/cache/fontconfig" ;; register the default fonts (string-append "--with-default-fonts=" - (assoc-ref %build-inputs "font-dejavu") - "/share/fonts") + #$(file-append (this-package-input "font-dejavu") + "/share/fonts")) ;; Register fonts from user and system profiles. (string-append "--with-add-fonts=" --=-gy0/o24kN7mUSKbtI+L0-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:39:02 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:39:03 +0000 Received: from localhost ([127.0.0.1]:47607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofy-0004ID-Jw for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:02 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:41494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofw-0004AR-CA for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:56 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id H3ev2500X0mfAB4063ew7D; Mon, 14 Jun 2021 17:38:56 +0200 Message-ID: Subject: [PATCH core-updates 29/37] glib: Use a correct python in scripts when cross-compiling. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:38:55 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-KoXuNUQJ6COvEDNZqeuQ" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685136; bh=XiQuYZveIJ8Rgxyv4aIZHjDU0wzSbBF/g7pC1SfJSRI=; h=Subject:From:To:Date:In-Reply-To:References; b=GtzJBWiu5ttlKxOPjLakC1XDko/JpnVb1A8x3XGjPndIMuvup2QsTUxRoVPYv/I+J DtiQ6vxhxDSRKUd/FE1o0VcarDgcf1IdKOJNUj9pjO3OuM0z6osNZAbYhA5zIRf7PX NE08p2EgEe08TXIudQ9/8uHnzoGHVELp42BhwHHYry07Fi/W5BFaS324y4kgLzj2AR ZWlBtfkUIx3wirwo7eBn6zZH04DwPLFRAq9Krn8Q/gutZwXagcFTNMl0HPrA8MYX2U s/aGUtsMQKhBDbDCVgezJ+kt35c1InSr2qkukapy2cpd7iY3eX+2bnnoWgDhrIi0gc lryl6adwIXYqg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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 (-) --=-KoXuNUQJ6COvEDNZqeuQ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit During the build, a native python should be used as these scripts will be invoked during the build, but when installed, they should be a python for the system we're compiling for. * gnu/packages/glib.scm (glib)[arguments]<#:phases>{patch-python-references}: Look up "python" in 'native-inputs', not 'inputs'. (glib)[inputs]{python,python-wrapper,bash-minimal}: New inputs. --- gnu/packages/glib.scm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) --=-KoXuNUQJ6COvEDNZqeuQ Content-Disposition: attachment; filename="0029-glib-Use-a-correct-python-in-scripts-when-cross-comp.patch" Content-Transfer-Encoding: 8bit Content-Type: text/x-patch; name="0029-glib-Use-a-correct-python-in-scripts-when-cross-comp.patch"; charset="UTF-8" diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 94276ae0ef..25c5ae494b 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2020 Florian Pelz ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020 Arthur Margerit +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -222,14 +223,19 @@ shared NFS home directories.") #t)) ;; Python references are not being patched in patch-phase of build, ;; despite using python-wrapper as input. So we patch them manually. + ;; + ;; These python scripts are both used during build and installed, + ;; so at first, use a python from 'native-inputs', not 'inputs'. When + ;; cross-compiling, the 'patch-shebangs' phase will replace + ;; the native python with a python from 'inputs'. (add-after 'unpack 'patch-python-references - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs #:allow-other-keys) (substitute* '("gio/gdbus-2.0/codegen/gdbus-codegen.in" "glib/gtester-report.in" "gobject/glib-genmarshal.in" "gobject/glib-mkenums.in") (("@PYTHON@") - (string-append (assoc-ref inputs "python") + (string-append (assoc-ref (or native-inputs inputs) "python") "/bin/python" ,(version-major+minor (package-version python))))) @@ -282,6 +288,13 @@ shared NFS home directories.") ("xsltproc" ,libxslt))) (inputs `(("bash-completion" ,bash-completion) + ;; "python", "python-wrapper" and "bash-minimal" + ;; are for the 'patch-shebangs' phase, to make + ;; sure the installed scripts end up with a correct shebang + ;; when cross-compiling. + ("python" ,python) + ("python-wrapper" ,python-wrapper) + ("bash-minimal" ,(canonical-package bash-minimal)) ("dbus" ,dbus) ("libelf" ,libelf))) (propagated-inputs --=-KoXuNUQJ6COvEDNZqeuQ-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:39:03 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:39:03 +0000 Received: from localhost ([127.0.0.1]:47614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsog2-0004Iq-TA for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:03 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:37390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsog0-0004Ah-O0 for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:01 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id H3f02500A0mfAB4063f0PC; Mon, 14 Jun 2021 17:39:00 +0200 Message-ID: Subject: [PATCH core-updates 07/37] tzdata: Don't bother with cross-compiling. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:39:00 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-92s4pyKatONqe5HoHr2B" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685140; bh=MlMuHMqYDzhc6XFq5e0TxsPJU9BAD9W8k4lWlfe8A48=; h=Subject:From:To:Date:In-Reply-To:References; b=KjI9MyRuMv7cSsiIR8WKuFPzOlydhPy0pX6ARFXrEGBLpYIYzyURSgtZssrMNlBWF UTerOK+f8eT0HyTjnRWxKIOr0k3Wtb/3vuOL/nZFCgsnp5hBWbL1sVr6wHgXp4f5Rk I5td4NeUNxwgZAP0+ecN7TbTRIzj1A3qEwHd5QA0Rn6e4rQZFjM+fdD5EY3fFv36qV ICA2o+t9mZfWavQcBwzqUS61P+wuzBHnDSBYhswrxCQLtWGYSgE5rTC2Bzc7pEQhEu WpjiVHTqDB2xnmybb03sT/M9BY94aH0Zti53olawVKDLNzIbYHE4x2PRzHa9fLDOHU twWgBA+oNY6Tw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-92s4pyKatONqe5HoHr2B Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit The time zone database is architecture-independent, so trying to cross-compile it is pointless! * gnu/packages/base.scm (tzdata)[arguments]<#:target>: Set to #f. (tzdata)[allowed-references]: Only include the "out" output itself, to make sure no (architecture-dependent) binaries are installed. --- gnu/packages/base.scm | 9 +++++++++ 1 file changed, 9 insertions(+) --=-92s4pyKatONqe5HoHr2B Content-Disposition: attachment; filename="0007-tzdata-Don-t-bother-with-cross-compiling.patch" Content-Transfer-Encoding: 8bit Content-Type: text/x-patch; name="0007-tzdata-Don-t-bother-with-cross-compiling.patch"; charset="UTF-8" diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index d30299a7b6..2674be8048 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2020 Vitaliy Shatrov ;;; Copyright © 2020 Chris Marusich ;;; Copyright © 2021 Leo Le Bouter +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -1251,6 +1252,14 @@ command.") (build-system gnu-build-system) (arguments `(#:tests? #f + ;; This consists purely of (architecture-independent) data, + ;; so ‘cross-compilation’ is pointless here! + ;; (The binaries zic, dump, and tzselect are deleted in the post-install + ;; phase.) + #:target #f + ;; share/zoneinfo/posix is a symlink to share/zoneinfo, + ;; so include the package itself in #:allowed-references. + #:allowed-references ("out") #:make-flags (let ((out (assoc-ref %outputs "out")) (tmp (getenv "TMPDIR"))) (list (string-append "TOPDIR=" out) --=-92s4pyKatONqe5HoHr2B-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:39:06 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:39:06 +0000 Received: from localhost ([127.0.0.1]:47626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsog6-0004KA-CU for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:06 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:41494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsog5-0004AR-0a for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:05 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id H3f42500b0mfAB4063f48W; Mon, 14 Jun 2021 17:39:04 +0200 Message-ID: <5e7f30def92fa5a6403df07ca2f2f2e0434b6679.camel@telenet.be> Subject: [PATCH core-updates 30/37] glib: Verify the cross-compiled python is used in installed scripts. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:39:04 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-htIa/mOHt1rgD2wJaMcw" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685144; bh=ZU3ezvbLj96kkByIv7FSVytM9buN8I0jjvsF//5h2gI=; h=Subject:From:To:Date:In-Reply-To:References; b=ULHSb2pq37bP0mquCTR6oBB2yyEg2wRPV/F06hMqyXTBud/oKe2YoZxTO8zsPTa5Z DdnFgn4PsimzgZskcKsMkU7V2zoUKQIjZhUT3myIF3xZmgM3B8VABldPKXz4Qynh+X nrKfUZwZXwrw9Uei02Co1AWD1D4DBEmGykTSAvpCqr48H+uKr587mSvTuD6/E/wEgM N/NfYawss1/xxk5hU75DN87MMYwirGXIag9cR7urpUiB7czurA7RdsdjPMcDk1niLp G62k5QW3whENfh2ctfRRCN7QTT6/AjPBmews93JHap9uyiE/3xj5o7mOmA0Mvifrrg 8zHzZUyc7UNtw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-htIa/mOHt1rgD2wJaMcw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit * gnu/packages/glib.scm (glib)[arguments]<#:disallowed-references>: Disallow the native python when cross-compiling. --- gnu/packages/glib.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) --=-htIa/mOHt1rgD2wJaMcw Content-Disposition: attachment; filename="0030-glib-Verify-the-cross-compiled-python-is-used-in-ins.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0030-glib-Verify-the-cross-compiled-python-is-used-in-ins.patch"; charset="us-ascii" diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 25c5ae494b..244544ea6f 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -77,6 +77,8 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix gexp) + #:use-module (srfi srfi-26) #:use-module ((srfi srfi-1) #:hide (zip)) ;; Export variables up-front to allow circular dependency with the 'xorg' @@ -200,7 +202,15 @@ shared NFS home directories.") (outputs '("out" ; everything "bin")) ; glib-mkenums, gtester, etc.; depends on Python (arguments - `(#:disallowed-references (,tzdata-for-tests) + `(#:disallowed-references + (,tzdata-for-tests + ;; Verify glib-mkenums, gtester, ... use the cross-compiled + ;; python. + ,@(if (%current-target-system) + (map (cut gexp-input <> #:native? #t) + `(,(this-package-native-input "python") + ,(this-package-native-input "python-wrapper"))) + '())) #:configure-flags '("-Dman=true" "-Dselinux=disabled") #:phases --=-htIa/mOHt1rgD2wJaMcw-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:39:14 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:39:14 +0000 Received: from localhost ([127.0.0.1]:47632 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsogE-0004KZ-Kt for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:14 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:41494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsogD-0004AR-AR for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:13 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id H3fC2500Z0mfAB4063fC9m; Mon, 14 Jun 2021 17:39:13 +0200 Message-ID: <67bd5a45aa9417d5cd4951bb81f735009e394d33.camel@telenet.be> Subject: [PATCH core-updates 20/37] openssl: Move all man pages to separate output, not only man3. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:39:12 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-xgshwpmWnyQyUugJIl1T" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685153; bh=YefIBm54JXiBA/lxKUazz/VHLkxjp6CMX+RuiX1svAk=; h=Subject:From:To:Date:In-Reply-To:References; b=jLk8Z04GLMTvUwy/kyla1ypvxEsJlJoIv1lUcAaDnTcLAxDQdcacc35DBSIh2nzcd B77TifN5ONC/FiCbb2h5oEFRVtMIaDMbIYj0n5OQbPPV45+zDuUMLzT2YNRk5r4IL9 qf+FVgOZbZTkmXHMqrYpLQNPwzG9s5I2px2cIdRvKWZExrDKsSTK/GyFi6TAefJe9V 8cyAXEz8IgsDyCT2H5enCNgxCSW8sRzUNMkToKsB6XaTmLaZeFrqnSTbsnNPxeY0CR SQQdz8ELTBAjmXQIEXlrPJPX4xwCWHpJtMBMi6bgcbtRad720KbtPRm5wLMFOrByJf 38lK3FverX8OA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-xgshwpmWnyQyUugJIl1T Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit There does not seem to be any reason to only move man3 pages. So, move all man pages to a separate output for documentation. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>{move-extra-documentation}: Move all man pages, not only man3. --- gnu/packages/tls.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --=-xgshwpmWnyQyUugJIl1T Content-Disposition: attachment; filename="0020-openssl-Move-all-man-pages-to-separate-output-not-on.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0020-openssl-Move-all-man-pages-to-separate-output-not-on.patch"; charset="us-ascii" diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 9aa0b5a212..c178806805 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -411,16 +411,16 @@ required structures.") (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation (lambda _ - ;; Move man3 pages and full HTML documentation to "doc". + ;; Move man pages and full HTML documentation to "doc". (let* ((out #$output) - (man3 (string-append out "/share/man/man3")) - (html (string-append out "/share/doc/openssl")) + (man (string-append out "/share/man")) + (html (string-append out "/share/doc/openssl")) (doc #$output:doc) - (man-target (string-append doc "/share/man/man3")) + (man-target (string-append doc "/share/man")) (html-target (string-append doc "/share/doc/openssl"))) - (mkdir-p (dirname man3-target)) + (mkdir-p (dirname man-target)) (mkdir-p (dirname html-target)) - (rename-file man3 man-target) + (rename-file man man-target) (rename-file html html-target)))) (add-after 'install 'remove-miscellany --=-xgshwpmWnyQyUugJIl1T-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:39:27 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:39:28 +0000 Received: from localhost ([127.0.0.1]:47638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsogM-0004Kt-SS for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:27 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:37390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsogK-0004Ah-Cr for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:21 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by albert.telenet-ops.be with bizsmtp id H3fK2500S0mfAB4063fLSU; Mon, 14 Jun 2021 17:39:20 +0200 Message-ID: Subject: [PATCH core-updates 34/37] libelf: Use the cross-compiler when cross-compiling. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:39:19 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-rzTq2iiViFMq7VwzQ9gi" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685160; bh=DabbH4RUth/E4FzEFM3DBGQcqxP4ogR++HjfYem7CfE=; h=Subject:From:To:Date:In-Reply-To:References; b=EhBHCdXsD6GXMszf53HfyxeF59cUe9B87NTduV2Y6p/PAqt2kXZYBvnM/6sQljHR8 jKGlFQkBS/qr1EhG+P4Rj3KLYURYsDeevNv99KTCduePAKPS+w8EKyBLKuPHSDtUZn CVX2hmxPAFQnfC40eOXSPrnSjfYV1n+BCzanjyiuLNBhUdSTmJ/MBMngge+SLTADOU peRGWbG8z3xz1rvk658eWi+phVmM3OLccoMN5tYe/0vh+opYtEL0rLwMXwZHPp1yMq 3CNJajijbIl+o/pbmTBdmI/HmgDVoM7lTz0kEvw3gaRwx20irLibR7Ke5cUpNBPy3P 3gOZPIUdZStgA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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 (-) --=-rzTq2iiViFMq7VwzQ9gi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit * gnu/packages/elf.scm (libelf)[arguments]<#:phases>{delete-configure}: Regenerate the configure script when cross-compiling. (libelf)[arguments]<#:phases>{configure}: Do not replace when cross-compiling. (libelf)[native-inputs]: Add autoconf when cross-compiling. --- gnu/packages/elf.scm | 48 +++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 16 deletions(-) --=-rzTq2iiViFMq7VwzQ9gi Content-Disposition: attachment; filename="0034-libelf-Use-the-cross-compiler-when-cross-compiling.patch" Content-Transfer-Encoding: 8bit Content-Type: text/x-patch; name="0034-libelf-Use-the-cross-compiler-when-cross-compiling.patch"; charset="UTF-8" diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index 0309dd95b5..66c2334e5c 100644 --- a/gnu/packages/elf.scm +++ b/gnu/packages/elf.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2020 Mark Wielaard ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2021 Leo Le Bouter +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -32,6 +33,7 @@ #:use-module (guix build-system gnu) #:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+)) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages compression) #:use-module (gnu packages documentation) #:use-module (gnu packages gcc) @@ -205,22 +207,36 @@ static analysis of the ELF binaries at hand.") (arguments `(#:phases (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - ;; This old `configure' script doesn't support - ;; variables passed as arguments. - (let ((out (assoc-ref outputs "out"))) - (setenv "CONFIG_SHELL" (which "bash")) - (invoke "./configure" - (string-append "--prefix=" out) - ,@(if (string=? "powerpc64le-linux" - (%current-system)) - '("--host=powerpc64le-unknown-linux-gnu") - '()) - ,@(if (string=? "aarch64-linux" - (%current-system)) - '("--host=aarch64-unknown-linux-gnu") - '())))))))) + ,(if (%current-target-system) + ;; This old 'configure' script doesn't + ;; support cross-compilation well. E.g., it fails + ;; to find the cross-compiler. + `(add-before 'bootstrap 'delete-configure + (lambda _ + (delete-file "configure"))) + `(replace 'configure + ;; This old `configure' script doesn't support + ;; variables passed as arguments. TODO: would + ;; simply regenerating 'configure' work + ;; well enough, even if compiling natively + ;; on powerpc or aarch64? + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (setenv "CONFIG_SHELL" (which "bash")) + (invoke "./configure" + (string-append "--prefix=" out) + ,@(if (string=? "powerpc64le-linux" + (%current-system)) + '("--host=powerpc64le-unknown-linux-gnu") + '()) + ,@(if (string=? "aarch64-linux" + (%current-system)) + '("--host=aarch64-unknown-linux-gnu") + '()))))))))) + (native-inputs + (if (%current-target-system) + `(("autoconf" ,autoconf)) + '())) (home-page (string-append "https://web.archive.org/web/20181111033959/" "http://www.mr511.de/software/english.html")) (synopsis "ELF object file access library") --=-rzTq2iiViFMq7VwzQ9gi-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:39:30 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:39:30 +0000 Received: from localhost ([127.0.0.1]:47644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsogT-0004LD-Vo for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:30 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:49724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsogS-0004Kz-0a for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:28 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3fT250040mfAB4013fTk9; Mon, 14 Jun 2021 17:39:27 +0200 Message-ID: Subject: [PATCH core-updates 35/37] opendht: Correct 'nettle' variable name in inputs. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:39:27 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-ttx2XwRQwoGAFRL/2vI6" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685167; bh=Z5thBcyWNRrCQ24oZSKGWC6n45RVIObF1z0SwLUmYeg=; h=Subject:From:To:Date:In-Reply-To:References; b=iD7qgMFnR7qhXoO+94/UvCb5havj5M6lns4EqA1/V3M1RXvloKC4ZHnMoC+7xgjWg kHyUivD8WXYMp5o1JGqQrsctE8o9tbD/REpUdw+mtkN5SDJFt3KQZJg261wYa9SnlY S+FavkGr8dQGCtjFxoRqjjbczdLkYLN+ju+sgRgx+sSM4+AM+JRXpkaHLs9bkKvVMa O4s7M4r5+FsgNVp0gXZtyj9F0nTSVDj+tamsGQiWOFX0jkCcHdXUX0XHGbZv6IgqKv R0uiiS0fnv/aRelof9kukgvgraXpwE49TgafOedcx0vu5+u3VmOuycXZz/avnul5tk k4v9JXWA5iWDg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-ttx2XwRQwoGAFRL/2vI6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Previously, opendht referred to 'nettle-3.7'. But nettle-3.7 has been renamed to simply 'nettle'. So, refer to 'nettle' instead of 'nettle-3.7'. This should fix recent evaluation failures of core-updates on ci.guix.gnu.org. * gnu/packages/networking.scm (opendht)[inputs]{nettle}: Refer to 'nettle' instead of 'nettle-3.7'. --- gnu/packages/networking.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --=-ttx2XwRQwoGAFRL/2vI6 Content-Disposition: attachment; filename="0035-opendht-Correct-nettle-variable-name-in-inputs.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0035-opendht-Correct-nettle-variable-name-in-inputs.patch"; charset="us-ascii" diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 62c4d7a392..6b154067b1 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -3478,7 +3478,7 @@ and targeted primarily for asynchronous processing of HTTP-requests.") (build-system cmake-build-system) (inputs `(("argon2" ,argon2) - ("nettle" ,nettle-3.7) + ("nettle" ,nettle) ("readline" ,readline) ("jsoncpp" ,jsoncpp) ("openssl" ,openssl) ;required for the DHT proxy --=-ttx2XwRQwoGAFRL/2vI6-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:39:32 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:39:32 +0000 Received: from localhost ([127.0.0.1]:47648 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsogW-0004LS-6r for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:32 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:49724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsogU-0004Kz-Oe for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:31 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3fW250050mfAB4013fWkZ; Mon, 14 Jun 2021 17:39:30 +0200 Message-ID: <79799f427dfcc7e916a033e1920d0eeffe5c1f0c.camel@telenet.be> Subject: [PATCH core-updates 31/37] glib: Look up "tzdata" in 'native-inputs', not 'inputs'. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:39:30 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-990bnJxVfUiwK7NHP0TF" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685170; bh=21pHze+pHX1QUU3faZDVeyKHR5BWcrUM+up16DXtFFQ=; h=Subject:From:To:Date:In-Reply-To:References; b=oMebheRORtPQHAXtLGjqTa4FPg6o3Xddy5r+StsFo7OFQWzrE2rT7ZcRsuzIWV+bF ffoslRR9DrvVo3kRUoRHoWPIMgpYQLzXRqYMUT6LevQx2Sj1YQ7TLpz5Dv37a9mmQy XNVhHIQ2BsIFcZapfZSd0z7QHwn/h5G1vJJ3FjoHDjqfqhdZ5dz+UPSePJkfawNQsu Vseq4/tJIwjvGHIYYaihNf1Tfuxlyit1pnJ8qoAOagUWHMiPMbKsXD1haAfFIEvgnn 88rVuRT1Ic69G8Jxy2ieWp8h/5giCOScP1PAqvBrAyI20vHm07r58cGAFxFQitlMzE dXKlO2VQe2DIw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-990bnJxVfUiwK7NHP0TF Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Otherwise, "tzdata" won't be found when cross-compiling and string-append will complain about types. Alternatively, "tzdata" could be moved from 'native-inputs' to 'inputs'. * gnu/packages/glib.scm (glib)[arguments]<#:phases>{pre-check}: Look up "tzdata" in 'native-inputs', not 'inputs'. --- gnu/packages/glib.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --=-990bnJxVfUiwK7NHP0TF Content-Disposition: attachment; filename="0031-glib-Look-up-tzdata-in-native-inputs-not-inputs.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0031-glib-Look-up-tzdata-in-native-inputs-not-inputs.patch"; charset="us-ascii" diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 244544ea6f..57e8282a89 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -251,10 +251,11 @@ shared NFS home directories.") (package-version python))))) #t)) (add-before 'check 'pre-check - (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) ;; For tests/gdatetime.c. (setenv "TZDIR" - (string-append (assoc-ref inputs "tzdata") + (string-append (assoc-ref (or native-inputs inputs) + "tzdata") "/share/zoneinfo")) ;; Some tests want write access there. (setenv "HOME" (getcwd)) --=-990bnJxVfUiwK7NHP0TF-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 11:39:45 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 15:39:45 +0000 Received: from localhost ([127.0.0.1]:47652 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsogj-0004Lr-EN for submit@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:45 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:49724) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsogZ-0004Kz-HE for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:44 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3fa2500E0mfAB4013fbl3; Mon, 14 Jun 2021 17:39:35 +0200 Message-ID: <0e7d032a02bca4bc6d3b3b1a3936f039f7f56da5.camel@telenet.be> Subject: [PATCH core-updates 02/37] utils: Define a target-x86-32? and target-x86-64? predicate. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:39:34 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-ctfliosNXztPLJPfVToo" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685175; bh=n2Dy1NxqjV2Du24S0QoUHh5TG8tI/tG4wLxZmJOGW9M=; h=Subject:From:To:Date:In-Reply-To:References; b=TVE15dkFGDanURXkTumxinmgWzMlKDNCj4Xd/ddNxOtB6Ojpl694YZ1YLgrvz0o0J Lu8x+BdqNzo/t3UezkT0VpDpKy04sYrMd54RJdS2pKjfsfHQcCmlin/zFE5Z/jwXcq Ls0qPN/RoJmy4JSMbawT0uWEIX/JnfRHsttp9xBC8bcDpL7Pw9Wmkhbb59SODBCha3 0ypW3YvMHmOXaUPSid3TeVRH+QgOKs1py4woONOqo56telV761oTUB/cOKDRfG8HF0 XjOcwmvuXnb2XXLtq+W9Hjgc4NxD89nQovS1jnjQmuZO+iiVwsyX561Wue/DSIf6HW 4uWfl0WyaliLA== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-ctfliosNXztPLJPfVToo Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit * guix/utils.scm (target-x86-32?, target-x86-64?): New predicates. * tests/utils.scm ("target-x86-32?", "target-x86-64?"): New tests. --- guix/utils.scm | 20 ++++++++++++++++++++ tests/utils.scm | 23 +++++++++++++++++++++++ 2 files changed, 43 insertions(+) --=-ctfliosNXztPLJPfVToo Content-Disposition: attachment; filename="0002-utils-Define-a-target-x86-32-and-target-x86-64-predi.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0002-utils-Define-a-target-x86-32-and-target-x86-64-predi.patch"; charset="us-ascii" diff --git a/guix/utils.scm b/guix/utils.scm index 4ff2602e23..2256ea2ca6 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -84,6 +84,8 @@ package-name->name+version target-linux? target-mingw? + target-x86-32? + target-x86-64? target-arm32? target-aarch64? target-arm? @@ -553,6 +555,24 @@ a character other than '@'." (and target (string-suffix? "-mingw32" target))) +(define* (target-x86-32? #:optional (target (or (%current-target-system) + (%current-system)))) + "Is the architecture of TARGET a variant of Intel's 32-bit architecture +(IA32)?" + ;; Intel also has a 16-bit architecture in the iN86 series, i286 + ;; (see, e.g. https://en.wikipedia.org/wiki/Intel/808286) so this + ;; procedure is not named target-x86?. + (or (string-prefix? "i386-" target) + (string-prefix? "i486-" target) + (string-prefix? "i586-" target) + (string-prefix? "i686-" target))) + +(define* (target-x86-64? #:optional (target (or (%current-target-system) + (%current-system)))) + "Is the architecture of TARGET a variant of Intel/AMD's 64-bit +architecture (x86_64)?" + (string-prefix? "x86_64-" target)) + (define* (target-arm32? #:optional (target (or (%current-target-system) (%current-system)))) (string-prefix? "arm" target)) diff --git a/tests/utils.scm b/tests/utils.scm index 80a0e669a4..92439b5587 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -306,6 +306,29 @@ skip these tests." '("i686-linux-gnu" "i686-pc-gnu" "i686-w64-mingw32"))) +(test-equal "target-x86-32?" + '(#f #f #f #t #t #t #t #f) + ;; These are (according to Wikipedia) two RISC architectures + ;; by Intel and presumably not compatible with the x86-32 series. + (map target-x86-32? + '("i860-gnu" "i960-gnu" + ;; This is a 16-bit architecture + "i286-gnu" + ;; These are part of the x86-32 series. + "i386-gnu" "i486-gnu" "i586-gnu" "i686-gnu" + ;; Maybe this one will exist some day, but not yet. + "i786-gnu"))) + +(test-equal "target-x86-64?" + '(#t #f #f #f) + (map target-x86-64? + `("x86_64-linux-gnu" "i386-linux-gnu" + ;; Just because it includes "64" doesn't make it 64-bit. + "aarch64-linux-gnu" + ;; Note that (expt 2 109) in decimal notation starts with 64. + ;; However, it isn't 32-bit. + ,(format #f "x86_~a-linux-gnu" (expt 2 109))))) + (test-end) (false-if-exception (delete-file temp-file)) --=-ctfliosNXztPLJPfVToo-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 12:05:09 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 16:05:09 +0000 Received: from localhost ([127.0.0.1]:47686 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsp5J-00050R-1Q for submit@debbugs.gnu.org; Mon, 14 Jun 2021 12:05:09 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:38452) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsp5H-00050G-E2 for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 12:05:08 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H4552500U0mfAB401455CB; Mon, 14 Jun 2021 18:05:05 +0200 Message-ID: Subject: Re: [bug#49025] [PATCH core-updates 00/37] Support cross-compilation with meson From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 18:04:59 +0200 In-Reply-To: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-XdqDEuoZehb+EYVVJxB2" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623686706; bh=NPM8ZDdFELHXl7G4n2OuVDFVMrL1ZGzWCEtIGSrYJ3w=; h=Subject:From:To:Date:In-Reply-To:References; b=DZMKmU8jfykRnBnEf8EGnpE8mgtDk9y8XnI3w1Vwh43jvNvCkRoLmXI6/um/Odfeo frG+57+crDksRi3SCnHXiaFspVpdqGXUs4fc74/BPajmPIOhYoewtrZnzgixhGToid NziNfUZGsxztX8gpscjoxfh0rlIrQocMkzm1rFN4LZCXn4wGMV6V6tNVaJBUQ9VMAw JP0ohPA6FtGhEkCoBx1nQF9Hk9GbYvUHinWz9yhWQAG2xeN820Lo8IrcWncIT7Pv+9 X8wIiRtRtcQw44eV7LoFfadq+uHjaIaJaibcwbf88rHc6FL2kr/V/nUMSwLHrBuowT qRbOzi/jWWxtA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-XdqDEuoZehb+EYVVJxB2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Maxime Devos schreef op ma 14-06-2021 om 17:22 [+0200]: > opendht: Correct 'nettle' variable name in inputs. This patch is not a cross-compilation fix. It doesn't belong in this patch series. Still a fix though. I think it would address the recent evaluation failures on ci.guix.gnu.org for core-updates. --=-XdqDEuoZehb+EYVVJxB2 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+4iGRcl7gUCYMd+KxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lXFAPsHEvub24baznPs/zFry9egH+fC Y3YIpk3IIsjriiwJwgD/WjLYqKW7IreZCauaMkT+/zB6csqhWkcVKS5hQBrgGgs= =UBIO -----END PGP SIGNATURE----- --=-XdqDEuoZehb+EYVVJxB2-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 12:06:26 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 16:06:27 +0000 Received: from localhost ([127.0.0.1]:47689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsp6Y-00053B-Dk for submit@debbugs.gnu.org; Mon, 14 Jun 2021 12:06:26 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:45738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofT-00049r-Oz for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:28 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3eT250090mfAB4013eTZq; Mon, 14 Jun 2021 17:38:27 +0200 Message-ID: <78483ba71b04fd12db1590219bb39dc50b4dd132.camel@telenet.be> Subject: [PATCH core-updates 23/37] readline: Make #:configure-flags a G-expression. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:38:27 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-3YmQvFB7L8BRSirQoDc+" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685107; bh=CZJeUp6JmOCwM4DkHRJdUG+kJ/hSfhI2SBJhxwqqUuk=; h=Subject:From:To:Date:In-Reply-To:References; b=nw0ZD54QrgxpjJHKiFlZwEvEirTQwKuVrMuwDow4k5xzeNrucu4oLUZeYDCVPvwzA Y7y0Cj9sjQjGQaesbTxumn2hUavXL/mo2gd+SvV+83y+JIwiKC/ybherEwm4FvRRsg qHnkQvnVQ9eJchXM6rhJHduIvDv7VbsA9I1puMDNU1dU3lf1Wnz5Iav4FFVmGc6qdJ WF2U32lYl+GeahE9rizZ6b5dIpzgLOrbG9rKp0FM/1TzIPxyws3RQtuLCatgKO3EYu WUleW8BOSx1xSYXSqwpsMA/E6rKoxFj3eYACMSXukPU17gXNQKoubropgxWaUxrMHA qQn9BHyPIsMjA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-3YmQvFB7L8BRSirQoDc+ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit This allos using ungexp and this-package-input later. * gnu/packages/readline.scm (readline)[arguments]<#:configure-flags>: Make this a G-expression. --- gnu/packages/readline.scm | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) --=-3YmQvFB7L8BRSirQoDc+ Content-Disposition: attachment; filename="0023-readline-Make-configure-flags-a-G-expression.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0023-readline-Make-configure-flags-a-G-expression.patch"; charset="us-ascii" diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm index b4c91675a4..6cfa24c666 100644 --- a/gnu/packages/readline.scm +++ b/gnu/packages/readline.scm @@ -29,6 +29,7 @@ #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (ice-9 format)) (define (patch-url version seqno) @@ -76,19 +77,19 @@ (build-system gnu-build-system) (propagated-inputs `(("ncurses" ,ncurses))) (arguments `(#:configure-flags - (list (string-append "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib") + ,#~(list (string-append "LDFLAGS=-Wl,-rpath -Wl," + (assoc-ref %build-inputs "ncurses") + "/lib") - ;; This test does an 'AC_TRY_RUN', which aborts when - ;; cross-compiling, so provide the correct answer. - ,@(if (%current-target-system) - '("bash_cv_wcwidth_broken=no") - '()) - ;; MinGW: ncurses provides the termcap api. - ,@(if (target-mingw?) - '("bash_cv_termcap_lib=ncurses") - '())) + ;; This test does an 'AC_TRY_RUN', which aborts when + ;; cross-compiling, so provide the correct answer. + #$@(if (%current-target-system) + '("bash_cv_wcwidth_broken=no") + '()) + ;; MinGW: ncurses provides the termcap api. + #$@(if (target-mingw?) + '("bash_cv_termcap_lib=ncurses") + '())) ,@(if (target-mingw?) ;; MinGW: termcap in ncurses --=-3YmQvFB7L8BRSirQoDc+-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 12:06:32 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 16:06:32 +0000 Received: from localhost ([127.0.0.1]:47691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsp6Y-00053E-S2 for submit@debbugs.gnu.org; Mon, 14 Jun 2021 12:06:32 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:45738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsog8-00049r-8e for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:09 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3f72500C0mfAB4013f7gf; Mon, 14 Jun 2021 17:39:07 +0200 Message-ID: <15c3653940316d32da0c4163c8f07507e6cd1c98.camel@telenet.be> Subject: [PATCH core-updates 37/37] meson: Support cross-compilation. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:39:07 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-Ci5fq1RkvUWCuMaf13o8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685147; bh=Y0F3ZqZCn5kbWJTZDws1K2iyvKi2XMHLvWE0ucoM15w=; h=Subject:From:To:Date:In-Reply-To:References; b=pYwm/5rQYF+E4ltKKDrfg1XnCg6uWnhbQ78P2T0lS285lnbFkl9mEwEewiBhmXFZu 5LCy8IV0Ukn/s4htivbG2qgvJCN3Es3qSTCCBm7bo/e+nmWcaW8tgOOw/yaSXVb5ZX XlW5YcU0LI36PzPV80tduErDGFovInvvVW8qyo6NGb8/y/RrtjznL0XeQu4ob5HBIm Mh3gmFuPSOkvfIMQFta69dotgsyCpcDG7/ksiND08MNE8No1JwLIvVAx5X/b6H4l9i kOpgxC2iD2esXAgXV9PJJGRhwPtIFkuaCLzvPgM3vS6ohr13MFmz6AJ2RzG9AuYj8e 3PJdZL64P9HwQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-Ci5fq1RkvUWCuMaf13o8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit For cross-compilation, meson needs to be passed a ‘cross file’ with information on the architecture, CPU type, endianness and operating system, and the name of the cross-compiler binaries. The new module (guix build meson-configuration) has some utilities for writing these cross files, used by 'make-cross-file' in a G-exp. The values for the cross file are generated by 'make-machine-alist' and 'make-binaries-alist'. 'make-machine-alist' and 'make-binaries-alist' live on the host side, such that new architectures and operating systems can be added without causing rebuilds for old architectures. Currently, only GNU/Hurd, GNU/Linux, MinGW, x86-32 and x86-64 are supported by 'make-machine-alist'. For other architectures, someone needs to figure out what to use as ‘CPU type’ first. Only i686-linux-gnu has been tested. This has been tested with: $ ./pre-inst-env guix build glib --target=i686-linux-gnu on a x86_64-linux system. ‘If it compiles, it should work.’ * guix/build/meson-configuration.scm (configuration-port): New parameter. (write-section-header): New procedure. (write-assignment): New procedure. (write-assignments): New procedure. * guix/build-system/meson.scm (target-hurd?): New predicate. (make-machine-alist): New procedure. (make-binaries-alist): New procedure. (make-cross-file): New procedure. (meson-cross-build): New procedure. (lower)[build-inputs]: Add standard cross packages when cross-compiling. Do not include regular 'inputs' when cross-compiling. (lower)[host-inputs]: Include 'inputs' when cross-compiling. (lower)[target-inputs]: Add cross packages when cross-compiling. (lower)[build]: Call 'meson-cross-build' instead of 'cross-build' when cross-compiling. (lower)[target]: Set it. (lower)[private-keywords]: Do not remove #:target when cross-compiling. --- Makefile.am | 1 + guix/build-system/meson.scm | 197 ++++++++++++++++++++++++++--- guix/build/meson-configuration.scm | 71 +++++++++++ 3 files changed, 250 insertions(+), 19 deletions(-) create mode 100644 guix/build/meson-configuration.scm --=-Ci5fq1RkvUWCuMaf13o8 Content-Disposition: attachment; filename="0037-meson-Support-cross-compilation.patch" Content-Transfer-Encoding: 8bit Content-Type: text/x-patch; name="0037-meson-Support-cross-compilation.patch"; charset="UTF-8" diff --git a/Makefile.am b/Makefile.am index a10e06e5a7..d4bf626fd5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -234,6 +234,7 @@ MODULES = \ guix/build/emacs-utils.scm \ guix/build/java-utils.scm \ guix/build/lisp-utils.scm \ + guix/build/meson-configuration.scm \ guix/build/maven/java.scm \ guix/build/maven/plugin.scm \ guix/build/maven/pom.scm \ diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm index 5adc0f92c8..1f763af2aa 100644 --- a/guix/build-system/meson.scm +++ b/guix/build-system/meson.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017 Peter Mikkelsen ;;; Copyright © 2018, 2019 Marius Bakke ;;; Copyright © 2021 Ludovic Courtès +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,7 +31,8 @@ #:use-module (guix packages) #:use-module (ice-9 match) #:export (%meson-build-system-modules - meson-build-system)) + meson-build-system + make-cross-file)) ;; Commentary: ;; @@ -40,6 +42,62 @@ ;; ;; Code: +(define (target-hurd? triplet) + (and (string-suffix? "-gnu" triplet) + (not (string-contains triplet "linux")))) + +(define (make-machine-alist triplet) + "Make an association list describing what should go into +the ‘host_machine’ section of the cross file when cross-compiling +for TRIPLET." + `((system . ,(cond ((target-hurd? triplet) "gnu") + ((target-linux? triplet) "linux") + ((target-mingw? triplet) "windows") + (#t (error "meson: unknown operating system")))) + (cpu_family . ,(cond ((target-x86-32? triplet) "x86") + ((target-x86-64? triplet) "x86_64") + ((target-arm32? triplet) "arm") + ((target-aarch64? triplet) "aarch64") + ((target-powerpc? triplet) + (if (target-64bit? triplet) + "ppc64" + "ppc")) + (#t (error "meson: unknown architecture")))) + (cpu . ,(cond ((target-x86-32? triplet) ; i386, ..., i686 + (substring triplet 0 4)) + ((target-x86-64? triplet) "x86_64") + (#t (error "meson: unknown CPU")))) + (endian . ,(cond ((string-prefix? "powerpc64le-" triplet) "little") + ((string-prefix? "mips64el-" triplet) "little") + ((target-x86-32? triplet) "little") + ((target-x86-64? triplet) "little") + (#t (error "meson: unknown architecture")))))) + +(define (make-binaries-alist triplet) + "Make an associatoin list describing what should go into +the ‘binaries’ section of the cross file when cross-compiling for +TRIPLET." + `((c . ,(cc-for-target triplet)) + (cpp . ,(cxx-for-target triplet)) + (pkgconfig . ,(pkg-config-for-target triplet)) + (objcopy . ,(string-append triplet "-objcopy")) + (ar . ,(string-append triplet "-ar")) + (ld . ,(string-append triplet "-ld")) + (strip . ,(string-append triplet "-strip")))) + +(define (make-cross-file triplet) + (computed-file "cross-file" + (with-imported-modules '((guix build meson-configuration)) + #~(begin + (use-modules (guix build meson-configuration)) + (call-with-output-file #$output + (lambda (f) + (parameterize ((configuration-port f)) + (write-section-header "host_machine") + (write-assignments '#$(make-machine-alist triplet)) + (write-section-header "binaries") + (write-assignments '#$(make-binaries-alist triplet))))))))) + (define %meson-build-system-modules ;; Build-side modules imported by default. `((guix build meson-build-system) @@ -68,24 +126,34 @@ #:rest arguments) "Return a bag for NAME." (define private-keywords - `(#:meson #:ninja #:inputs #:native-inputs #:outputs #:target)) - - (and (not target) ;; TODO: add support for cross-compilation. - (bag - (name name) - (system system) - (build-inputs `(("meson" ,meson) - ("ninja" ,ninja) - ,@native-inputs - ,@inputs - ;; Keep the standard inputs of 'gnu-build-system'. - ,@(standard-packages))) - (host-inputs (if source - `(("source" ,source)) - '())) - (outputs outputs) - (build meson-build) - (arguments (strip-keyword-arguments private-keywords arguments))))) + `(#:meson #:ninja #:inputs #:native-inputs #:outputs + ,@(if target + '() + '(#:target)))) + + (bag + (name name) + (system system) (target target) + (build-inputs `(("meson" ,meson) + ("ninja" ,ninja) + ,@native-inputs + ,@(if target '() inputs) + ;; Keep the standard inputs of 'gnu-build-system'. + ,@(if target + (standard-cross-packages target 'host) + '()) + ,@(standard-packages))) + (host-inputs `(,@(if source + `(("source" ,source)) + '()) + ,@(if target inputs '()))) + ;; Keep the standard inputs of 'gnu-buid-system'. + (target-inputs (if target + (standard-cross-packages target 'target) + '())) + (outputs outputs) + (build (if target meson-cross-build meson-build)) + (arguments (strip-keyword-arguments private-keywords arguments)))) (define* (meson-build name inputs #:key @@ -161,6 +229,97 @@ has a 'meson.build' file." #:disallowed-references disallowed-references #:guile-for-build guile))) +(define* (meson-cross-build name + #:key + target + build-inputs host-inputs target-inputs + guile source + (outputs '("out")) + (configure-flags ''()) + (search-paths '()) + (native-search-paths '()) + + (build-type "debugoptimized") + (tests? #f) + (test-target "test") + (glib-or-gtk? #f) + (parallel-build? #t) + (parallel-tests? #f) + (validate-runpath? #t) + (patch-shebangs? #t) + (strip-binaries? #t) + (strip-flags ''("--strip-debug")) + (strip-directories ''("lib" "lib64" "libexec" + "bin" "sbin")) + (elf-directories ''("lib" "lib64" "libexec" + "bin" "sbin")) + (phases '%standard-phases) + (system (%current-system)) + (imported-modules %meson-build-system-modules) + (modules '((guix build meson-build-system) + (guix build utils))) + allowed-references + disallowed-references) + "Cross-build SOURCE for TARGET using MESON, and with INPUTS, assuming that +SOURCE has a 'meson.build' file." + (define cross-file + (make-cross-file target)) + (define inputs + (if (null? target-inputs) + (input-tuples->gexp host-inputs) + #~(append #$(input-tuples->gexp host-inputs) + #+(input-tuples->gexp target-inputs)))) + (define builder + (with-imported-modules imported-modules + #~(begin + (use-modules #$@(sexp->gexp modules)) + + (define build-phases + #$(let ((phases (if (pair? phases) (sexp->gexp phases) phases))) + (if glib-or-gtk? + phases + #~(modify-phases #$phases + (delete 'glib-or-gtk-compile-schemas) + (delete 'glib-or-gtk-wrap))))) + + ;; Do not use 'with-build-variables', as there should be + ;; no reason to use %build-inputs and friends. + (meson-build #:source #+source + #:system #$system + #:outputs #$(outputs->gexp outputs) + #:inputs #$inputs + #:native-inputs #+(input-tuples->gexp build-inputs) + #:search-paths '#$(sexp->gexp + (map search-path-specification->sexp + search-paths)) + #:native-search-paths '#$(sexp->gexp + (map search-path-specification->sexp + native-search-paths)) + #:phases build-phases + #:configure-flags `("--cross-file" #+cross-file + ,@#$(sexp->gexp configure-flags)) + #:build-type #$build-type + #:tests? #$tests? + #:test-target #$test-target + #:parallel-build? #$parallel-build? + #:parallel-tests? #$parallel-tests? + #:validate-runpath? #$validate-runpath? + #:patch-shebangs? #$patch-shebangs? + #:strip-binaries? #$strip-binaries? + #:strip-flags #$(sexp->gexp strip-flags) + #:strip-directories #$(sexp->gexp strip-directories) + #:elf-directories #$(sexp->gexp elf-directories))))) + + (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) + system #:graft? #f))) + (gexp->derivation name builder + #:system system + #:target target + #:substitutable? substitutable? + #:allowed-references allowed-references + #:disallowed-references disallowed-references + #:guile-for-build guile))) + (define meson-build-system (build-system (name 'meson) diff --git a/guix/build/meson-configuration.scm b/guix/build/meson-configuration.scm new file mode 100644 index 0000000000..81b4eaa7e1 --- /dev/null +++ b/guix/build/meson-configuration.scm @@ -0,0 +1,71 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Maxime Devos +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix build meson-configuration) + #:use-module (ice-9 match) + #:export (write-section-header write-assignment + write-assignments make-machine-alist + configuration-port)) + +;; Commentary: +;; +;; Utilities for generating a ‘Cross build definition file’ for +;; the Meson build system. Configuration values are currently +;; never escaped. In practice this is unlikely to be a problem +;; in the build environment. +;; +;; Code: + +(define configuration-port + (fluid->parameter (make-unbound-fluid))) + +(define (write-section-header section-name) + "Write a section header for section named SECTION-NAME +to the configuration port." + (format (configuration-port) "[~a]~%" section-name)) + +(define (write-assignment key value) + "Write an assignment of VALUE to KEY to the configuration +port. VALUE must be a string (without any special characters +such as quotes), a boolean or an integer. Lists are currently +not supported" + (define port (configuration-port)) + (match value + ((? string?) + (format port "~a = '~a'~%" key value)) + ((? integer?) + (format port "~a = ~a~%" key value)) + (#f + (format port "~a = true~%" key)) + (#t + (format port "~a = false~%" key)))) + +(define* (write-assignments alist) + "Write the assignments in ALIST, an association list, +to the configuration port." + (for-each (match-lambda + ((key . value) + (write-assignment key value))) + alist)) + +(define* (make-machine-alist #:key system cpu-family cpu endian) + "Make an association list for the [host_machine] section." + `((system . ,system) + (cpu-family . ,cpu-family) + (cpu . ,cpu) + (endian . ,endian))) --=-Ci5fq1RkvUWCuMaf13o8-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 12:06:32 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 16:06:33 +0000 Received: from localhost ([127.0.0.1]:47693 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsp6e-00053R-CA for submit@debbugs.gnu.org; Mon, 14 Jun 2021 12:06:32 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:45738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsoft-00049r-9U for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:53 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3es2500L0mfAB4013esdw; Mon, 14 Jun 2021 17:38:52 +0200 Message-ID: <6248f1f47c912ca357fd1c5f390c9007033dade1.camel@telenet.be> Subject: [PATCH core-updates 15/37] python: Fix reference to input when cross-compiling. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:38:52 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-DP2wW/KlKhRjISAHd56i" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685133; bh=sxYEjfJFxqzIqdewtxXhkwGSS1U07GxaI+f6QcrtDkQ=; h=Subject:From:To:Date:In-Reply-To:References; b=d6TcwFiICsA1vLcmeKtl8EmmTLcTJmY1KPUk26kovO0ur5pe2UtyU1K1+4wuzHFnw fLDyo3zTOELYGMorz3DmKc7E0Mc7TPcSpRgOkV4z3suUipoiA5gJaDX/YZwi8LxCXT NgKofb3Tp4HBYDOQh1L5q+9zPMLsFyi3zpt2JJNJ+jlTIn57Lt4SNJNatt1oRmxwn9 0rMWqiOSebDE107H8YiqqP6DOj0Rlszx6EPNCrWwQK1zSsN4XUcni3ZFV0kGL7jYiG HsSNMRb5vntekeqjuUykeZPmZJIcF7NYKqGVJuEk4atjPZADzkAbvgla4996++LiV+ 69vR2z2AuX87w== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-DP2wW/KlKhRjISAHd56i Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit "sitecustomize.py" is a native input, so look it up in 'native-inputs', not 'inputs'. * gnu/packages/python.scm (customize-site): Look up "sizecustomize.py" in 'native-inputs', not 'inputs'. --- gnu/packages/python.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --=-DP2wW/KlKhRjISAHd56i Content-Disposition: attachment; filename="0015-python-Fix-reference-to-input-when-cross-compiling.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0015-python-Fix-reference-to-input-when-cross-compiling.patch"; charset="us-ascii" diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index fbad0b65b8..f004b8e739 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -111,13 +111,14 @@ (define* (customize-site version) "Generate a install-sitecustomize.py phase, using VERSION." - `(lambda* (#:key inputs outputs #:allow-other-keys) + `(lambda* (#:key native-inputs inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (site-packages (string-append out "/lib/python" ,(version-major+minor version) "/site-packages")) - (sitecustomize.py (assoc-ref inputs "sitecustomize.py")) + (sitecustomize.py (assoc-ref (or native-inputs inputs) + "sitecustomize.py")) (dest (string-append site-packages "/sitecustomize.py"))) (mkdir-p site-packages) (copy-file sitecustomize.py dest) --=-DP2wW/KlKhRjISAHd56i-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 12:06:33 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 16:06:33 +0000 Received: from localhost ([127.0.0.1]:47695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsp6e-00053Y-Tz for submit@debbugs.gnu.org; Mon, 14 Jun 2021 12:06:33 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:41494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsogG-0004AR-F3 for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:16 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by michel.telenet-ops.be with bizsmtp id H3fF2500G0mfAB4063fGAA; Mon, 14 Jun 2021 17:39:16 +0200 Message-ID: Subject: [PATCH core-updates 32/37] tk: Make #:configure-flags a G-expression. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:39:15 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-PuAtXR5e+wHaQIaef1A/" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685156; bh=qQfvdstxZy/XiIqaAZr+ob7/+xkbF3xy1OfG71JNARs=; h=Subject:From:To:Date:In-Reply-To:References; b=DiEiYzsN5T374kTjh4rNrsk6vAu+w3nkIUXmQ990QBdl/Zky15fncWRdcjeUZzVmt VZa2UMkhABxsOHPh7YkiF92CD3r836lRBZDMD89hF84hZoEch1GE8FE+qf8Dwwjb1A W3zCge+ha/x1UsjCRZEkps9yidVIiNFjBAjMbBhpiZZNwaqWLkKf6Uur9SNDq1v3qZ 7vLrA0JeM8b78jF/M6yauJ6tOEU9gYcQ6Lf4mHkgWEVJAqJ1ONP7vTrvkn2mkcYAiM 0g2wvhbeJJ/lsJy5Ehb1GoA/Bl9NG2SLoq+v+Tt0ZbA49BISZaDJSs30yhBjrTifNs OKdSRe1Qyl7eg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-PuAtXR5e+wHaQIaef1A/ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit This allows using #$(this-package-input ...) later. * gnu/packages/tcl.scm (tk)[arguments]<#:configure-flags>: Make this a G-expression instead of an S-expression. --- gnu/packages/tcl.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) --=-PuAtXR5e+wHaQIaef1A/ Content-Disposition: attachment; filename="0032-tk-Make-configure-flags-a-G-expression.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0032-tk-Make-configure-flags-a-G-expression.patch"; charset="us-ascii" diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm index 5fccfa5da9..c87a8187f2 100644 --- a/gnu/packages/tcl.scm +++ b/gnu/packages/tcl.scm @@ -230,15 +230,16 @@ X11 GUIs.") "/lib -lfontconfig"))))))) #:configure-flags + ,#~ (list (string-append "--with-tcl=" (assoc-ref %build-inputs "tcl") "/lib") ;; This is needed when cross-compiling, see: ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719247 - ,@(if (%current-target-system) - '("tcl_cv_strtod_buggy=1" - "ac_cv_func_strtod=yes") - '())) + #$@(if (%current-target-system) + #~("tcl_cv_strtod_buggy=1" + "ac_cv_func_strtod=yes") + #~())) ;; The tests require a running X server, so we just skip them. #:tests? #f)) --=-PuAtXR5e+wHaQIaef1A/-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 12:06:33 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 16:06:34 +0000 Received: from localhost ([127.0.0.1]:47697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsp6f-00053g-H9 for submit@debbugs.gnu.org; Mon, 14 Jun 2021 12:06:33 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:45738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsogN-00049r-GW for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:39:38 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3fN2500q0mfAB4013fPjQ; Mon, 14 Jun 2021 17:39:23 +0200 Message-ID: Subject: [PATCH core-updates 33/37] tk: Do not use %build-inputs when cross-compiling. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:39:22 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-CIyqiPxcN3zcv2U0GQ+q" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685163; bh=ScieVaZk7mDw2fXbsDGfiO9S33uDMZnuFk/yBrk0aHY=; h=Subject:From:To:Date:In-Reply-To:References; b=aUX/V2K3xjCnf/HzhpxegfsyvRstb80w/3p/lievDKcmokW/5Z0+AOZgn/o00aioo RxeJLwwdTZzZwHoRVjsttRgq7Z647GUaDAmoDdRO5hIdhSEumWjEksM6z07EAH6cxs tXpXkrFqxyd8fWcBmJhP9ZPnYVvxqHS62qy6RCqTIA6HU1ldlNSBchgIOvggpGeNOc QYc6vf82wtkmv5R19YA/y9dKduJ48GBaP8QWGT4bI9N3WHSNDWUnGXka31Jmg25Tde MqMttdZNvo8BNCf9fp4yejMQDR9p87+uUNddfoVYPFjiDnWU7JbHeVXD36DyuD8Tvu +f/bCUk2jXj5g== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-CIyqiPxcN3zcv2U0GQ+q Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit %build-inputs does not exists when cross-compiling, so use #$(this-package-input ...) instead. * gnu/packages/tcl.scm (tk)[arguments]<#:configure-flags>: Use 'this-package-input' instead of '%build-inputs' when cross-compiling. --- gnu/packages/tcl.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --=-CIyqiPxcN3zcv2U0GQ+q Content-Disposition: attachment; filename="0033-tk-Do-not-use-build-inputs-when-cross-compiling.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0033-tk-Do-not-use-build-inputs-when-cross-compiling.patch"; charset="us-ascii" diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm index c87a8187f2..91ba8bbb3f 100644 --- a/gnu/packages/tcl.scm +++ b/gnu/packages/tcl.scm @@ -29,6 +29,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system perl) @@ -232,7 +233,9 @@ X11 GUIs.") #:configure-flags ,#~ (list (string-append "--with-tcl=" - (assoc-ref %build-inputs "tcl") + #$(if (%current-target-system) + (this-package-input "tcl") + #~(assoc-ref %build-inputs "tcl")) "/lib") ;; This is needed when cross-compiling, see: ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719247 --=-CIyqiPxcN3zcv2U0GQ+q-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 14 12:06:34 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jun 2021 16:06:34 +0000 Received: from localhost ([127.0.0.1]:47699 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsp6f-00053n-Rg for submit@debbugs.gnu.org; Mon, 14 Jun 2021 12:06:34 -0400 Received: from laurent.telenet-ops.be ([195.130.137.89]:45738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lsofi-00049r-R5 for 49025@debbugs.gnu.org; Mon, 14 Jun 2021 11:38:43 -0400 Received: from butterfly.local ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by laurent.telenet-ops.be with bizsmtp id H3ei250060mfAB4013eic1; Mon, 14 Jun 2021 17:38:42 +0200 Message-ID: Subject: [PATCH core-updates 26/37] bash: Fix cross-compilation build error. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Mon, 14 Jun 2021 17:38:42 +0200 In-Reply-To: References: Content-Type: multipart/mixed; boundary="=-Apw7h0s7ASZTl8633UF+" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1623685122; bh=QW0tjiTW+CkVuxysVui/WJvw5+glTVXo+zI/KaKqgX4=; h=Subject:From:To:Date:In-Reply-To:References; b=TiJK7VkG475DJXkWBFH75Fcn2P9CV2Pzgx3ZAaTubSp0cZjLtgt8TTAm0K4Ioo8wU pw7QITvWg8DJ1rETviDtra8XfBqbnA8mHFtHFNluX3dt5ZWqcc/a1wx6hbXjxbknxb rl03r3tYDMLq8MGNn/DkWJWs1PaVs7s9eyRX8U6s4+PITkEO/Mct09IeEokFI/mak2 YvTo37bjoNLGDSG+dFUlbK2VawMbdLW3pPDGrKHh6smCHm0ku1evrCqRMJ9xZ+Zc3d 0/RL3/vNQq8llewIGJ/LdswBe741gteZBLrkThl7qEEMOM6wUv5+apaQVfkt3W2ys7 JJm0A+SPGn84A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 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.7 (-) --=-Apw7h0s7ASZTl8633UF+ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit %build-inputs does not exist when cross-compiling, so use this-package-input instead. * gnu/packages/bash.scm (bash)[arguments]<#:configure-flags>: Use this-package-input instead of %build-inputs. --- gnu/packages/bash.scm | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) --=-Apw7h0s7ASZTl8633UF+ Content-Disposition: attachment; filename="0026-bash-Fix-cross-compilation-build-error.patch" Content-Transfer-Encoding: 7bit Content-Type: text/x-patch; name="0026-bash-Fix-cross-compilation-build-error.patch"; charset="us-ascii" diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index b3af873a66..d51ab26bc8 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -103,22 +103,25 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." 1)) (define-public bash - (let* ((cppflags (string-join '("-DDEFAULT_PATH_VALUE='\"/no-such-path\"'" - "-DSTANDARD_UTILS_PATH='\"/no-such-path\"'" - "-DNON_INTERACTIVE_LOGIN_SHELLS" - "-DSSH_SOURCE_BASHRC") - " ")) - (configure-flags - #~`("--with-installed-readline" - ,#$(string-append "CPPFLAGS=" cppflags) - ,(string-append - "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "readline") - "/lib" - " -Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib"))) - (version "5.1")) + (let ((cppflags (string-join '("-DDEFAULT_PATH_VALUE='\"/no-such-path\"'" + "-DSTANDARD_UTILS_PATH='\"/no-such-path\"'" + "-DNON_INTERACTIVE_LOGIN_SHELLS" + "-DSSH_SOURCE_BASHRC") + " ")) + (version "5.1")) + ;; Delay expansion to inside a lexical environment + ;; where this-package is bound. + (define-syntax configure-flags + (identifier-syntax + #~`("--with-installed-readline" + ,#$(string-append "CPPFLAGS=" cppflags) + ,(string-append + "LDFLAGS=-Wl,-rpath -Wl," + ;; %build-inputs does not exist when cross-compiling, + ;; so use this-package-input instead. + #$(file-append (this-package-input "readline") "/lib") + " -Wl,-rpath -Wl," + #$(file-append (this-package-input "ncurses") "/lib"))))) (package (name "bash") (source (origin --=-Apw7h0s7ASZTl8633UF+-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 03:55:38 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 07:55:38 +0000 Received: from localhost ([127.0.0.1]:55696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lu9Ll-0007XD-Qz for submit@debbugs.gnu.org; Fri, 18 Jun 2021 03:55:37 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lu9Lj-0007X0-S4 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 03:55:36 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42466) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu9Le-00020N-Jh; Fri, 18 Jun 2021 03:55:30 -0400 Received: from [2a01:e0a:19b:d9a0:f2f7:a404:c3d3:f8b4] (port=60830 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu9La-0005py-DE; Fri, 18 Jun 2021 03:55:29 -0400 From: Mathieu Othacehe To: Maxime Devos Subject: Re: bug#49025: [PATCH core-updates 00/37] Support cross-compilation with meson References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> Date: Fri, 18 Jun 2021 09:55:25 +0200 In-Reply-To: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> (Maxime Devos's message of "Mon, 14 Jun 2021 17:22:11 +0200") Message-ID: <87k0mrd2tu.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49025 Cc: 49025@debbugs.gnu.org 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 (---) Hello Maxime, I had a first look to this patchset, this is awesome work. I like how you use G-exp in build expressions to fix cross-compilation issues. I'd like to apply your patches to review them more closely, but I'm having some troubles applying them from GNUS. Did you use "git send-email" or another mechanism? It would also be great if we could manage to have meson cross-compile binaries for armhf/aarch64. As we do not have many substitutes for those architectures, being able to cross-compile fully-featured images has been a goal of mine for many years. In the meantime, I applied the 35th patch hoping to fix Cuirass evaluations on the core-updates branch. Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 04:01:29 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 08:01:29 +0000 Received: from localhost ([127.0.0.1]:55715 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lu9RR-0000Xj-BX for submit@debbugs.gnu.org; Fri, 18 Jun 2021 04:01:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lu9RQ-0000Se-AP for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 04:01:28 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42686) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lu9RL-0006lD-2e; Fri, 18 Jun 2021 04:01:23 -0400 Received: from [2a01:e0a:19b:d9a0:f2f7:a404:c3d3:f8b4] (port=60902 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lu9RK-0005nz-Lw; Fri, 18 Jun 2021 04:01:22 -0400 From: Mathieu Othacehe To: Maxime Devos Subject: Re: bug#49025: [PATCH core-updates 00/37] Support cross-compilation with meson References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <87k0mrd2tu.fsf@gnu.org> Date: Fri, 18 Jun 2021 10:01:21 +0200 In-Reply-To: <87k0mrd2tu.fsf@gnu.org> (Mathieu Othacehe's message of "Fri, 18 Jun 2021 09:55:25 +0200") Message-ID: <87czsjd2jy.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49025 Cc: 49025@debbugs.gnu.org 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 (---) > In the meantime, I applied the 35th patch hoping to fix Cuirass > evaluations on the core-updates branch. Turns out it is already fixed by b4ad57ae3e5249ee7402b2ab3c41104ce9c01529 and core-updates evaluations are still broken :(. Mathieu From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 08:32:53 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 12:32:53 +0000 Received: from localhost ([127.0.0.1]:56003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luDg5-00034k-7B for submit@debbugs.gnu.org; Fri, 18 Jun 2021 08:32:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58124) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luDg3-00034W-Pi for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 08:32:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45720) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luDfx-0002iO-Nr; Fri, 18 Jun 2021 08:32:45 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54538 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luDfw-0003lY-PM; Fri, 18 Jun 2021 08:32:45 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Mathieu Othacehe Subject: Re: bug#49025: [PATCH core-updates 00/37] Support cross-compilation with meson References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <87k0mrd2tu.fsf@gnu.org> Date: Fri, 18 Jun 2021 14:32:43 +0200 In-Reply-To: <87k0mrd2tu.fsf@gnu.org> (Mathieu Othacehe's message of "Fri, 18 Jun 2021 09:55:25 +0200") Message-ID: <87k0mrfj4k.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos , 49025@debbugs.gnu.org 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 (---) Hi, Mathieu Othacehe skribis: > I'd like to apply your patches to review them more closely, but I'm > having some troubles applying them from GNUS. Did you use "git > send-email" or another mechanism? Patches are attached, which makes it a bit trickier to apply them. Unfortunately mumi seems to be unable to extract them via URLs like . Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 10:58:15 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 14:58:15 +0000 Received: from localhost ([127.0.0.1]:57593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luFwl-0000yu-8x for submit@debbugs.gnu.org; Fri, 18 Jun 2021 10:58:15 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:57884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luFwj-0000yl-08 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 10:58:13 -0400 Received: from butterfly.local ([188.188.242.184]) by albert.telenet-ops.be with bizsmtp id JeyA2500P3zRM2s06eyAhn; Fri, 18 Jun 2021 16:58:11 +0200 Message-ID: Subject: Re: bug#49025: [PATCH core-updates 00/37] Support cross-compilation with meson From: Maxime Devos To: Mathieu Othacehe Date: Fri, 18 Jun 2021 16:58:01 +0200 In-Reply-To: <87k0mrd2tu.fsf@gnu.org> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <87k0mrd2tu.fsf@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-Uf+wQUn2xJ81Tmsr0Xbw" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624028291; bh=rNA2QAjPlPcx1aq7wRbjNLoN2/R1AuEcpxzfLwSml+o=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=XS/BGzo0AGCLssCteq8yH6hCoB8lSnT1UOrEVJ/r83CJb3o1OM5am6C/M0BuG/9Lb nKllo0n/md1w5N3lXd3rfzkMGI+B0Zotg5REgVKAzcnTLfI6trSdrKWlxeDlOoC66Y ZUIDOWon/uttAPHhxSv89RkEG4VBY8e2ho8IXcgI9ofso2Bo/SdEVpxTXaXvl6E3TC zrsZ5VBIkTAeX04HLMsMHj8XXTbWxfvaU13HNp/ZYE5/5XBzvm6xvfqVHFEJ/YBKff fV58se0qt8QYj/REnXPpiazREFYguUDMNtbPZe+KhACiPRxIH8JoArT64B9G0UEB3A 9SSfnXyTLZMvA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: 49025@debbugs.gnu.org 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.7 (-) --=-Uf+wQUn2xJ81Tmsr0Xbw Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mathieu Othacehe schreef op vr 18-06-2021 om 09:55 [+0200]: > Hello Maxime, >=20 > I had a first look to this patchset, this is awesome work. I like how > you use G-exp in build expressions to fix cross-compilation issues. >=20 > I'd like to apply your patches to review them more closely, but I'm > having some troubles applying them from GNUS. Did you use "git > send-email" or another mechanism? Some combination of "git send-email", "git format-patch --stdout --attach o= rigin", "git imap-send", manually fixing "References", "In-Reply-To" and "To" heade= rs, moving the mails to the =E2=80=98outbox=E2=80=99 of the e-mail client, tryi= ng to flush the outbox, which didn't do anything and opening the mails in the out= box and sending them individually. I'll resend the patches with "git send-email", as a v2 (but the content is identical). > It would also be great if we could manage to have meson cross-compile > binaries for armhf/aarch64. [... I was thinking of cross-compiling of cross-compiling for the Hurd. The glib-or-gtk-build-system would need cross-building support as well, but it's =E2=80=98merely=E2=80=99 a variant of gnu-build-system with two ex= tra phases, so that should be easy. Greetings, Maxime. --=-Uf+wQUn2xJ81Tmsr0Xbw 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+4iGRcl7gUCYMy0eRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7s42AQDBEx4oNLZzj6Q3QMYRXLlsG57/ 0Ld4GJEPY2AVmnuIzwD/Rj2ewE6Niqbz0F4bDH4ukEyI4UBD6mXFFf99Cs3M8QI= =vGbw -----END PGP SIGNATURE----- --=-Uf+wQUn2xJ81Tmsr0Xbw-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:09:57 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:09:57 +0000 Received: from localhost ([127.0.0.1]:57683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH49-0002oE-AG for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:09:57 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH47-0002o5-LN for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:09:56 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01g9tHv; Fri, 18 Jun 2021 18:09:54 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 01/37] utils: Define target-linux? predicate. Date: Fri, 18 Jun 2021 18:09:00 +0200 Message-Id: <20210618160936.18972-1-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032594; bh=KuxsCFQnj4ZbArXRFEqUpWBp+xjAPFA4gW0yO+6p0Uk=; h=From:To:Cc:Subject:Date:Reply-To; b=T01CmRzB5t3B0a+VAFnBuoxxuIRNNzvKJcJP80w2c1U4P7LyYDJ7IaV36t7jh6Q8w DW5KIAn+xLC6mSdtw1up+JQWMmn9rDWhfzM35heNxF+Iop2SpV2dVoztyBO+bOO600 qJFBOke9/ZRE/WP7EDx/KEJKrj46kg6B0BEjfuokftfXsqpFb2uCfwlbi3y6y4MCRH ixmTV7/HgBvJniIOSdxIiMeEVkyOgop8TN7d/ry8X12VTXGzyuPXLsodnVWQD8U6zI x4vCnLYSsP7hYiUDUEH2iH4SUYucRWZAcjRjhFEeU3p+4+9zo36bPT/UsJRqAko2Qd AeK9o4H9NEPzg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * guix/utils.scm (target-linux?): New predicate. * tests/utils.scm ("target-linux?"): Test it. ("target-mingw?"): Also test ‘target-mingw?’. --- guix/utils.scm | 6 ++++++ tests/utils.scm | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index 19990ceb8a..4ff2602e23 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2020 Maxim Cournoyer ;;; Copyright © 2021 Simon Tournier ;;; Copyright © 2021 Chris Marusich +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -81,6 +82,7 @@ %current-system %current-target-system package-name->name+version + target-linux? target-mingw? target-arm32? target-aarch64? @@ -543,6 +545,10 @@ a character other than '@'." (idx (values (substring spec 0 idx) (substring spec (1+ idx)))))) +(define* (target-linux? #:optional (target (or (%current-target-system) + (%current-system)))) + (string-contains target "linux")) + (define* (target-mingw? #:optional (target (%current-target-system))) (and target (string-suffix? "-mingw32" target))) diff --git a/tests/utils.scm b/tests/utils.scm index 7fcbb25552..80a0e669a4 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2016 Mathieu Lirzin ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -289,6 +290,22 @@ skip these tests." (string-closest "hello" '("kikoo" "helo" "hihihi" "halo")) (string-closest "hello" '("aaaaa" "12345" "hellohello" "h")))) +(test-equal "target-linux?" + '(#t #f #f #t) + (map (compose ->bool target-linux?) + '("i686-linux-gnu" "i686-w64-mingw32" + ;; Checking that "gnu" is present is not sufficient, + ;; as GNU/Hurd exists. + "i686-pc-gnu" + ;; Some targets have a suffix. + "arm-linux-gnueabihf"))) + +(test-equal "target-mingw?" + '(#f #f #t) + (map (compose ->bool target-mingw?) + '("i686-linux-gnu" "i686-pc-gnu" + "i686-w64-mingw32"))) + (test-end) (false-if-exception (delete-file temp-file)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:08 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:08 +0000 Received: from localhost ([127.0.0.1]:57689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4J-0002p7-KK for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:08 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4H-0002o5-QV for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:06 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gA5L4; Fri, 18 Jun 2021 18:10:05 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 02/37] utils: Define a target-x86-32? and target-x86-64? predicate. Date: Fri, 18 Jun 2021 18:09:01 +0200 Message-Id: <20210618160936.18972-2-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032605; bh=lf5YV93HuGoFIHD1h6x01QuYB2H0sCsCvf+MhMqf3Ic=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=t2aoUhCcPqzCs4Xp2GpAvJhgzOwH+DeENaDzQ2HJLNt6zfC0OuUTddBOqWiB3w7Jw BibaG8bzAMxLhLvu91T88+m8F9pz2rN1mKxhNMMw8FvyxebJLeFeRNSzKfPGg+MWpk lQHuZwHP67OMHPlLjuVgVou8VRjD8dptDdsKiyO3lJf9YKSo98q/Z4+8+SK1J1PguP oQK8AFQ2jPWDL2CeQhenqbVEgp+5g/+fTPKckiDZo8yFRsjHwbWXaXAEbJ15CIR5d1 SKEA7xyrisxCTmDDR/400P8wrixuiUgYSOWDVkvtT2+FOmgPw2TBK6USOswDF/k2+4 aUqKxC0+/gXGw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * guix/utils.scm (target-x86-32?, target-x86-64?): New predicates. * tests/utils.scm ("target-x86-32?", "target-x86-64?"): New tests. --- guix/utils.scm | 20 ++++++++++++++++++++ tests/utils.scm | 23 +++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index 4ff2602e23..2256ea2ca6 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -84,6 +84,8 @@ package-name->name+version target-linux? target-mingw? + target-x86-32? + target-x86-64? target-arm32? target-aarch64? target-arm? @@ -553,6 +555,24 @@ a character other than '@'." (and target (string-suffix? "-mingw32" target))) +(define* (target-x86-32? #:optional (target (or (%current-target-system) + (%current-system)))) + "Is the architecture of TARGET a variant of Intel's 32-bit architecture +(IA32)?" + ;; Intel also has a 16-bit architecture in the iN86 series, i286 + ;; (see, e.g. https://en.wikipedia.org/wiki/Intel/808286) so this + ;; procedure is not named target-x86?. + (or (string-prefix? "i386-" target) + (string-prefix? "i486-" target) + (string-prefix? "i586-" target) + (string-prefix? "i686-" target))) + +(define* (target-x86-64? #:optional (target (or (%current-target-system) + (%current-system)))) + "Is the architecture of TARGET a variant of Intel/AMD's 64-bit +architecture (x86_64)?" + (string-prefix? "x86_64-" target)) + (define* (target-arm32? #:optional (target (or (%current-target-system) (%current-system)))) (string-prefix? "arm" target)) diff --git a/tests/utils.scm b/tests/utils.scm index 80a0e669a4..92439b5587 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -306,6 +306,29 @@ skip these tests." '("i686-linux-gnu" "i686-pc-gnu" "i686-w64-mingw32"))) +(test-equal "target-x86-32?" + '(#f #f #f #t #t #t #t #f) + ;; These are (according to Wikipedia) two RISC architectures + ;; by Intel and presumably not compatible with the x86-32 series. + (map target-x86-32? + '("i860-gnu" "i960-gnu" + ;; This is a 16-bit architecture + "i286-gnu" + ;; These are part of the x86-32 series. + "i386-gnu" "i486-gnu" "i586-gnu" "i686-gnu" + ;; Maybe this one will exist some day, but not yet. + "i786-gnu"))) + +(test-equal "target-x86-64?" + '(#t #f #f #f) + (map target-x86-64? + `("x86_64-linux-gnu" "i386-linux-gnu" + ;; Just because it includes "64" doesn't make it 64-bit. + "aarch64-linux-gnu" + ;; Note that (expt 2 109) in decimal notation starts with 64. + ;; However, it isn't 32-bit. + ,(format #f "x86_~a-linux-gnu" (expt 2 109))))) + (test-end) (false-if-exception (delete-file temp-file)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:13 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:13 +0000 Received: from localhost ([127.0.0.1]:57697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4O-0002pc-8L for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:12 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4L-0002o5-HW for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:09 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gA8Ld; Fri, 18 Jun 2021 18:10:09 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 03/37] packages: Define this-package-input and this-package-native-input. Date: Fri, 18 Jun 2021 18:09:02 +0200 Message-Id: <20210618160936.18972-3-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032609; bh=ktlZPKOFCiKBCSKOml0XVUAO70kiPtFkDzCU75II8EQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=cvmCAGKwLgN88eu8pcUIdZP6m4oZGhdpckDMlAVrs8nmFEETqpDgIG6XdOgTnkSr5 +asQiBurFdEb7k/YnHYop16KaRDRhxkO4+C37kVa6Bygt9k9jtNpwdcudCCcGxXYFh CDUjivqKwDPZjvOJwaQ/uctRrh20nwPvA6adb16U1An99fy8JXCd6D1DG5gwLeRjf+ Tzj4aIUea6INP6N4YDl2XQ/K4Hi6vqhnpMbr1czo2cm+paIiMRSy/0w7fv/lxyJrI5 uTl54yJRqHLe+F6pxsrWjY/ZsoZheCBB+bvAUy8XcVlOtA4asTIrQCHNKEP1y6oPA1 0ARwKGoq94DxA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) These macros are intended to be used in build phases. More precisely, (assoc-ref %build-inputs "input") can be replaced by #$(this-package-input "input") or #+(this-package-native-input "native-input") as appropriate. * guix/packages.scm (package-input, package-native-input): New (unexported) procedures. (this-package-input, this-package-native-input): New macros. --- guix/packages.scm | 29 +++++++++++++++++++++++++++++ tests/packages.scm | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/guix/packages.scm b/guix/packages.scm index a66dbea1b7..80c8bbebf0 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -108,6 +108,9 @@ deprecated-package package-field-location + this-package-input + this-package-native-input + package-direct-sources package-transitive-sources package-direct-inputs @@ -513,6 +516,32 @@ object." #f))) (_ #f))) +(define (package-input package name) + "Return the package input NAME of PACKAGE--i.e., an input +from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not +considered. If this input does not exist, return #f instead." + (and=> (or (assoc-ref (package-inputs package) name) + (assoc-ref (package-propagated-inputs package) name)) + car)) + +(define (package-native-input package name) + "Return the native package input NAME of PACKAGE--i.e., an input +from the ‘native-inputs’ field. If this native input does not exist, +return #f instead." + (and=> (assoc-ref (package-native-inputs package) name) + car)) + +(define-syntax-rule (this-package-input name) + "Return the input NAME of the package being defined--i.e., an input +from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not +considered. If this input does not exist, return #f instead." + (package-input this-package name)) + +(define-syntax-rule (this-package-native-input name) + "Return the native package input NAME of the package being defined--i.e., +an input from the ‘native-inputs’ field. If this native input does not +exist, return #f instead." + (package-native-input this-package name)) ;; Error conditions. diff --git a/tests/packages.scm b/tests/packages.scm index 47d10af5bc..91ec38e4cc 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -1851,6 +1852,39 @@ (package-location (specification->package "guile@2")) (specification->location "guile@2")) +(test-eq "this-package-input, exists" + hello + (package-arguments + (dummy-package "a" + (inputs `(("hello" ,hello))) + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-input, exists in propagated-inputs" + hello + (package-arguments + (dummy-package "a" + (propagated-inputs `(("hello" ,hello))) + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-input, does not exist" + #f + (package-arguments + (dummy-package "a" + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-native-input, exists" + hello + (package-arguments + (dummy-package "a" + (native-inputs `(("hello" ,hello))) + (arguments (this-package-native-input "hello"))))) + +(test-eq "this-package-native-input, does not exists" + #f + (package-arguments + (dummy-package "a" + (arguments (this-package-native-input "hello"))))) + (test-end "packages") ;;; Local Variables: -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:18 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:18 +0000 Received: from localhost ([127.0.0.1]:57713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4T-0002qS-Vf for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:18 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4N-0002o5-Dl for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:11 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAALo; Fri, 18 Jun 2021 18:10:11 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 04/37] net-base: Make #:builder argument a G-expression. Date: Fri, 18 Jun 2021 18:09:03 +0200 Message-Id: <20210618160936.18972-4-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032611; bh=OUVVb2aVinBOmXNC982I6Xbat+zZCYFQMkoE2v2einI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=c4NCQdp16Iv7koj3wYZWfq86k7imqQ8JScakkJ1gM5dHmvN15ZFCkcKIps6ZGtqYC pXZM1NgOA4pXA7cy9vvI1r/GPSy9bFn6e89FCQddPKaqHZeukNXFP4KBHl1mh9MSoZ LM6X+yJkiJZZrUyRDqCWXOByuV+z5BUAtjveWvCYdB4WInkjW8h1ocCp6WgTUtdQjG NcJ7OEFrvE7vuRcliCB6YWZ91K1sTKeXXXqndGNrhdaGNao9gQvX5NgBk1MYJOhRtu u68yb9XELlxwL1BEIzX+9nC5dN7JWSP//Z0zweYOWCL7l0m1Br/+VauNHCTg5KPY/G CmFlQpL+RIkiw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This allows using ungexp-native and this-package-native-input later. * gnu/packages/admin.scm (net-base)[arguments]{#:builder}: Make this a G-expression. --- gnu/packages/admin.scm | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 531686fdbb..5c7e41f51b 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -74,6 +74,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (gnu packages) #:use-module (gnu packages algebra) #:use-module (gnu packages autogen) @@ -936,25 +937,25 @@ to allow automatic login and starting any app.") (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) - #:builder (begin - (use-modules (guix build utils) - (srfi srfi-26)) - - (let* ((source (assoc-ref %build-inputs "source")) - (tar (assoc-ref %build-inputs "tar")) - (xz (assoc-ref %build-inputs "xz")) - (output (assoc-ref %outputs "out")) - (etc (string-append output "/etc"))) - (setenv "PATH" (string-append xz "/bin")) - (invoke (string-append tar "/bin/tar") "xvf" - source) - (chdir ,(string-append "netbase-" version)) - (mkdir-p etc) - (for-each copy-file - '("etc-services" "etc-protocols" "etc-rpc") - (map (cut string-append etc "/" <>) - '("services" "protocols" "rpc"))) - #t)))) + #:builder ,#~(begin + (use-modules (guix build utils) + (srfi srfi-26)) + + (let* ((source (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar")) + (xz (assoc-ref %build-inputs "xz")) + (output (assoc-ref %outputs "out")) + (etc (string-append output "/etc"))) + (setenv "PATH" (string-append xz "/bin")) + (invoke (string-append tar "/bin/tar") "xvf" + source) + (chdir #$(string-append "netbase-" version)) + (mkdir-p etc) + (for-each copy-file + '("etc-services" "etc-protocols" "etc-rpc") + (map (cut string-append etc "/" <>) + '("services" "protocols" "rpc"))) + #t)))) (native-inputs `(("tar" ,tar) ("xz" ,xz))) (synopsis "IANA protocol, port, and RPC number assignments") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:18 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:18 +0000 Received: from localhost ([127.0.0.1]:57717 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4U-0002qV-9q for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:18 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4O-0002o5-DS for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:12 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gABLw; Fri, 18 Jun 2021 18:10:12 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 05/37] net-base: Fix cross-compilation, eliminating %build-inputs & friends Date: Fri, 18 Jun 2021 18:09:04 +0200 Message-Id: <20210618160936.18972-5-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032612; bh=7CCAUBNV9RJ5wmDTt8PN/AU2ubDq/YhEKCtv/jZqj2w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=tCcn/73ysQWxESsj1nlDS/8X/VacufQuveSq6ekD6aVWuqMAFk+gxD+2WH3qjkq/B RdYT9LERQHhnlVjaNoeM1Yh0ySXdSWKf1nwwNE+88hFe051nJbBfcKeeWT0qVc3M7x 7VhgJMMphWU/W+jNmGnaFdNPAmml6sgpxp9amI17Tc1uRb6fp0yk7c4o2mK4A7h3zZ c0Pc0rGtjdnz5G5Z3JbzUzevz3MIHoNSk53j+A6pHZABnQayn/A5D2/QYfY4mddND6 NKfy+PZ1VMCuV4y8+tZ2joXbwIm8hoQMwfOpiAiKOdywuHY8LEvKrynclVgSEdZbrE 4YVadVIhTLwaQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) "source" is not in %build-inputs when cross-compiling, so another approach for referring to the package source code is needed. * gnu/packages/admin.scm (net-base)[arguments]<#:builder>: Eliminate %build-inputs and %outputs. --- gnu/packages/admin.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 5c7e41f51b..f499a1252b 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -941,10 +941,10 @@ to allow automatic login and starting any app.") (use-modules (guix build utils) (srfi srfi-26)) - (let* ((source (assoc-ref %build-inputs "source")) - (tar (assoc-ref %build-inputs "tar")) - (xz (assoc-ref %build-inputs "xz")) - (output (assoc-ref %outputs "out")) + (let* ((source #+(package-source this-package)) + (tar #+(this-package-native-input "tar")) + (xz #+(this-package-native-input "xz")) + (output #$output) (etc (string-append output "/etc"))) (setenv "PATH" (string-append xz "/bin")) (invoke (string-append tar "/bin/tar") "xvf" -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:19 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:19 +0000 Received: from localhost ([127.0.0.1]:57719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4U-0002qh-ON for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:19 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4P-0002o5-MK for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:14 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gADM8; Fri, 18 Jun 2021 18:10:13 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 06/37] net-base: Don't cross-compile. Date: Fri, 18 Jun 2021 18:09:05 +0200 Message-Id: <20210618160936.18972-6-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032613; bh=xjDeyamV9yxjs2aY6I5pdFnCmGm20uQOQ9gNpihMQQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=rPTS35lIVSaHJlKlXeO/p20dKg0YT1HWteGMk71oWQM2/Uaf5OLte3R8KHO0M5u6/ 7SM7Mz11F9SaqeXmdFm6ZEZry4jfAFB2wX7+rOlKtgJCpu1t7HkTSTiPdAA3brV0Jg gPEpSChCyS9+F6UZvEeb+U897avBHfNcAzfbmaoZF4CEBegjMS7kNTikF+s+13Pb2J CdEdNIVHXj0TyD3qVWCIhv8ge/1poFoBUwSUCWtOw/DkkMc9Pn3LgTeJXF0LDPvC82 BygPuQNKcdZVHmefOzkDe9iQ9nogtIEOeTDUJytO2wXZ5HT0zdknaHnEDZW9SICv3V CtGCqiyxF2rIw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) net-base is pure data, so cross-compiling is pointless. * gnu/packages/admin.scm (net-base)[arguments]<#:target>: Set to #f. (net-base)[arguments]<#:allowed-references>: Disallow all references. --- gnu/packages/admin.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index f499a1252b..5e41ba9967 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -937,6 +937,11 @@ to allow automatic login and starting any app.") (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) + ;; This package consists solely of architecture-independent + ;; tables. Cross-compilation is pointless! Make sure we'll + ;; always get the same derivation. + #:target #f + #:allowed-references () #:builder ,#~(begin (use-modules (guix build utils) (srfi srfi-26)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:34 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:34 +0000 Received: from localhost ([127.0.0.1]:57723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4V-0002qu-AM for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:34 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4Q-0002o5-Cz for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:14 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gADMF; Fri, 18 Jun 2021 18:10:14 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 07/37] tzdata: Don't bother with cross-compiling. Date: Fri, 18 Jun 2021 18:09:06 +0200 Message-Id: <20210618160936.18972-7-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032614; bh=kOQUqdfe/b2Ix6iebNw4GykUprcUIzEM0B9Sc62yn8Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=AIxvIvayYgTMGYgcZSLrlYaWCvgk+cm6qg/rXlLydCG89ijXE0s1wmrgEEtH6P4Cd tcrVr+YsV87CT+s3YPphZ4gWoL8Kb/zQiEX1ObL7nuQpJmmdpxMKrBu6JDtrQCuYjE E7xr46W9iDf5b4V88bCCpF9hG36fTFuFXjIQdDBi5f2CiIkDljqQ/xgvAbNA6xvZp9 6qmpemTTRfKBgOOU3a4sVAUNGG88FWVT1asuKP40RG+cHjHlCbb38G6i1ZC1NQ+Md6 ATeMv5b65oUbtgzeMtriJAOYSQUS92BkclHqfIWQHxfLnRAKM6fgwyDXYwdlzVvo4Z 06He4KETdyFpg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) The time zone database is architecture-independent, so trying to cross-compile it is pointless! * gnu/packages/base.scm (tzdata)[arguments]<#:target>: Set to #f. (tzdata)[allowed-references]: Only include the "out" output itself, to make sure no (architecture-dependent) binaries are installed. --- gnu/packages/base.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index d30299a7b6..2674be8048 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2020 Vitaliy Shatrov ;;; Copyright © 2020 Chris Marusich ;;; Copyright © 2021 Leo Le Bouter +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -1251,6 +1252,14 @@ command.") (build-system gnu-build-system) (arguments `(#:tests? #f + ;; This consists purely of (architecture-independent) data, + ;; so ‘cross-compilation’ is pointless here! + ;; (The binaries zic, dump, and tzselect are deleted in the post-install + ;; phase.) + #:target #f + ;; share/zoneinfo/posix is a symlink to share/zoneinfo, + ;; so include the package itself in #:allowed-references. + #:allowed-references ("out") #:make-flags (let ((out (assoc-ref %outputs "out")) (tmp (getenv "TMPDIR"))) (list (string-append "TOPDIR=" out) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:34 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:35 +0000 Received: from localhost ([127.0.0.1]:57773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4k-0002tJ-Dl for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:34 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4R-0002q5-D7 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:16 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAEMN; Fri, 18 Jun 2021 18:10:14 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 08/37] libgpg-error: Remove trailing #f from phases. Date: Fri, 18 Jun 2021 18:09:07 +0200 Message-Id: <20210618160936.18972-8-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032614; bh=UkBFl7DBKUemJe3cRqGofUDVrc8TErEYB0dd5362VyE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=mX0AoCE+OGLrpJGEA0uZM6C8B3wolxvScoxsvXOgL/IT2EugWrscwzLmDMbYDM9AN d2TuZf+/nQFOM7yHV7lsFUelDFMoNjoT8T5TLivrJouoTYaeI2cG9xz6hsNlsmC4Xh suoNBU0zopxV4x9Ym23DmaWXm2ZHBcE0ONYxuMW7x00oL7ibsRVD7MWU5BqYd8e+nc 3RPcYraj+xkzvTogYWZiICR7UQsKhPMtciTg1n/AnlwtyRVzW6hh9yif1Gk2/F2oTH HrhGeTIwi9Pho109IBVUX47duwaQ3Cm55PqXJT8oHmAhW/p/ffESIiB3LMiq328eEV 2ILGCCmri4grA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) These aren't required anymore. * gnu/packages/gnupg.scm (libgpgerror)[arguments]{cross-symlinks}: Remove trailing #f. --- gnu/packages/gnupg.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index cb481b38e1..2f44e6ec6a 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -114,8 +114,7 @@ (string-append x "-unknown-linux-gnu"))))) (symlink (string-append "lock-obj-pub." triplet ".h") - "src/syscfg/lock-obj-pub.linux-gnu.h")) - #t)))) + "src/syscfg/lock-obj-pub.linux-gnu.h")))))) '())) (native-inputs `(("gettext" ,gettext-minimal))) (home-page "https://gnupg.org") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:35 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:35 +0000 Received: from localhost ([127.0.0.1]:57775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4k-0002tW-SM for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:35 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4R-0002o5-Ly for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:16 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAFMW; Fri, 18 Jun 2021 18:10:15 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 09/37] libgpg-error: Prevent silent miscompilation some systems. Date: Fri, 18 Jun 2021 18:09:08 +0200 Message-Id: <20210618160936.18972-9-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032615; bh=nKM9iRbL4pxeve/Z9zTlm79RMuw3U+bWD4uPyj+c1VU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=aD/UB1WTjJy6LNqYpKmBx87Dz1+UYM26co6HpDIGYdk6xQFxhsC3TbHqzZ4nUYE5X rYQT3WYKAwbudmjo0Die4qoaCQzJJQ4bn+C3FSslvGIUNNW+LGhez9+9GJ3E8aRXv4 4++xikxiA4dA7K3ZVyDG9Sl2oIJP0cDsH5rPyB1OlniR0fHd7rhNQfGUeshsOT/kCd XhJ4CnlOtzzgS7MGs8FvY03NGqeRNZ6nUWgKeDxNGnwzqFwxN1F2bZOyUO/96nRZkR sfqs3SpgCnMVNz3THhxHY2UH2Rk+ig+0ZK/hxoBX3cu1f75eNrS6OMYnPFmbT5Lb8Z NQGBu1ME6BcKg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/gpg.scm (libgpgerror)[arguments]<#:phases>{cross-symlinks}: Only link to src/syscfg/lock-obj-pub.linux-gnu.h if the package is being compiled for a Linux target. Do not link either if the architecture is unknown, as the headers vary with the architecture. --- gnu/packages/gnupg.scm | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 2f44e6ec6a..de213d381f 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2018 Björn Höfling ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Fredrik Salomonsson +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -77,6 +78,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system perl) #:use-module (guix build-system python) + #:use-module (ice-9 match) #:use-module (srfi srfi-1)) (define-public libgpg-error @@ -94,27 +96,37 @@ (build-system gnu-build-system) (arguments (if (%current-target-system) - `(#:modules ((ice-9 match) - (guix build gnu-build-system) + `(#:modules ((guix build gnu-build-system) (guix build utils)) #:phases (modify-phases %standard-phases ;; When cross-compiling, some platform specific properties cannot ;; be detected. Create a symlink to the appropriate platform - ;; file. See Cross-Compiling section at: + ;; file if required. Note that these platform files depend on + ;; both the operating system and architecture! + ;; + ;; See Cross-Compiling section at: ;; https://github.com/gpg/libgpg-error/blob/master/README (add-after 'unpack 'cross-symlinks - (lambda* (#:key target inputs #:allow-other-keys) - (let ((triplet - (match (string-take target - (string-index target #\-)) - ("armhf" "arm-unknown-linux-gnueabi") - ("mips64el" "mips-unknown-linux-gnu") - (x - (string-append x "-unknown-linux-gnu"))))) - (symlink - (string-append "lock-obj-pub." triplet ".h") - "src/syscfg/lock-obj-pub.linux-gnu.h")))))) + (lambda _ + (define (link triplet source) + (symlink (string-append "lock-obj-pub." triplet ".h") + (string-append "src/syscfg/lock-obj-pub." + source ".h"))) + ,(let* ((target (%current-target-system)) + (architecture + (string-take target (string-index target #\-)))) + (cond ((target-linux? target) + (match architecture + ("armhf" + `(link "arm-unknown-linux-gnueabi" "linux-gnu")) + ("mips64el" + `(link "mips-unknown-linux-gnu" "linux-gnu")) + ;; Don't always link to the "linux-gnu" + ;; configuration, as this is not correct for + ;; all architectures. + (_ #t))) + (#t #t))))))) '())) (native-inputs `(("gettext" ,gettext-minimal))) (home-page "https://gnupg.org") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:41 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:41 +0000 Received: from localhost ([127.0.0.1]:57777 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4l-0002te-9q for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:41 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4T-0002q5-6s for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:17 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAGMp; Fri, 18 Jun 2021 18:10:16 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 10/37] libgpgerror: Maybe fix a cross-compilation bug. Date: Fri, 18 Jun 2021 18:09:09 +0200 Message-Id: <20210618160936.18972-10-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032617; bh=IPFgvneN7bHDKrYexwhQDz6Y7ERatBQe8mtSRZ9vaMo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=qcGTRvo2XqOFqWeRMZGNQKdhO3qFQYwHm9VzAB5e3yMixc8z+YEnUFMqUh9trh6jd noSxWTKO1JB8rkh73MWnDqBANN/zyK8bnucDRnzdydbHlLwB9sy6TfK1075Fw6+d4y 63+i7xoKMAn6fpNmrasfVfkItTZfrkBX7t1Ce2MVT1X4zSuA4zCEQJjryNSFjcDwsz jOyB1eUd70t4Iqk+7g3GOHQLdcbH+UNNZq72bF3UGZFrn+dg8cro/zugqyvO3EWMTB baC51LvCvYN7WFHiZzqRIRRBWlD3FC+nabIvxZkXkiQvnXA+/CPzGwbYpBzhsGoVFh FVJpM2DhPDHHQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Previously, a symlink was created at src/syscfg/lock-obj-pub.linux-gnu.h pointing at lock-obj-pub.MANGLED-TARGET.h. I would think this has to be the other way around, but I am not really sure. * gnu/packages/gnupg.scm (gnupg)[arguments]<#:phases>{cross-symlinks}(link): Switch 'triplet' and 'source'. --- gnu/packages/gnupg.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index de213d381f..f5d4118af9 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -110,9 +110,9 @@ (add-after 'unpack 'cross-symlinks (lambda _ (define (link triplet source) - (symlink (string-append "lock-obj-pub." triplet ".h") + (symlink (string-append "lock-obj-pub." source ".h") (string-append "src/syscfg/lock-obj-pub." - source ".h"))) + triplet ".h"))) ,(let* ((target (%current-target-system)) (architecture (string-take target (string-index target #\-)))) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:42 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:42 +0000 Received: from localhost ([127.0.0.1]:57779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4r-0002u0-PP for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:42 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4U-0002q5-0y for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:18 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAHN3; Fri, 18 Jun 2021 18:10:17 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 12/37] libgcrypt: Fix cross-compilation build error. Date: Fri, 18 Jun 2021 18:09:11 +0200 Message-Id: <20210618160936.18972-12-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032617; bh=iyB61VxSz7o0o0YVn5/Hy/tABDE+f8iFAuqZZNSIiJo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=auJhlPrDaF97lr3n3tYWuST0K5d6L3nIq4yPWE77pB8iYTlD226n5TuOslJhFh9/b Zn+10b6+XDy4/gdGi/jG7TLvVvLnWK/F6Ps6qeJKcj+PZPY/Q4CMT5ZD89AojsCZUr BDdUOQBUOKn1NA2S8ZX5ENbNUytEXH6g1i2TMQFlVj0ftuyiNppKzVWa91oySd92Of NUnZYMbR9SRBc2Gc3aVnIe40afbUZcKxrtxjCa9ReZhDUbEhHRCaP1/jCLwm4k82hA dxL5B31M+rnogTr5Q4+tovJs0eD+QqcU4EG74px2fDdDSGy+Nm5oxeBXEjc295EMDq hEU19dLZP2Hyg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) When cross-compiling a package using gnu-build-system, %build-inputs does not exist. But libgcrypt uses %build-inputs anyway. Fix it. * gnu/packages/gnupg.scm (libgcrypt)[arguments]<#:configure-flags>: Make this a G-exp instead of a raw S-exp. Eliminate %build-inputs and use this-package-input instead. --- gnu/packages/gnupg.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 1fee30584c..35cfdf6f43 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -74,6 +74,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) @@ -169,11 +170,12 @@ Daemon and possibly more in the future.") ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one. `(#:configure-flags - (list (string-append "--with-gpg-error-prefix=" - (assoc-ref %build-inputs "libgpg-error-host")) - ;; When cross-compiling, _gcry_mpih_lshift etc are undefined - ,@(if (%current-target-system) '("--disable-asm") - '())))) + ,#~(list (string-append "--with-gpg-error-prefix=" + #$(this-package-input "libgpg-error-host")) + ;; When cross-compiling, _gcry_mpih_lshift etc are undefined + #$@(if (%current-target-system) + #~("--disable-asm") + #~())))) (outputs '("out" "debug")) (home-page "https://gnupg.org/") (synopsis "Cryptographic function library") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:42 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:42 +0000 Received: from localhost ([127.0.0.1]:57781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4s-0002u5-3i for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:42 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4U-0002qa-Qc for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:19 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAHN6; Fri, 18 Jun 2021 18:10:18 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 13/37] wrap-python3: Make #:builder a G-exp instead of a raw S-exp. Date: Fri, 18 Jun 2021 18:09:12 +0200 Message-Id: <20210618160936.18972-13-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032618; bh=IRhMRYtA5bO8jImKpsV7nKzgOxcI4vux1/LJAwKO0vs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=jB/LdXK+elJ1M9Nx6Er5Q1gXdDMYeq4l1LNEMtlkuLJVr68gfsLI//rgNFFS03yhs tUbMMrx/QkSV1tgRiP7qvtJKBv3Gr4AtCHO3DZNSPgoKslcdVd3umSs/YLj7pm6PD5 cihpDvhnbCUgH48jCpM/oJsmxW85WXkwqVhzDkKyPvjGqP5HG3PQqdb1HNRS5+aR2D PVpntGRMgI3PaT0EgJmIjpImdHU9O+Zo2zKqcGgdqG9YtxMbo8tCZ7OJ4w8xXETmG+ 1bp8ZJFczylXgCnGFTMDmS6062P1I2myLi6+Q69b+4ZcmsUx70zct4EUXkPFtXz7dB 2y2kFiLQgXpkw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This allows using ungexp later. * gnu/packages/python.scm (wrap-python3)<#:builder>: Make this a G-expression. --- gnu/packages/python.scm | 46 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index b2ec486d7a..9628836567 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -573,29 +573,29 @@ for more information."))) (arguments `(#:modules ((guix build utils)) #:builder - (begin - (use-modules (guix build utils)) - (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) - (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) - (mkdir-p bin) - (for-each - (lambda (old new) - (symlink (string-append python old) - (string-append bin "/" new))) - `("python3" ,"pydoc3" ,"idle3" ,"pip3") - `("python" ,"pydoc" ,"idle" ,"pip")) - ;; python-config outputs search paths based upon its location, - ;; use a bash wrapper to avoid changing its outputs. - (let ((bash (string-append (assoc-ref %build-inputs "bash") - "/bin/bash")) - (old (string-append python "python3-config")) - (new (string-append bin "/python-config"))) - (with-output-to-file new - (lambda () - (format #t "#!~a~%" bash) - (format #t "exec \"~a\" \"$@\"~%" old) - (chmod new #o755) - #t))))))) + ,#~(begin + (use-modules (guix build utils)) + (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) + (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) + (mkdir-p bin) + (for-each + (lambda (old new) + (symlink (string-append python old) + (string-append bin "/" new))) + `("python3" ,"pydoc3" ,"idle3" ,"pip3") + `("python" ,"pydoc" ,"idle" ,"pip")) + ;; python-config outputs search paths based upon its location, + ;; use a bash wrapper to avoid changing its outputs. + (let ((bash (string-append (assoc-ref %build-inputs "bash") + "/bin/bash")) + (old (string-append python "python3-config")) + (new (string-append bin "/python-config"))) + (with-output-to-file new + (lambda () + (format #t "#!~a~%" bash) + (format #t "exec \"~a\" \"$@\"~%" old) + (chmod new #o755) + #t))))))) (synopsis "Wrapper for the Python 3 commands") (description "This package provides wrappers for the commands of Python@tie{}3.x such -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:42 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:42 +0000 Received: from localhost ([127.0.0.1]:57783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4s-0002uC-Fb for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:42 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4V-0002qa-M2 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:20 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAKNH; Fri, 18 Jun 2021 18:10:19 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 16/37] openssl: Remove trailing #t from phases. Date: Fri, 18 Jun 2021 18:09:15 +0200 Message-Id: <20210618160936.18972-16-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032619; bh=s5lvIzml+iEf2MhU975NrmAtyb33WbQYhk+vg+z1dIY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=PN/QmjN0DUEL1rJLTyQa3aFANWcGEMdJzAOtl1Le+sYgX8R7Md4sMN7DYeN9UwIKM +v991vDfb34GhTUihKWa9IMRxjVNzu/54KSdc9eI/6y8mPgu1nrF85LiyQh33ECNa6 VgBfA0Fuw3bod8yOB523qAzYKvY8bw151X6PYPJIoC9tw0nCJ051zmXTm3SGYyvTnG xgPV1VDvia9xHuoCA1J08z6RzFsumt/w2L8LcSqrPh2Cy37WWw/mJQPqal8jy+sqOW UIMUmvjFfa5UtqBI+R+xXzL3A4z1m2Q9qMFvRpXTJ1D5ShoKf1y1/QvhtrBBcgEuHb KE33NFzbNrPBg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Delete trailing #t. --- gnu/packages/tls.scm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 608a7d05b8..5bfc5545db 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -366,8 +366,7 @@ required structures.") ((string-prefix? "powerpc64" target) "linux-ppc64") ((string-prefix? "powerpc" target) - "linux-ppc"))) - #t))) + "linux-ppc")))))) '()) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) @@ -406,8 +405,7 @@ required structures.") (for-each (lambda (file) (install-file file slib) (delete-file file)) - (find-files lib "\\.a$")) - #t))) + (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation (lambda* (#:key outputs #:allow-other-keys) ;; Move man3 pages and full HTML documentation to "doc". @@ -420,8 +418,7 @@ required structures.") (copy-recursively man3 man-target) (delete-file-recursively man3) (copy-recursively html html-target) - (delete-file-recursively html) - #t))) + (delete-file-recursively html)))) (add-after 'install 'remove-miscellany (lambda* (#:key outputs #:allow-other-keys) @@ -430,8 +427,7 @@ required structures.") (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" ,(package-version this-package) - "/misc")) - #t)))))) + "/misc")))))))) (native-search-paths (list (search-path-specification (variable "SSL_CERT_DIR") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:43 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:43 +0000 Received: from localhost ([127.0.0.1]:57785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4s-0002uK-PG for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:43 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4W-0002r7-D4 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:20 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAKNM; Fri, 18 Jun 2021 18:10:19 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 17/37] openssl: Make the #:phases argument a G-expression. Date: Fri, 18 Jun 2021 18:09:16 +0200 Message-Id: <20210618160936.18972-17-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032619; bh=UpZd7CWWFi0sI2W3ZGUelllQ18on6haAa/t2CC4/2tA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=YItJ0VPpk5ID+YG6nm59eB98GO9419/cbf5oVvbfuvyRgBODgmf6OMJOrHyhKhyXl od5ES2iluL9BtGtjigRwGtwoYh0wHLBHTmZbPYn0qCuf+h7ua3xNe03uscfaQQSBRk qaBwFxR2ri6zMGL907EMoE9j6cUUAG6o7qijU5jv2WQDeyaCq/lvLJ3Bv79zJ4eM52 Fg6xqON7VdUq5xYEkvGbWsju0f/fWxFegpfzZmUQdWr8gubX6zCn/Ok03yj4TavyrL iagLL6NBsQYe0122yYtM7o26DqpGbyC/HAysPxXMNnZkQaG0xHgIhUzYC8GzH9qkjU QL3ToncvuyZ8w== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This allows using this-package-native-input later. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Make this a G-expression. (openssl-1.0)[arguments]<#:phases>: Likewise. --- gnu/packages/tls.scm | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 5bfc5545db..9de9a78e84 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -38,6 +38,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system perl) @@ -341,9 +342,10 @@ required structures.") ;; so we explicitly disallow it here. #:disallowed-references ,(list (canonical-package perl)) #:phases + ,#~ (modify-phases %standard-phases - ,@(if (%current-target-system) - '((add-before + #$@(if (%current-target-system) + #~((add-before 'configure 'set-cross-compile (lambda* (#:key target outputs #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) @@ -367,7 +369,7 @@ required structures.") "linux-ppc64") ((string-prefix? "powerpc" target) "linux-ppc")))))) - '()) + #~()) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -377,9 +379,9 @@ required structures.") (("/usr/bin/env") (string-append (assoc-ref %build-inputs "coreutils") "/bin/env"))) - (invoke ,@(if (%current-target-system) - '("./Configure") - '("./config")) + (invoke #$@(if (%current-target-system) + #~("./Configure") + #~("./config")) "shared" ;build shared libraries "--libdir=lib" @@ -388,13 +390,13 @@ required structures.") ;; conventional. (string-append "--openssldir=" out "/share/openssl-" - ,(package-version this-package)) + #$(package-version this-package)) (string-append "--prefix=" out) (string-append "-Wl,-rpath," lib) - ,@(if (%current-target-system) - '((getenv "CONFIGURE_TARGET_ARCH")) - '()))))) + #$@(if (%current-target-system) + #~((getenv "CONFIGURE_TARGET_ARCH")) + #~()))))) (add-after 'install 'move-static-libraries (lambda* (#:key outputs #:allow-other-keys) ;; Move static libraries to the "static" output. @@ -426,7 +428,7 @@ required structures.") ;; scripts. Remove them to avoid retaining a reference on Perl. (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" - ,(package-version this-package) + #$(package-version this-package) "/misc")))))))) (native-search-paths (list (search-path-specification @@ -471,7 +473,7 @@ required structures.") ;; Parallel build is not supported in 1.0.x. ((#:parallel-build? _ #f) #f) ((#:phases phases) - `(modify-phases ,phases + #~(modify-phases #$phases (add-before 'patch-source-shebangs 'patch-tests (lambda* (#:key inputs native-inputs #:allow-other-keys) (let ((bash (assoc-ref (or native-inputs inputs) "bash"))) @@ -494,9 +496,9 @@ required structures.") ;; Override this phase because OpenSSL 1.0 does not understand -rpath. (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) - (invoke ,@(if (%current-target-system) - '("./Configure") - '("./config")) + (invoke #$@(if (%current-target-system) + #~("./Configure") + #~("./config")) "shared" ;build shared libraries "--libdir=lib" @@ -504,12 +506,12 @@ required structures.") ;; PREFIX/ssl. Change that to something more ;; conventional. (string-append "--openssldir=" out - "/share/openssl-" ,version) + "/share/openssl-" #$version) (string-append "--prefix=" out) - ,@(if (%current-target-system) - '((getenv "CONFIGURE_TARGET_ARCH")) - '()))))) + #$@(if (%current-target-system) + '((getenv "CONFIGURE_TARGET_ARCH")) + '()))))) (delete 'move-extra-documentation) (add-after 'install 'move-man3-pages (lambda* (#:key outputs #:allow-other-keys) @@ -534,7 +536,7 @@ required structures.") ;; scripts. Remove them to avoid retaining a reference on Perl. (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" - ,version "/misc")) + #$version "/misc")) #t))))))))) (define-public libressl -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:43 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:43 +0000 Received: from localhost ([127.0.0.1]:57787 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4t-0002uR-7E for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:43 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4W-0002rE-PT for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:21 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAKNQ; Fri, 18 Jun 2021 18:10:20 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 18/37] openssl: Use G-exp machinery for referring to outputs. Date: Fri, 18 Jun 2021 18:09:17 +0200 Message-Id: <20210618160936.18972-18-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032620; bh=YhqcZofahoNOOGEzlc59JaojMMV5QRbpQX/W3AtKzII=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=flTxiKhyorrkgidYdHTWRPElsM7qJLiZu5c2T1HcyCF4kNYCRnxB0WMwMQhXrst8o z0ta5ql3xlkQS5KtqDXxqnFwAi8+zILepo4LDtiuG7pdfEhetKAfBtc/1Pk3glyUk9 n9KWV2cMhy5PO+l5AV2Ek6hxlkJHRF8nlHT3Br+e1/0vIPQEeLVcXWgZg+D2pYc5dp 3Qm85Hhu066cydBgkUFx9QYhH3DAqjqM/20k4THXT9A8LjIe2OPNUvcyF4S1cuqueI 1YRoJzgKEumvHd7gSiojQW7h4+am1H0B2wYdfmRZllSyty1FCTvyu5DWERDT+jqkri fv7X+ZUFP0z5g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This doesn't fix anything broken, just for simplifying the code a little while we're rebuilding the world anyway. IMHO this makes the code a little more readable. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Don't refer to the association list 'outputs', use #$output, #$output:doc and #$output:static instead. --- gnu/packages/tls.scm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 9de9a78e84..90211c733d 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020 Maxim Cournoyer +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -347,7 +348,7 @@ required structures.") #$@(if (%current-target-system) #~((add-before 'configure 'set-cross-compile - (lambda* (#:key target outputs #:allow-other-keys) + (lambda* (#:key target #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) (setenv "CONFIGURE_TARGET_ARCH" (cond @@ -371,8 +372,8 @@ required structures.") "linux-ppc")))))) #~()) (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) + (lambda _ + (let* ((out #$output) (lib (string-append out "/lib"))) ;; It's not a shebang so patch-source-shebangs misses it. (substitute* "config" @@ -398,23 +399,23 @@ required structures.") #~((getenv "CONFIGURE_TARGET_ARCH")) #~()))))) (add-after 'install 'move-static-libraries - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; Move static libraries to the "static" output. - (let* ((out (assoc-ref outputs "out")) + (let* ((out #$output) (lib (string-append out "/lib")) - (static (assoc-ref outputs "static")) + (static #$output:static) (slib (string-append static "/lib"))) (for-each (lambda (file) (install-file file slib) (delete-file file)) (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; Move man3 pages and full HTML documentation to "doc". - (let* ((out (assoc-ref outputs "out")) + (let* ((out #$output) (man3 (string-append out "/share/man/man3")) (html (string-append out "/share/doc/openssl")) - (doc (assoc-ref outputs "doc")) + (doc #$output:doc) (man-target (string-append doc "/share/man/man3")) (html-target (string-append doc "/share/doc/openssl"))) (copy-recursively man3 man-target) @@ -423,13 +424,12 @@ required structures.") (delete-file-recursively html)))) (add-after 'install 'remove-miscellany - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; The 'misc' directory contains random undocumented shell and Perl ;; scripts. Remove them to avoid retaining a reference on Perl. - (let ((out (assoc-ref outputs "out"))) - (delete-file-recursively (string-append out "/share/openssl-" - #$(package-version this-package) - "/misc")))))))) + (delete-file-recursively (string-append #$output "/share/openssl-" + #$(package-version this-package) + "/misc"))))))) (native-search-paths (list (search-path-specification (variable "SSL_CERT_DIR") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:43 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:44 +0000 Received: from localhost ([127.0.0.1]:57789 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4t-0002uY-Kl for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:43 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4W-0002qa-QE for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:21 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gALNV; Fri, 18 Jun 2021 18:10:20 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 19/37] openssl: Move documentation instead of copying and deleting it. Date: Fri, 18 Jun 2021 18:09:18 +0200 Message-Id: <20210618160936.18972-19-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032620; bh=tccV5/cHu439jXtpaZe5XLAOFrBmvilcUPK5tJbOj6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=CNqwNRrA1+dd73F5G6Zc3Hi4mR6wwEr4jyr+SxAmxSfxDIv3vqPuGvYdADLuPE1is VQJPbWzr0z4SRr3VSwXRHqKJSR27K6b7aU/d+2l7JntcCs2QSz41qcrlu4l2QZy3fN +A+jTmnPUXA/TpXO7hpCrPI4j30pA8iUNSwBKS86DAM7lVY2tWpH7wMrm9KaoGvE+g ZBdMBwhfuPei+dadbfm8/+DkJIRyx/1I6mcTW8PrkUeMaRhYSgMs8TRMRPDzjI+wPf ebklsGWNza18qsQY32eq7iFe+QHUz1LN06JOZRb179VYR+by0EwlkmHsnznUfpADAZ Ri3eBU2GESWww== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/tls.scm (openssl)[arguments]<#:phases>{move-extra-documentation}: Use 'rename-file' instead of 'copy-recursively' and 'delete-file-recursively'. --- gnu/packages/tls.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 90211c733d..9aa0b5a212 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -418,10 +418,10 @@ required structures.") (doc #$output:doc) (man-target (string-append doc "/share/man/man3")) (html-target (string-append doc "/share/doc/openssl"))) - (copy-recursively man3 man-target) - (delete-file-recursively man3) - (copy-recursively html html-target) - (delete-file-recursively html)))) + (mkdir-p (dirname man3-target)) + (mkdir-p (dirname html-target)) + (rename-file man3 man-target) + (rename-file html html-target)))) (add-after 'install 'remove-miscellany (lambda _ -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:44 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:44 +0000 Received: from localhost ([127.0.0.1]:57791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4t-0002ug-TD for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:44 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4X-0002r7-8t for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:21 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gALNd; Fri, 18 Jun 2021 18:10:21 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 20/37] openssl: Move all man pages to separate output, not only man3. Date: Fri, 18 Jun 2021 18:09:19 +0200 Message-Id: <20210618160936.18972-20-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032621; bh=N8OeVKJpboHCfJBxETy5Vb0auS0E6suYXS8mlWbYOmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=rBODmZt7yPEet2QH9uVGoLRzM78y9SIN2YIIvxW208o9KWljXj3RP2RfQU1fD8g76 5mSZroAMV0CkztThV3HwwdWwiFK5gGGoM+5ji+IWGyx5/q1NG8FRVyuxNOWchqtroj D/p29BWXho5F9KA41Hhp8OKNQ6GRhWgpqdOjN2qEbJJpC12h3IXC4WCYKH14uZEf0r gIElQ0GeIsk39+IUg2FyoYQz8CNOIYoB2JuX1bX/6aqWlvFvYVzwpkiqQ7ZSI8q1w+ I4ktQ9TFVe4e20lduOrp6XICWLy+OC/wszWAnPPM7YMfQJynP7HdU6EqHOSYQtDOsl XMMTOykHdbvew== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) There does not seem to be any reason to only move man3 pages. So, move all man pages to a separate output for documentation. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>{move-extra-documentation}: Move all man pages, not only man3. --- gnu/packages/tls.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 9aa0b5a212..c178806805 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -411,16 +411,16 @@ required structures.") (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation (lambda _ - ;; Move man3 pages and full HTML documentation to "doc". + ;; Move man pages and full HTML documentation to "doc". (let* ((out #$output) - (man3 (string-append out "/share/man/man3")) - (html (string-append out "/share/doc/openssl")) + (man (string-append out "/share/man")) + (html (string-append out "/share/doc/openssl")) (doc #$output:doc) - (man-target (string-append doc "/share/man/man3")) + (man-target (string-append doc "/share/man")) (html-target (string-append doc "/share/doc/openssl"))) - (mkdir-p (dirname man3-target)) + (mkdir-p (dirname man-target)) (mkdir-p (dirname html-target)) - (rename-file man3 man-target) + (rename-file man man-target) (rename-file html html-target)))) (add-after 'install 'remove-miscellany -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:44 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:44 +0000 Received: from localhost ([127.0.0.1]:57793 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4u-0002un-7F for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:44 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4X-0002rE-MH for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:22 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAMNq; Fri, 18 Jun 2021 18:10:21 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 21/37] openssl: Find bin/env when cross-compiling. Date: Fri, 18 Jun 2021 18:09:20 +0200 Message-Id: <20210618160936.18972-21-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032621; bh=vhZXOsCczCO429r2Yoc9TLnkfRn6IvuUP6kheXL3cLo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=FSjZvgepbDo1DxjiVNTzZaj92BDTMUMwsQjdWqML9USxD4Wc8PlQjoU6z+B0mHHb6 GY3t2g26GLXycqNneZzm/BbnjggRBxtufc7V4yRpxKcQTjR32mw7nvospU2bNSTgoG +VevQ4XuNruj1lQbU6N0gPqghvudGdr8QU1kKchPJB0u5DWcpMHBI6muAcEfh/6kzt otQ+yG07yHshyC90NWqtfuYgIvIJSHUV9W71uNWSMe/bYTqY2hC+oOm1BkFo3DU5gg 7ESUoJQmO7Ah0tKCKL3j6S8jZpFlnH0jQhbnQ53RZ5fUCPvtL7aXy1Sfkny586u48x kJsG1M4k2TDFw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) %build-inputs does not exist when cross-compiling, so find bin/env by another way. * (openssl)[arguments]<#:phases>{configure}: Don't use '%build-inputs', use 'which' instead. --- gnu/packages/tls.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index c178806805..a4e754e27f 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -376,10 +376,10 @@ required structures.") (let* ((out #$output) (lib (string-append out "/lib"))) ;; It's not a shebang so patch-source-shebangs misses it. + ;; Don't use (assoc-ref %build-inputs "coreutils"), as + ;; %build-inputs is not defined when cross-compiling. (substitute* "config" - (("/usr/bin/env") - (string-append (assoc-ref %build-inputs "coreutils") - "/bin/env"))) + (("/usr/bin/env") (which "env"))) (invoke #$@(if (%current-target-system) #~("./Configure") #~("./config")) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:44 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:45 +0000 Received: from localhost ([127.0.0.1]:57795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4u-0002uu-FS for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:44 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4Y-0002qa-38 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:22 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAMNw; Fri, 18 Jun 2021 18:10:21 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 22/37] openssl: Extract logic for computing CONFIGURE_TARGET_ARCH. Date: Fri, 18 Jun 2021 18:09:21 +0200 Message-Id: <20210618160936.18972-22-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032621; bh=1ERsHqWnvtyigwuip0m1eh/IFO2MV3pns4YrtQZDDxw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=BbxACnsAssGXA2IcyXzVlKr0Y7DqgK3ZfBIP53NtOENhbtcy7pRmHC1CX4F9isyh8 p4SmWZwIvlVacQdB+bggNAf1K0MCUyV1MWBLOl+WCxJdu2ziATbCjNO/3Fxu+izZCo WJJByxNmNNnX1484vWmQdiQ7lEFs1k3Gmu6yzj/AMDbDXmFrlFW54UDg2upwLIOXL6 zV5F4rTCBL4xrdj48BOiQ+H5dumR9kYneBL1ostjazat8XjXCxxxfMNNB+FDZA+gOU aA5H7SIHHa2enoBnklHWudf/a+glXQfI20n4qcQpgjBHtS67//ulF9x17vSfW3sq2N Rm8h0edLvsmCg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) By computing this value outside the build code, new targets can be added without causing rebuilds for other targets. * gnu/packages/tls.scm (target->openssl-target): New procedure. (openssl)[arguments]<#:phases>{set-cross-compile}: Use it. --- gnu/packages/tls.scm | 46 ++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index a4e754e27f..af91e42888 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -313,6 +313,31 @@ required structures.") (define-public guile3.0-gnutls (deprecated-package "guile3.0-gnutls" gnutls)) +(define (target->openssl-target target) + "Return the value to set CONFIGURE_TARGET_ARCH to when cross-compiling +OpenSSL for TARGET." + ;; Keep this code outside the build code, + ;; such that new targets can be added + ;; without causing rebuilds for other targets. + (cond ((string-prefix? "i586" target) + "hurd-x86") + ((string-prefix? "i686" target) + "linux-x86") + ((string-prefix? "x86_64" target) + "linux-x86_64") + ((string-prefix? "mips64el" target) + "linux-mips64") + ((string-prefix? "arm" target) + "linux-armv4") + ((string-prefix? "aarch64" target) + "linux-aarch64") + ((string-prefix? "powerpc64le" target) + "linux-ppc64le") + ((string-prefix? "powerpc64" target) + "linux-ppc64") + ((string-prefix? "powerpc" target) + "linux-ppc"))) + (define-public openssl (package (name "openssl") @@ -351,25 +376,8 @@ required structures.") (lambda* (#:key target #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) (setenv "CONFIGURE_TARGET_ARCH" - (cond - ((string-prefix? "i586" target) - "hurd-x86") - ((string-prefix? "i686" target) - "linux-x86") - ((string-prefix? "x86_64" target) - "linux-x86_64") - ((string-prefix? "mips64el" target) - "linux-mips64") - ((string-prefix? "arm" target) - "linux-armv4") - ((string-prefix? "aarch64" target) - "linux-aarch64") - ((string-prefix? "powerpc64le" target) - "linux-ppc64le") - ((string-prefix? "powerpc64" target) - "linux-ppc64") - ((string-prefix? "powerpc" target) - "linux-ppc")))))) + #$(target->openssl-target + (%current-target-system)))))) #~()) (replace 'configure (lambda _ -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:45 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:45 +0000 Received: from localhost ([127.0.0.1]:57797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4u-0002v1-RD for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:45 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4Y-0002r7-HK for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:22 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAMNz; Fri, 18 Jun 2021 18:10:22 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 23/37] readline: Make #:configure-flags a G-expression. Date: Fri, 18 Jun 2021 18:09:22 +0200 Message-Id: <20210618160936.18972-23-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032622; bh=6pKRGWeWOQaDnklxh6edH5vqNzGDBgspCLih5AvELa8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=LAOw8+62tDPg6PMl6gm5SRPPjMt/yqzVcDp0iIqfOolA4z0jFNsYrcM1JlMOfW6K0 XlsAnavOBBGmiSyo1H6yOFbvGv6Dkcfl5WCr9ntOqyLETDHFMKKCWlyurVcmmKepJS 9gEhboX7IPpqrvpsMathpJbqYd6UVjGiVrS5elNi4c/mqvz/iHEit2rf8a2pcz32KV FF7AiNKgWhrCBTBl4ETxdR1ERh6SvsN/qcS42dkgN2Djsa4bLrrXfZTzSwwHfC3P2r MrP7p1EwX1CqxlLux+wLQ7ALqGm0jsAMsC10B1jYZ6Vy2vEcGtFIcoXB7ipUFxzwcv oonc7F86T+DAw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This allos using ungexp and this-package-input later. * gnu/packages/readline.scm (readline)[arguments]<#:configure-flags>: Make this a G-expression. --- gnu/packages/readline.scm | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm index b4c91675a4..6cfa24c666 100644 --- a/gnu/packages/readline.scm +++ b/gnu/packages/readline.scm @@ -29,6 +29,7 @@ #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (ice-9 format)) (define (patch-url version seqno) @@ -76,19 +77,19 @@ (build-system gnu-build-system) (propagated-inputs `(("ncurses" ,ncurses))) (arguments `(#:configure-flags - (list (string-append "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib") + ,#~(list (string-append "LDFLAGS=-Wl,-rpath -Wl," + (assoc-ref %build-inputs "ncurses") + "/lib") - ;; This test does an 'AC_TRY_RUN', which aborts when - ;; cross-compiling, so provide the correct answer. - ,@(if (%current-target-system) - '("bash_cv_wcwidth_broken=no") - '()) - ;; MinGW: ncurses provides the termcap api. - ,@(if (target-mingw?) - '("bash_cv_termcap_lib=ncurses") - '())) + ;; This test does an 'AC_TRY_RUN', which aborts when + ;; cross-compiling, so provide the correct answer. + #$@(if (%current-target-system) + '("bash_cv_wcwidth_broken=no") + '()) + ;; MinGW: ncurses provides the termcap api. + #$@(if (target-mingw?) + '("bash_cv_termcap_lib=ncurses") + '())) ,@(if (target-mingw?) ;; MinGW: termcap in ncurses -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:45 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:45 +0000 Received: from localhost ([127.0.0.1]:57799 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4v-0002v9-52 for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:45 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4T-0002o5-KP for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:23 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAHMv; Fri, 18 Jun 2021 18:10:17 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 11/37] libgpg-error: Fix cross-compilation error. Date: Fri, 18 Jun 2021 18:09:10 +0200 Message-Id: <20210618160936.18972-11-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032617; bh=po7rDv7BdIVE5g9HkdjKKb8vIZeOm4IuDrvIrTcXbG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=MWSuCGLoZCqIpxJKn68bZ67/y40TPs7gTA273bFG74eewKFWj8fSL6QkGMkZw1ZyV qTyBgcPVr/fKAX0M28TmX1YNyuLXNapGpoBOFcOPzWVVJlWoI0AmQy/3UQn9cA3Qto TrkgW+m1/1g9a6nI1gk/3p39jWG7hgOt1D3vEJ/8QGqPQSmO7tXc46x+9PZbhx88ZK QUI3xB7kxrK5tOeg30YzLPK/k2ALoktixVePCxMHe3LQ1h9F/FDzL+4k7lN+b00qdL JLeME1SXWXOzhXCm0s55a8A7p3vwNK1fTXNjo2bRGHoYn+6K8TOFlpTZ8aX7mM58lz FFcCXOXj0StNg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) TODO: inform upstream about the cross-compilation error. * gnu/packages/gnupg.scm (libgpg-error)[arguments]{fix-gen-lock-obj.sh}: Prevent generated header files from being sprinkled with ‘\c’. --- gnu/packages/gnupg.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index f5d4118af9..1fee30584c 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -100,6 +100,13 @@ (guix build utils)) #:phases (modify-phases %standard-phases + ;; If this is left out, some generated header + ;; files will be sprinkled with ‘\c’, which + ;; the compiler won't like. + (add-after 'unpack 'fix-gen-lock-obj.sh + (lambda _ + (substitute* "src/gen-lock-obj.sh" + (("if test -n `echo -n`") "if ! test -n `echo -n`")))) ;; When cross-compiling, some platform specific properties cannot ;; be detected. Create a symlink to the appropriate platform ;; file if required. Note that these platform files depend on -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:45 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:45 +0000 Received: from localhost ([127.0.0.1]:57801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4v-0002vG-Es for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:45 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4Y-0002rE-V7 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:23 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gANP3; Fri, 18 Jun 2021 18:10:22 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 24/37] readline: Fix build error when cross-compiling. Date: Fri, 18 Jun 2021 18:09:23 +0200 Message-Id: <20210618160936.18972-24-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032622; bh=OE2XkfDDREhGi22ahelmmYnT5woDpIc1bL8b6o9Sgmw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=cIg40XrBTwzH2j3FfX32xW9zTOInB+AHE5iw+WH6KHKGToOTZ2mRyTn9Putk09wa5 4nGlQXYrrzHD0omq+2P7N9zm1hl9X71cBiI1eOKEevph4haZ0i0vq5GOcUu9fRQq3z mURE4zdAU5RNoUU+XDXrVriGlJLqQKCFAlX1Uc53N7/4dDj0Q9H7sVO749BGucetO8 BV4S8xNCNDaQjUi3HHOjuftplaYHYSugS7wF1eEPFimUS+3W7AzYCD/HpT8ULYG2bM PpKKwezSxCbIUD2RijmIyumCnSf0hvd7mtt+PBd50sb0AmoHaxiC5suAhk3q/1OBmn kCv1SmT8o+7fg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) %build-inputs does not exist when cross-compiling, so use this-package-input instead. * gnu/packages/readline.scm (readline)[arguments]<#:configure-flags>: Use this-package-input instead of %build-inputs. --- gnu/packages/readline.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm index 6cfa24c666..f9f2797247 100644 --- a/gnu/packages/readline.scm +++ b/gnu/packages/readline.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019, 2020 Marius Bakke +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -77,9 +78,10 @@ (build-system gnu-build-system) (propagated-inputs `(("ncurses" ,ncurses))) (arguments `(#:configure-flags - ,#~(list (string-append "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib") + ,#~(list (string-append + "LDFLAGS=-Wl,-rpath -Wl," + #$(this-package-input "ncurses") + "/lib") ;; This test does an 'AC_TRY_RUN', which aborts when ;; cross-compiling, so provide the correct answer. -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:46 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:46 +0000 Received: from localhost ([127.0.0.1]:57803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4v-0002vN-PZ for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:46 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4Z-0002qa-Ab for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:23 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gANP9; Fri, 18 Jun 2021 18:10:23 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 25/37] bash: Make #:configure-flags a G-expression. Date: Fri, 18 Jun 2021 18:09:24 +0200 Message-Id: <20210618160936.18972-25-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032623; bh=1zWLyKNdDiD8e2cuo2aK9D7rNa9KmEnbc2E+HBexX54=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=mbYu9Ter/A0xGMRSDYDW5AgI1sBf4SlOXrymBu00E8O6MfTc/g6vAb72ULTDL1HrB hhZ0qeroIuC3+yP7yY54fwDmsvzxt6z36JJA96w5vXhLhv/uw5Ao7yNLJY50xZ/omy TKjA/QrwsSJXObucYqW3j0pGCcqGgpQEdbyCidIkIl3R0YuvdBqbvK1Q1huwKsGhr4 hq5V6CvgfINtnjKUuHLJ7nqoGI11bzPmtOIgJTJfa/mWGG941epWBUDy+ygPGj56Kk N6sthJimJ54UN1XevVP0QetjN3S3lugT1TiNV6b42IgEBX/yrcj0SX16+jNtaI4A+n G4n9yC1DvB7iw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This allows using this-package-input later. * gnu/packages/bash.scm (bash)[arguments]<#:configure-flags>: Make this a G-expression instead of a raw S-expression. --- gnu/packages/bash.scm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 7e98367bbb..b3af873a66 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -109,15 +109,15 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." "-DSSH_SOURCE_BASHRC") " ")) (configure-flags - ``("--with-installed-readline" - ,,(string-append "CPPFLAGS=" cppflags) - ,(string-append - "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "readline") - "/lib" - " -Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib"))) + #~`("--with-installed-readline" + ,#$(string-append "CPPFLAGS=" cppflags) + ,(string-append + "LDFLAGS=-Wl,-rpath -Wl," + (assoc-ref %build-inputs "readline") + "/lib" + " -Wl,-rpath -Wl," + (assoc-ref %build-inputs "ncurses") + "/lib"))) (version "5.1")) (package (name "bash") @@ -143,8 +143,8 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." `(;; When cross-compiling, `configure' incorrectly guesses that job ;; control is missing. #:configure-flags ,(if (%current-target-system) - `(cons* "bash_cv_job_control_missing=no" - ,configure-flags) + #~(cons* "bash_cv_job_control_missing=no" + #$configure-flags) configure-flags) ;; Bash is reportedly not parallel-safe. See, for instance, -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:46 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:46 +0000 Received: from localhost ([127.0.0.1]:57805 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4w-0002vV-4J for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:46 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4Z-0002r7-P6 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:24 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAPPJ; Fri, 18 Jun 2021 18:10:23 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 26/37] bash: Fix cross-compilation build error. Date: Fri, 18 Jun 2021 18:09:25 +0200 Message-Id: <20210618160936.18972-26-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032623; bh=Jg15KuLDc9Pd0cjkQKGHl1QMNvmHzgPBIjg4oyLTNo8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=MeIhL/AXAkCS0Ks/pk3aIRp6Hl5vvRXRESh/RCI76be7865gLLiiMyRM8FSsnHlqM HoblSMmSb6IGYcfB8L6iUzZwBmx5lzK3cfZ8FnlnM9Sl20VpvR3zT4iPN6WX8ZstcI bwqStk/yv5TZp1MDNRKx82B9gYL/RpZsCxwwRW7SQxlMw4OyMRLmRPIanI2c9dZD3/ oKi3hQCMsEwOKgKv+JK/xceaRVXLJbnkW3ojnOpJGqkgs2lvMZ49C/aJ6WaiUC9tkj mjHkdMxRBDstB3fJ12H/n1KHevgK01rwiKqechpkVW9PnUV2CV8eGXFrijdgV5rK77 T+fIkPCq3rNDw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) %build-inputs does not exist when cross-compiling, so use this-package-input instead. * gnu/packages/bash.scm (bash)[arguments]<#:configure-flags>: Use this-package-input instead of %build-inputs. --- gnu/packages/bash.scm | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index b3af873a66..d51ab26bc8 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -103,22 +103,25 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." 1)) (define-public bash - (let* ((cppflags (string-join '("-DDEFAULT_PATH_VALUE='\"/no-such-path\"'" - "-DSTANDARD_UTILS_PATH='\"/no-such-path\"'" - "-DNON_INTERACTIVE_LOGIN_SHELLS" - "-DSSH_SOURCE_BASHRC") - " ")) - (configure-flags - #~`("--with-installed-readline" - ,#$(string-append "CPPFLAGS=" cppflags) - ,(string-append - "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "readline") - "/lib" - " -Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib"))) - (version "5.1")) + (let ((cppflags (string-join '("-DDEFAULT_PATH_VALUE='\"/no-such-path\"'" + "-DSTANDARD_UTILS_PATH='\"/no-such-path\"'" + "-DNON_INTERACTIVE_LOGIN_SHELLS" + "-DSSH_SOURCE_BASHRC") + " ")) + (version "5.1")) + ;; Delay expansion to inside a lexical environment + ;; where this-package is bound. + (define-syntax configure-flags + (identifier-syntax + #~`("--with-installed-readline" + ,#$(string-append "CPPFLAGS=" cppflags) + ,(string-append + "LDFLAGS=-Wl,-rpath -Wl," + ;; %build-inputs does not exist when cross-compiling, + ;; so use this-package-input instead. + #$(file-append (this-package-input "readline") "/lib") + " -Wl,-rpath -Wl," + #$(file-append (this-package-input "ncurses") "/lib"))))) (package (name "bash") (source (origin -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:46 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:46 +0000 Received: from localhost ([127.0.0.1]:57807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4w-0002vc-Ec for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:46 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4a-0002rE-Id for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:24 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAQPV; Fri, 18 Jun 2021 18:10:24 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 28/37] fontconfig: Fix build error when cross-compiling. Date: Fri, 18 Jun 2021 18:09:27 +0200 Message-Id: <20210618160936.18972-28-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032624; bh=E3QkiIRS2uR7h5BsXw4b/WY2KbCrmONCKPV2ehUqpiE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=mhPoUZOvrovpiA2gua9gt63dAJPHgQvycxnTivpMYJS2uG5PahIodreUTDhT7p5Yy VtnUL+7GVPfzb3OSw9FKwvrYWyabtqL6VTClc8KRXsQvwBfh9eK9fQcKYOa0+59Kry CEemYPiqP0isfzePgQa4OMZcHlNZOcnn6+YxgwrjMyWE4rrbRRKZ2oMtVOQzM7Qn0O XQNElaV3jlbWIYWjBXjz9uSPlsVvasZUhLhlshNB5Koey2AE6nuvYWTXy6+OoCzr+5 wUjz8LYto/L7N4/mGfs3o3lnewPUV5uN2a8CYWUoFbASUM3Pte52ZYd+1LzNoH4RbM 7PCnIw2CVyWWg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) %build-inputs does not exist when cross-compiling, so use #$(this-package-input ...) instead. * gnu/packages/fontutils.scm (fontconfig)[arguments]<#:configure-flags>: Use this-package-input instead of %build-inputs. --- gnu/packages/fontutils.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 234f11129a..b0d40efeae 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -353,8 +353,8 @@ Font Format (WOFF).") "--with-cache-dir=/var/cache/fontconfig" ;; register the default fonts (string-append "--with-default-fonts=" - (assoc-ref %build-inputs "font-dejavu") - "/share/fonts") + #$(file-append (this-package-input "font-dejavu") + "/share/fonts")) ;; Register fonts from user and system profiles. (string-append "--with-add-fonts=" -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:47 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:47 +0000 Received: from localhost ([127.0.0.1]:57809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4w-0002vj-OL for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:47 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4b-0002qa-0X for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:25 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAQPc; Fri, 18 Jun 2021 18:10:24 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 29/37] glib: Use a correct python in scripts when cross-compiling. Date: Fri, 18 Jun 2021 18:09:28 +0200 Message-Id: <20210618160936.18972-29-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032624; bh=lCJWeyObrNhygznWt8O1GFxQ1qcJ7GORkrjP1mPEuYY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=k9HaUHOOh1AmPtvpJb3KypOcE6IelfheASKjXjLWHyJOI5I6nugSNd3mbDuNkgcJV PhnT5GO6K939pOYX4Mc7jphxr5OR0kYXHmlsOjyTRo2Otq6UCwi0oNGP3DXJPEHKZ8 K3GP/8VRKUNKa4Nlp/ziz9IxPaHgjlL5cphlyh7+9ZZryf9zR6ZXZedZIU+dA0SUc+ Ld+rjRG1lKjgs4YCtJKCi/2ChIvykCsMUYOihrEpePvf2cAdAjWLULmS43kyAbH5MS wxDsPdE78JmGxMIhNPZBH3Mqio+U/tzKPDZHTtCLc8GosLhcFhH9eZxfEIzqON6ckz CAh7RG9qpBJIw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) During the build, a native python should be used as these scripts will be invoked during the build, but when installed, they should be a python for the system we're compiling for. * gnu/packages/glib.scm (glib)[arguments]<#:phases>{patch-python-references}: Look up "python" in 'native-inputs', not 'inputs'. (glib)[inputs]{python,python-wrapper,bash-minimal}: New inputs. --- gnu/packages/glib.scm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 94276ae0ef..25c5ae494b 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2020 Florian Pelz ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020 Arthur Margerit +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -222,14 +223,19 @@ shared NFS home directories.") #t)) ;; Python references are not being patched in patch-phase of build, ;; despite using python-wrapper as input. So we patch them manually. + ;; + ;; These python scripts are both used during build and installed, + ;; so at first, use a python from 'native-inputs', not 'inputs'. When + ;; cross-compiling, the 'patch-shebangs' phase will replace + ;; the native python with a python from 'inputs'. (add-after 'unpack 'patch-python-references - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs #:allow-other-keys) (substitute* '("gio/gdbus-2.0/codegen/gdbus-codegen.in" "glib/gtester-report.in" "gobject/glib-genmarshal.in" "gobject/glib-mkenums.in") (("@PYTHON@") - (string-append (assoc-ref inputs "python") + (string-append (assoc-ref (or native-inputs inputs) "python") "/bin/python" ,(version-major+minor (package-version python))))) @@ -282,6 +288,13 @@ shared NFS home directories.") ("xsltproc" ,libxslt))) (inputs `(("bash-completion" ,bash-completion) + ;; "python", "python-wrapper" and "bash-minimal" + ;; are for the 'patch-shebangs' phase, to make + ;; sure the installed scripts end up with a correct shebang + ;; when cross-compiling. + ("python" ,python) + ("python-wrapper" ,python-wrapper) + ("bash-minimal" ,(canonical-package bash-minimal)) ("dbus" ,dbus) ("libelf" ,libelf))) (propagated-inputs -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:47 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:47 +0000 Received: from localhost ([127.0.0.1]:57811 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4x-0002vr-3q for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:47 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4b-0002r7-Dg for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:25 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAQPh; Fri, 18 Jun 2021 18:10:25 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 30/37] glib: Verify the cross-compiled python is used in installed scripts. Date: Fri, 18 Jun 2021 18:09:29 +0200 Message-Id: <20210618160936.18972-30-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032625; bh=giAeuQfjk3falpP+LZZcVxXeFPnS4KkQbVcp7Utdx7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=AFvxa2yXjKDlP92ssvseigeXdhtiFl43yrqmL+aFhtZDSpEcPB/FzJFq/LUB7ICh8 0OSjVSdvb/c4bsfTJEDolF2/tQ/5ig+4BXkTpPxr9O2HmNAJFVP3QuyIKnEInkzeud 7qes6m8J1VMnPhvJWHhgYzZYgNAWYbhZKOmLy2LkVZwuIOH8grSrA5mmpZ9NOZCfMt jUw8C888guTRQtizEYangAwEkQvX3eiJhSMrfH959Y499pzh6gvpJ3PjCH6kYfRqDy Dq7pk3E3uKaCnx5gCqhYzRp8w7hrU4BHFy1IJ0KF/NEeuvT3WFSHhcMp/VzDTM6Bpc XhW3IWNYST54A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/glib.scm (glib)[arguments]<#:disallowed-references>: Disallow the native python when cross-compiling. --- gnu/packages/glib.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 25c5ae494b..244544ea6f 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -77,6 +77,8 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix gexp) + #:use-module (srfi srfi-26) #:use-module ((srfi srfi-1) #:hide (zip)) ;; Export variables up-front to allow circular dependency with the 'xorg' @@ -200,7 +202,15 @@ shared NFS home directories.") (outputs '("out" ; everything "bin")) ; glib-mkenums, gtester, etc.; depends on Python (arguments - `(#:disallowed-references (,tzdata-for-tests) + `(#:disallowed-references + (,tzdata-for-tests + ;; Verify glib-mkenums, gtester, ... use the cross-compiled + ;; python. + ,@(if (%current-target-system) + (map (cut gexp-input <> #:native? #t) + `(,(this-package-native-input "python") + ,(this-package-native-input "python-wrapper"))) + '())) #:configure-flags '("-Dman=true" "-Dselinux=disabled") #:phases -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:47 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:47 +0000 Received: from localhost ([127.0.0.1]:57813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4x-0002vz-DL for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:47 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4b-0002rE-QR for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:26 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gARPl; Fri, 18 Jun 2021 18:10:25 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 31/37] glib: Look up "tzdata" in 'native-inputs', not 'inputs'. Date: Fri, 18 Jun 2021 18:09:30 +0200 Message-Id: <20210618160936.18972-31-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032625; bh=vxnBAG50YIH3F0oavVB7X2j23R02j34MPE0qrGyVBi0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=Ivu045QblN+DJhxyCIHs6TtepG0GL/4U8YB7ys3vfvJTjF8yxsOfgjN1SrmIYAlgt KRcK014Q2Glycg+/Uk1oBWjQm1t7RzX+fFszNU5tr10DZhsGnJsEvunTyGkF1vFVIb zyTKjt/lwSZ5rJTh8qz2pRfkIwjSZo8tSv4geKyzyvGtmBXX4kddddPcG3RM1Iovy4 4XVJXqSTh0PVcldJSKu5e62J3ARS39JfYj+Ayu9YsY8ZWHCOUDttupAhtab7/olQ1Q wVn/uR+lrx+Puu9EbV1YSdNeT4WkOct0EaT65NJwRUP0RlsZ9LwEuNL9F/LT+vEt27 206nFYAJBMpYQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Otherwise, "tzdata" won't be found when cross-compiling and string-append will complain about types. Alternatively, "tzdata" could be moved from 'native-inputs' to 'inputs'. * gnu/packages/glib.scm (glib)[arguments]<#:phases>{pre-check}: Look up "tzdata" in 'native-inputs', not 'inputs'. --- gnu/packages/glib.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 244544ea6f..57e8282a89 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -251,10 +251,11 @@ shared NFS home directories.") (package-version python))))) #t)) (add-before 'check 'pre-check - (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) ;; For tests/gdatetime.c. (setenv "TZDIR" - (string-append (assoc-ref inputs "tzdata") + (string-append (assoc-ref (or native-inputs inputs) + "tzdata") "/share/zoneinfo")) ;; Some tests want write access there. (setenv "HOME" (getcwd)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:48 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:48 +0000 Received: from localhost ([127.0.0.1]:57815 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4x-0002w6-MU for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:47 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4V-0002q5-9S for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:28 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAJND; Fri, 18 Jun 2021 18:10:19 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 15/37] python: Fix reference to input when cross-compiling. Date: Fri, 18 Jun 2021 18:09:14 +0200 Message-Id: <20210618160936.18972-15-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032619; bh=PDI+BmIWM67CqaekPjoSL4qQbhEt3DyB5sTW2X9yYys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=gKqdZ+3wSa8yjEDIXEu83M6j51TMlIlUmoGPUYt1eHW2lgJuzZjA6GP2tU/GtglGS 9KcXvp/QpXDSIKGEV4v5Mh90mf/QGt0bL0lMYXemAM6A6KyXrjKo1fAAQD4y9J93Dk +jCihS6APeyK6qge+srpVdqdzyLZvJOriMpEYC4mo++t5bdTfmgj7RLk+301TpcTgL d2Wg8CDvNGLtzVOf6RXDB5sDdb8YmvMCGBNdslHTOt628+RSDfHysUnh+5HjxcjgGM bTMIXUePRaYgfumAJXZ6e8YojX2E9ehSpKdM/yKutxyywkzAJcK72/uaw2EosCqPE9 W88eJar7K6RTA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) "sitecustomize.py" is a native input, so look it up in 'native-inputs', not 'inputs'. * gnu/packages/python.scm (customize-site): Look up "sizecustomize.py" in 'native-inputs', not 'inputs'. --- gnu/packages/python.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index fbad0b65b8..f004b8e739 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -111,13 +111,14 @@ (define* (customize-site version) "Generate a install-sitecustomize.py phase, using VERSION." - `(lambda* (#:key inputs outputs #:allow-other-keys) + `(lambda* (#:key native-inputs inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (site-packages (string-append out "/lib/python" ,(version-major+minor version) "/site-packages")) - (sitecustomize.py (assoc-ref inputs "sitecustomize.py")) + (sitecustomize.py (assoc-ref (or native-inputs inputs) + "sitecustomize.py")) (dest (string-append site-packages "/sitecustomize.py"))) (mkdir-p site-packages) (copy-file sitecustomize.py dest) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:48 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:48 +0000 Received: from localhost ([127.0.0.1]:57817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4y-0002wD-1X for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:48 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49880) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4c-0002r7-Mf for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:28 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gASQB; Fri, 18 Jun 2021 18:10:26 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 33/37] tk: Do not use %build-inputs when cross-compiling. Date: Fri, 18 Jun 2021 18:09:32 +0200 Message-Id: <20210618160936.18972-33-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032626; bh=zt7BAM2kxTcKP2NYK6l7VYfWxdJEaUVC9x+20Op9hjE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=Jp/4guZL1awaU08kdCY/i2LtdPvUfTTnfJTNfLc6sBQTsw0ApiFwS7Blx0J2DBdM4 TMBeXbTPHvIkw4234Yg0fq1ba/KqAng/bIqz6sAQpUAw12C+hq7HtfYhKdpwt8B4NC c9n51YySSpr0Rgyp2zgBz43SlfcTEUdH4H8JR3FaASHj3mIdEMCc6yjOISvVR3W/ln 1PkyW22nKbd2Jig0l4SBdQFjCgbPZT4mZjvQ+pApHSFu8mqHBrRKbyZaV/fWs3p41Y BzQzXwQ2gKBS6ApP9gb31i5dAwbjoPiKWWUOimmsmaOHDQDndJsKdg24AkV41jQLCX QPI+9155MUaRw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) %build-inputs does not exists when cross-compiling, so use #$(this-package-input ...) instead. * gnu/packages/tcl.scm (tk)[arguments]<#:configure-flags>: Use 'this-package-input' instead of '%build-inputs' when cross-compiling. --- gnu/packages/tcl.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm index c87a8187f2..91ba8bbb3f 100644 --- a/gnu/packages/tcl.scm +++ b/gnu/packages/tcl.scm @@ -29,6 +29,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system perl) @@ -232,7 +233,9 @@ X11 GUIs.") #:configure-flags ,#~ (list (string-append "--with-tcl=" - (assoc-ref %build-inputs "tcl") + #$(if (%current-target-system) + (this-package-input "tcl") + #~(assoc-ref %build-inputs "tcl")) "/lib") ;; This is needed when cross-compiling, see: ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719247 -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:48 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:48 +0000 Received: from localhost ([127.0.0.1]:57819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4y-0002wL-AR for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:48 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4d-0002rE-45 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:30 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gASQJ; Fri, 18 Jun 2021 18:10:26 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 34/37] libelf: Use the cross-compiler when cross-compiling. Date: Fri, 18 Jun 2021 18:09:33 +0200 Message-Id: <20210618160936.18972-34-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032626; bh=RWokKCzoehfrSlcLNti6dqTDx97owvOxCcB16lv8MSw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=pnEQ3knbp/4b42PCXTmRcJL9YSqcXqK2GpPYwYbvAfCnawSYBztLlbeTAp+4r0qa+ ATbpfaJHGObVw73aPxbycWhZKxMWKkoDEocr7VQCSLEcy5cDK52S8LdS/0SbzHwabt DkNGoxoLM/AGtES3rMlemPpnlcNnDrvXXauSKJv8XF7T5JeSUjbH7tTp098ItqXkfY LesTgBMtX0AP+EPlbZnATzM60YiE1DRTmxfHIObp3RaYnfaTaC+Ye994HemZ+NjobD Mh+8CZXDk3bwq9g8cqLsr4M7lLDYKBZyxqyc28Nsq7pa21fQ3/6TRRGyuOaweBoqg/ Ymdy7kjEsYq7g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/elf.scm (libelf)[arguments]<#:phases>{delete-configure}: Regenerate the configure script when cross-compiling. (libelf)[arguments]<#:phases>{configure}: Do not replace when cross-compiling. (libelf)[native-inputs]: Add autoconf when cross-compiling. --- gnu/packages/elf.scm | 48 +++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index 0309dd95b5..66c2334e5c 100644 --- a/gnu/packages/elf.scm +++ b/gnu/packages/elf.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2020 Mark Wielaard ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2021 Leo Le Bouter +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -32,6 +33,7 @@ #:use-module (guix build-system gnu) #:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+)) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages compression) #:use-module (gnu packages documentation) #:use-module (gnu packages gcc) @@ -205,22 +207,36 @@ static analysis of the ELF binaries at hand.") (arguments `(#:phases (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - ;; This old `configure' script doesn't support - ;; variables passed as arguments. - (let ((out (assoc-ref outputs "out"))) - (setenv "CONFIG_SHELL" (which "bash")) - (invoke "./configure" - (string-append "--prefix=" out) - ,@(if (string=? "powerpc64le-linux" - (%current-system)) - '("--host=powerpc64le-unknown-linux-gnu") - '()) - ,@(if (string=? "aarch64-linux" - (%current-system)) - '("--host=aarch64-unknown-linux-gnu") - '())))))))) + ,(if (%current-target-system) + ;; This old 'configure' script doesn't + ;; support cross-compilation well. E.g., it fails + ;; to find the cross-compiler. + `(add-before 'bootstrap 'delete-configure + (lambda _ + (delete-file "configure"))) + `(replace 'configure + ;; This old `configure' script doesn't support + ;; variables passed as arguments. TODO: would + ;; simply regenerating 'configure' work + ;; well enough, even if compiling natively + ;; on powerpc or aarch64? + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (setenv "CONFIG_SHELL" (which "bash")) + (invoke "./configure" + (string-append "--prefix=" out) + ,@(if (string=? "powerpc64le-linux" + (%current-system)) + '("--host=powerpc64le-unknown-linux-gnu") + '()) + ,@(if (string=? "aarch64-linux" + (%current-system)) + '("--host=aarch64-unknown-linux-gnu") + '()))))))))) + (native-inputs + (if (%current-target-system) + `(("autoconf" ,autoconf)) + '())) (home-page (string-append "https://web.archive.org/web/20181111033959/" "http://www.mr511.de/software/english.html")) (synopsis "ELF object file access library") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:49 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:49 +0000 Received: from localhost ([127.0.0.1]:57821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4y-0002wS-P2 for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:48 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:50132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4d-0002sa-V2 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:30 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gASQR; Fri, 18 Jun 2021 18:10:27 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 35/37] opendht: Correct 'nettle' variable name in inputs. Date: Fri, 18 Jun 2021 18:09:34 +0200 Message-Id: <20210618160936.18972-35-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032627; bh=mQc4bfvIiXbBC0LdrMy992TtZOsGoT1AF1x3F6ZKEDo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=JXbv3IqfXKPRQISiXEdiw+nEzpu1CpsgCwOXhjykCC/h6xE8jvA5nWJB6BqdxLgf9 iE+JmezL6eJp4fyjeKv8W82shJHKBml5eyUX+WvOknItrxSqrl9RG45J9ngCZKvcqj Fzvxnp5Gpeqwr8aJ/uNMKnmh1DEhFHRVGQUT0m226J7/hfMqrqVhHaMdl88F5NzBbs 019l++Yr+Zf0TMbODyL7fVC1/+o/PmA15V/7E92+1FB4YUuIreMqcCCROW7yW3KqP9 I+dUw5zsqlpUvAL+KiJVtzllPUlm+5Hu5+9ZP1JlMQ3szTA+SFNSA21ieo9qYJ4ZQo 9WzVfasXdj04w== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Previously, opendht referred to 'nettle-3.7'. But nettle-3.7 has been renamed to simply 'nettle'. So, refer to 'nettle' instead of 'nettle-3.7'. This should fix recent evaluation failures of core-updates on ci.guix.gnu.org. * gnu/packages/networking.scm (opendht)[inputs]{nettle}: Refer to 'nettle' instead of 'nettle-3.7'. --- gnu/packages/networking.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 62c4d7a392..6b154067b1 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -3478,7 +3478,7 @@ and targeted primarily for asynchronous processing of HTTP-requests.") (build-system cmake-build-system) (inputs `(("argon2" ,argon2) - ("nettle" ,nettle-3.7) + ("nettle" ,nettle) ("readline" ,readline) ("jsoncpp" ,jsoncpp) ("openssl" ,openssl) ;required for the DHT proxy -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:53 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:53 +0000 Received: from localhost ([127.0.0.1]:57823 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4z-0002wZ-1P for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:53 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:50154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4e-0002sb-Dm for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:30 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gATQY; Fri, 18 Jun 2021 18:10:27 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 36/37] cross-base: Fix cross-compiler for i686-linux-gnu. Date: Fri, 18 Jun 2021 18:09:35 +0200 Message-Id: <20210618160936.18972-36-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032627; bh=cL6/X82yxoqwh+DYMtBl3NVxy2HSHe9g4hdvR4Kv7Bw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=oStZdjsV/koIY6SvderK1Z0ux8lc9OdnnE9oMDocAgiFfn7ulcQSL6mAapyiyWhbQ dHqzFjw317c5S1qhTfFfM/vLbcPW/iyHSULZr4mdYDl8IXiao5374QG2P4fWbJKlhx veZdgstvgzmhT5PJPV6beN8v09I53oTw9iY4hsYEuLaCkrv7plcwgrTq0LR55GNFQy ljfhZH2o0GJ+CHdNGq6KoLXXdXG1JqrgCqkFsXvMb+fO7NSQaeJ0PAo+C3GSdrj4SH qFz0EQ02ou0aMCEauw70T76Ga3PipsC20RtNjqHNz8FPL9FjUlwaRFlbV9ibrd1GqA jcz18Jniqlghg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) GCC doesn't find libgcc_s.so anymore and looks in the wrong location. Fix this (well, more a work-around really). * gnu/packages/cross-base.scm (cross-gcc-arguments)<#:configure-flags>: Add --with-toolexecdir, such that libstdc++ ends up in the right place. Add --with-slibdir such that libgcc_s.so end up in the right place. (cross-gcc-arguments)<#:phases>{move-shared-libraries}: New phase, moving libraries in the correct place. Delete .la files, libasan.so and libusan.so to prevent circular references. Likewise, fix a reference in libstdc++.so.VERSION-gdb.py. --- gnu/packages/cross-base.scm | 63 +++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 9487ac9238..995b4ae065 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2019, 2020, 2021 Marius Bakke ;;; Copyright © 2019 Carl Dong ;;; Copyright © 2020 Mathieu Othacehe +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,6 +34,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (srfi srfi-1) @@ -169,9 +171,26 @@ base compiler and using LIBC (which may be either a libc package or #f.)" )) ;; Install cross-built libraries such as libgcc_s.so in - ;; the "lib" output. + ;; the "lib" output. At least for version 8.4.0, GCC + ;; will put libstdc++ in ${toolexecdir}/lib instead. + ;; (A bug?) So set --with-toolexecdir as well. + ,@(if libc - `((string-append "--with-toolexeclibdir=" + `((string-append "--with-toolexecdir=" + (assoc-ref %outputs "lib")) + (string-append "--with-toolexeclibdir=" + (assoc-ref %outputs "lib") + "/" ,target "/lib")) + '()) + ;; At least for GCC 8.0, libgcc_s.so and libstdc++.so + ;; are not installed in the location specified in + ;; --with-toolexeclibdir so GCC will not find it + ;; when cross-compiling, say, GNU Hello. + ;; + ;; Work-around by specifying slibdir. This is not + ;; sufficient, see move-shared-libraries below. + ,@(if (and libc (version>=? (package-version xgcc) "8.0")) + `((string-append "--with-slibdir=" (assoc-ref %outputs "lib") "/" ,target "/lib")) '()) @@ -193,7 +212,45 @@ base compiler and using LIBC (which may be either a libc package or #f.)" ,flags)) flags)) ((#:phases phases) - `(cross-gcc-build-phases ,target ,phases)))))) + (if (and libc (version>=? (package-version xgcc) "8.0")) + #~(modify-phases (cross-gcc-build-phases #$target #$phases) + (add-after 'install 'move-shared-libraries + (lambda _ + (let* ((slib (format #f "~a/~a/lib/" #$output:lib #$target)) + (badlib (format #f "~a/~a/lib/" #$output #$target)) + (libs (map basename (find-files badlib #:fail-on-error? #t)))) + (for-each + (lambda (lib) + (let ((from (string-append badlib lib)) + (to (string-append slib lib))) + (when (file-exists? to) + (error "~a was found twice, refusing to overwrite!" + lib)) + ;; The debugging script libstdc++.so.VERSION-gdb.py has + ;; reference to #$output. Correct it. + (when (string-suffix? "-gdb.py" lib) + (substitute* from + (("libdir = '(.*)'") + (string-append "libdir = '" slib "'"))) + (system* "cat" from)) + ;; The .la files have references to BADLIB, + ;; leading to cyclic references between + ;; the outputs of the package. Remove them + ;; and hope noone notices. + ;; + ;; Likewise, libasan.so.* and libubsan.so.* + ;; have references to #$output. + (if (or (string-suffix? ".la" lib) + (string-prefix? "libasan.so" lib) + (string-prefix? "libubsan.so" lib)) + (delete-file from) + (rename-file from to)))) + libs) + ;; If you have "cyclic references" problems, + ;; uncomment this and use --keep-failed to figure + ;; things out. + (copy-recursively #$output:lib "out-test"))))) + #~(cross-gcc-build-phases #$target #$phases))))))) (define (cross-gcc-patches xgcc target) "Return GCC patches needed for XGCC and TARGET." -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:54 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:54 +0000 Received: from localhost ([127.0.0.1]:57825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH53-0002wm-Nq for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:54 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:50160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4e-0002sd-Ti for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:31 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gATQc; Fri, 18 Jun 2021 18:10:28 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 37/37] meson: Support cross-compilation. Date: Fri, 18 Jun 2021 18:09:36 +0200 Message-Id: <20210618160936.18972-37-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032628; bh=9QgLcPXJWK9iabqmcx9sqfvov3avBGvRjKPIpMrusAg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=qNCVGyprE13u1u9a70fB5JqDfbl86QXPOJfnH62+b6XOpzZyXixI7BU5zfYzOjLFn D3vT6zXyz0AtF1+ut3If5Pa2sNzlPMbz48b833/sqTq21kzL6m15jpn8L6WLbjzyS5 vU6130OfVlQtd83OHtAYugaQ2P0cFAgqzakyGkmwmf2k9yvwvQ6lD6ha7Oq2URsIoh aCgbguz1wx282SlJK3I+ysJ8J8KOHyQPN3Egf9U2XpGN2csYVrIt81e6vBWCGJK8Vy unWbEYdlRwF9AOUAgGGJxhMsx6Rj7j+Mfvi3KRO4am22slWD8L6sIVVP8uZYB1CdCF td/IObrrvuQCw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) For cross-compilation, meson needs to be passed a ‘cross file’ with information on the architecture, CPU type, endianness and operating system, and the name of the cross-compiler binaries. The new module (guix build meson-configuration) has some utilities for writing these cross files, used by 'make-cross-file' in a G-exp. The values for the cross file are generated by 'make-machine-alist' and 'make-binaries-alist'. 'make-machine-alist' and 'make-binaries-alist' live on the host side, such that new architectures and operating systems can be added without causing rebuilds for old architectures. Currently, only GNU/Hurd, GNU/Linux, MinGW, x86-32 and x86-64 are supported by 'make-machine-alist'. For other architectures, someone needs to figure out what to use as ‘CPU type’ first. Only i686-linux-gnu has been tested. This has been tested with: $ ./pre-inst-env guix build glib --target=i686-linux-gnu on a x86_64-linux system. ‘If it compiles, it should work.’ * guix/build/meson-configuration.scm (configuration-port): New parameter. (write-section-header): New procedure. (write-assignment): New procedure. (write-assignments): New procedure. * guix/build-system/meson.scm (target-hurd?): New predicate. (make-machine-alist): New procedure. (make-binaries-alist): New procedure. (make-cross-file): New procedure. (meson-cross-build): New procedure. (lower)[build-inputs]: Add standard cross packages when cross-compiling. Do not include regular 'inputs' when cross-compiling. (lower)[host-inputs]: Include 'inputs' when cross-compiling. (lower)[target-inputs]: Add cross packages when cross-compiling. (lower)[build]: Call 'meson-cross-build' instead of 'cross-build' when cross-compiling. (lower)[target]: Set it. (lower)[private-keywords]: Do not remove #:target when cross-compiling. --- Makefile.am | 1 + guix/build-system/meson.scm | 197 ++++++++++++++++++++++++++--- guix/build/meson-configuration.scm | 71 +++++++++++ 3 files changed, 250 insertions(+), 19 deletions(-) create mode 100644 guix/build/meson-configuration.scm diff --git a/Makefile.am b/Makefile.am index a10e06e5a7..d4bf626fd5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -234,6 +234,7 @@ MODULES = \ guix/build/emacs-utils.scm \ guix/build/java-utils.scm \ guix/build/lisp-utils.scm \ + guix/build/meson-configuration.scm \ guix/build/maven/java.scm \ guix/build/maven/plugin.scm \ guix/build/maven/pom.scm \ diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm index 5adc0f92c8..1f763af2aa 100644 --- a/guix/build-system/meson.scm +++ b/guix/build-system/meson.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017 Peter Mikkelsen ;;; Copyright © 2018, 2019 Marius Bakke ;;; Copyright © 2021 Ludovic Courtès +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,7 +31,8 @@ #:use-module (guix packages) #:use-module (ice-9 match) #:export (%meson-build-system-modules - meson-build-system)) + meson-build-system + make-cross-file)) ;; Commentary: ;; @@ -40,6 +42,62 @@ ;; ;; Code: +(define (target-hurd? triplet) + (and (string-suffix? "-gnu" triplet) + (not (string-contains triplet "linux")))) + +(define (make-machine-alist triplet) + "Make an association list describing what should go into +the ‘host_machine’ section of the cross file when cross-compiling +for TRIPLET." + `((system . ,(cond ((target-hurd? triplet) "gnu") + ((target-linux? triplet) "linux") + ((target-mingw? triplet) "windows") + (#t (error "meson: unknown operating system")))) + (cpu_family . ,(cond ((target-x86-32? triplet) "x86") + ((target-x86-64? triplet) "x86_64") + ((target-arm32? triplet) "arm") + ((target-aarch64? triplet) "aarch64") + ((target-powerpc? triplet) + (if (target-64bit? triplet) + "ppc64" + "ppc")) + (#t (error "meson: unknown architecture")))) + (cpu . ,(cond ((target-x86-32? triplet) ; i386, ..., i686 + (substring triplet 0 4)) + ((target-x86-64? triplet) "x86_64") + (#t (error "meson: unknown CPU")))) + (endian . ,(cond ((string-prefix? "powerpc64le-" triplet) "little") + ((string-prefix? "mips64el-" triplet) "little") + ((target-x86-32? triplet) "little") + ((target-x86-64? triplet) "little") + (#t (error "meson: unknown architecture")))))) + +(define (make-binaries-alist triplet) + "Make an associatoin list describing what should go into +the ‘binaries’ section of the cross file when cross-compiling for +TRIPLET." + `((c . ,(cc-for-target triplet)) + (cpp . ,(cxx-for-target triplet)) + (pkgconfig . ,(pkg-config-for-target triplet)) + (objcopy . ,(string-append triplet "-objcopy")) + (ar . ,(string-append triplet "-ar")) + (ld . ,(string-append triplet "-ld")) + (strip . ,(string-append triplet "-strip")))) + +(define (make-cross-file triplet) + (computed-file "cross-file" + (with-imported-modules '((guix build meson-configuration)) + #~(begin + (use-modules (guix build meson-configuration)) + (call-with-output-file #$output + (lambda (f) + (parameterize ((configuration-port f)) + (write-section-header "host_machine") + (write-assignments '#$(make-machine-alist triplet)) + (write-section-header "binaries") + (write-assignments '#$(make-binaries-alist triplet))))))))) + (define %meson-build-system-modules ;; Build-side modules imported by default. `((guix build meson-build-system) @@ -68,24 +126,34 @@ #:rest arguments) "Return a bag for NAME." (define private-keywords - `(#:meson #:ninja #:inputs #:native-inputs #:outputs #:target)) - - (and (not target) ;; TODO: add support for cross-compilation. - (bag - (name name) - (system system) - (build-inputs `(("meson" ,meson) - ("ninja" ,ninja) - ,@native-inputs - ,@inputs - ;; Keep the standard inputs of 'gnu-build-system'. - ,@(standard-packages))) - (host-inputs (if source - `(("source" ,source)) - '())) - (outputs outputs) - (build meson-build) - (arguments (strip-keyword-arguments private-keywords arguments))))) + `(#:meson #:ninja #:inputs #:native-inputs #:outputs + ,@(if target + '() + '(#:target)))) + + (bag + (name name) + (system system) (target target) + (build-inputs `(("meson" ,meson) + ("ninja" ,ninja) + ,@native-inputs + ,@(if target '() inputs) + ;; Keep the standard inputs of 'gnu-build-system'. + ,@(if target + (standard-cross-packages target 'host) + '()) + ,@(standard-packages))) + (host-inputs `(,@(if source + `(("source" ,source)) + '()) + ,@(if target inputs '()))) + ;; Keep the standard inputs of 'gnu-buid-system'. + (target-inputs (if target + (standard-cross-packages target 'target) + '())) + (outputs outputs) + (build (if target meson-cross-build meson-build)) + (arguments (strip-keyword-arguments private-keywords arguments)))) (define* (meson-build name inputs #:key @@ -161,6 +229,97 @@ has a 'meson.build' file." #:disallowed-references disallowed-references #:guile-for-build guile))) +(define* (meson-cross-build name + #:key + target + build-inputs host-inputs target-inputs + guile source + (outputs '("out")) + (configure-flags ''()) + (search-paths '()) + (native-search-paths '()) + + (build-type "debugoptimized") + (tests? #f) + (test-target "test") + (glib-or-gtk? #f) + (parallel-build? #t) + (parallel-tests? #f) + (validate-runpath? #t) + (patch-shebangs? #t) + (strip-binaries? #t) + (strip-flags ''("--strip-debug")) + (strip-directories ''("lib" "lib64" "libexec" + "bin" "sbin")) + (elf-directories ''("lib" "lib64" "libexec" + "bin" "sbin")) + (phases '%standard-phases) + (system (%current-system)) + (imported-modules %meson-build-system-modules) + (modules '((guix build meson-build-system) + (guix build utils))) + allowed-references + disallowed-references) + "Cross-build SOURCE for TARGET using MESON, and with INPUTS, assuming that +SOURCE has a 'meson.build' file." + (define cross-file + (make-cross-file target)) + (define inputs + (if (null? target-inputs) + (input-tuples->gexp host-inputs) + #~(append #$(input-tuples->gexp host-inputs) + #+(input-tuples->gexp target-inputs)))) + (define builder + (with-imported-modules imported-modules + #~(begin + (use-modules #$@(sexp->gexp modules)) + + (define build-phases + #$(let ((phases (if (pair? phases) (sexp->gexp phases) phases))) + (if glib-or-gtk? + phases + #~(modify-phases #$phases + (delete 'glib-or-gtk-compile-schemas) + (delete 'glib-or-gtk-wrap))))) + + ;; Do not use 'with-build-variables', as there should be + ;; no reason to use %build-inputs and friends. + (meson-build #:source #+source + #:system #$system + #:outputs #$(outputs->gexp outputs) + #:inputs #$inputs + #:native-inputs #+(input-tuples->gexp build-inputs) + #:search-paths '#$(sexp->gexp + (map search-path-specification->sexp + search-paths)) + #:native-search-paths '#$(sexp->gexp + (map search-path-specification->sexp + native-search-paths)) + #:phases build-phases + #:configure-flags `("--cross-file" #+cross-file + ,@#$(sexp->gexp configure-flags)) + #:build-type #$build-type + #:tests? #$tests? + #:test-target #$test-target + #:parallel-build? #$parallel-build? + #:parallel-tests? #$parallel-tests? + #:validate-runpath? #$validate-runpath? + #:patch-shebangs? #$patch-shebangs? + #:strip-binaries? #$strip-binaries? + #:strip-flags #$(sexp->gexp strip-flags) + #:strip-directories #$(sexp->gexp strip-directories) + #:elf-directories #$(sexp->gexp elf-directories))))) + + (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) + system #:graft? #f))) + (gexp->derivation name builder + #:system system + #:target target + #:substitutable? substitutable? + #:allowed-references allowed-references + #:disallowed-references disallowed-references + #:guile-for-build guile))) + (define meson-build-system (build-system (name 'meson) diff --git a/guix/build/meson-configuration.scm b/guix/build/meson-configuration.scm new file mode 100644 index 0000000000..81b4eaa7e1 --- /dev/null +++ b/guix/build/meson-configuration.scm @@ -0,0 +1,71 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Maxime Devos +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix build meson-configuration) + #:use-module (ice-9 match) + #:export (write-section-header write-assignment + write-assignments make-machine-alist + configuration-port)) + +;; Commentary: +;; +;; Utilities for generating a ‘Cross build definition file’ for +;; the Meson build system. Configuration values are currently +;; never escaped. In practice this is unlikely to be a problem +;; in the build environment. +;; +;; Code: + +(define configuration-port + (fluid->parameter (make-unbound-fluid))) + +(define (write-section-header section-name) + "Write a section header for section named SECTION-NAME +to the configuration port." + (format (configuration-port) "[~a]~%" section-name)) + +(define (write-assignment key value) + "Write an assignment of VALUE to KEY to the configuration +port. VALUE must be a string (without any special characters +such as quotes), a boolean or an integer. Lists are currently +not supported" + (define port (configuration-port)) + (match value + ((? string?) + (format port "~a = '~a'~%" key value)) + ((? integer?) + (format port "~a = ~a~%" key value)) + (#f + (format port "~a = true~%" key)) + (#t + (format port "~a = false~%" key)))) + +(define* (write-assignments alist) + "Write the assignments in ALIST, an association list, +to the configuration port." + (for-each (match-lambda + ((key . value) + (write-assignment key value))) + alist)) + +(define* (make-machine-alist #:key system cpu-family cpu endian) + "Make an association list for the [host_machine] section." + `((system . ,system) + (cpu-family . ,cpu-family) + (cpu . ,cpu) + (endian . ,endian))) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:10:54 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:10:54 +0000 Received: from localhost ([127.0.0.1]:57827 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH54-0002wu-Hm for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:54 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49836) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4c-0002qa-8v for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:32 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gARQ1; Fri, 18 Jun 2021 18:10:26 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 32/37] tk: Make #:configure-flags a G-expression. Date: Fri, 18 Jun 2021 18:09:31 +0200 Message-Id: <20210618160936.18972-32-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032626; bh=5uYwnGhqcyoz8f9UYuhpumozlHAVHIx5CnK53MVgB28=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=bQ9Z83w7+VHo9KfkPw17UkdBjSi/CZ2uLys7mRIYDyOUaHEkZ84l6Qj9iMvdQqSRK uoBzrx/lemQpmkMTkopdfvtUTBLHV0J1N3LEIieQ2Rnfl+2p25Y3kxRd2iCHusRfkZ O9u40zs0+79hV9jnLlypW1qzlXeeFaln9Zn6UXVBn9hvG+i4yb4QvDvakVk4mHTfbB c8hnG6EoyG41euR9tYD5HEo5+0G6YX51kGCQV96+z0HkDW7PDxh4CmyyOJCibIjQ7y NMp4IyjmCZvmPQUQhSmvhO8OkJObOau1LmJPKTP6E+PwTm+AKrTdPNNZQ0etrtk7pZ AtAd72xZtgrbw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This allows using #$(this-package-input ...) later. * gnu/packages/tcl.scm (tk)[arguments]<#:configure-flags>: Make this a G-expression instead of an S-expression. --- gnu/packages/tcl.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm index 5fccfa5da9..c87a8187f2 100644 --- a/gnu/packages/tcl.scm +++ b/gnu/packages/tcl.scm @@ -230,15 +230,16 @@ X11 GUIs.") "/lib -lfontconfig"))))))) #:configure-flags + ,#~ (list (string-append "--with-tcl=" (assoc-ref %build-inputs "tcl") "/lib") ;; This is needed when cross-compiling, see: ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719247 - ,@(if (%current-target-system) - '("tcl_cv_strtod_buggy=1" - "ac_cv_func_strtod=yes") - '())) + #$@(if (%current-target-system) + #~("tcl_cv_strtod_buggy=1" + "ac_cv_func_strtod=yes") + #~())) ;; The tests require a running X server, so we just skip them. #:tests? #f)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:11:17 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:11:17 +0000 Received: from localhost ([127.0.0.1]:57864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH5Q-00031j-UX for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:11:17 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4V-0002ql-7N for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:34 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAJN9; Fri, 18 Jun 2021 18:10:18 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 14/37] wrap-python3: Fix cross-compilation. Date: Fri, 18 Jun 2021 18:09:13 +0200 Message-Id: <20210618160936.18972-14-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032618; bh=uZHMNHI9o+rXnoj5Twc+b/EgkHvhpnoWxJwexV6r8Q8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=OCkHjRUz9jyrrTaFHyEJTwzuK5tn+mx40U+Kez7Z1xRq/J8CtiPcEe0zWU2R06Yc3 vGZ58ZGLUaUUgmy4gJr9I8xiQJoKyOG6DULq+1yNY4ffXB1Xpq231MIvVrFeYFeveL rb1wmUahhKgvM8PgOij5ITFvvc16c4xlBYVA+TiW6WSam0ZYUSfr+xugaFXj2WCoin dR8WV9gs2vrdylrfsCZlz7c4vumYgotqeUWT/OzxZB0jWbLZfAptzAOqLfdGS6bjdP Hkm3Yb6J2LsXqXXWhHJKsjVako6Sfi1ph4Mglt9fzIBzO2p+I+alW/ufrg/5jyYq2A um5iwyBL5yUeA== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) When cross-compiling, "bash" is missing from %build-inputs, leading to a build error. Use this-package-input instead of %build-inputs to resolve this. While we're at it, eliminate all uses of %outputs and %build-inputs. * gnu/packages/python.scm (wrap-python3)[arguments]<#:builder>: Eliminte %outputs and %build-inputs. --- gnu/packages/python.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 9628836567..fbad0b65b8 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -60,6 +60,7 @@ ;;; Copyright © 2019 Tanguy Le Carrour ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020, 2021 Greg Hogan +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -575,8 +576,8 @@ for more information."))) #:builder ,#~(begin (use-modules (guix build utils)) - (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) - (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) + (let ((bin (string-append #$output "/bin")) + (python #$(file-append (this-package-input "python") "/bin/"))) (mkdir-p bin) (for-each (lambda (old new) @@ -586,8 +587,7 @@ for more information."))) `("python" ,"pydoc" ,"idle" ,"pip")) ;; python-config outputs search paths based upon its location, ;; use a bash wrapper to avoid changing its outputs. - (let ((bash (string-append (assoc-ref %build-inputs "bash") - "/bin/bash")) + (let ((bash #$(file-append (this-package-input "bash") "/bin/bash")) (old (string-append python "python3-config")) (new (string-append bin "/python-config"))) (with-output-to-file new -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:11:17 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:11:17 +0000 Received: from localhost ([127.0.0.1]:57866 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH5R-00031m-AN for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:11:17 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:49146) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luH4a-0002o5-5q for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:10:38 -0400 Received: from localhost.localdomain ([188.188.242.184]) by baptiste.telenet-ops.be with bizsmtp id Jg9t250053zRM2s01gAPPP; Fri, 18 Jun 2021 18:10:23 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [[PATCH v2 core-updates] 27/37] fontconfig: Make the #:configure-flags argument a G-expression. Date: Fri, 18 Jun 2021 18:09:26 +0200 Message-Id: <20210618160936.18972-27-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624032623; bh=eE/ELwt0ayoao9TRVzPRFatyA74xUIrSYWIXnB6jcQM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=O+hiamoWHYPvO98+KulfNdNhLFqW34sRqCKjJlOzFUpDSml9kA7BIpabOZCxIfQ/S eCyDNECsFDo1jbFmzW2/uml9RyaJ5t5KzABSJliedJ/zKIfirPTH77gcj10S0WRuQQ hVgNgHXb4J0Q+HZ/mjXxgfr1xpUlAb/yishUfYrn1kgUDAO1+mnS0qT8N+Up1RH+oB zTk08MOV4VTzJD0QBMWQTgEMl73jMoy3TykETnxTx8MlqxFYb8u1ncm8urBVRSqM2N f1B6O7BWGGE/gW503L/VVHMs+k5To87W6gQKEVUH/OzZHo80ncgpwel+p64vwgYwt9 bS557BtiVlyLg== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This allows using #$(this-package-input ...) later. * gnu/packages/fontutils.scm (fontconfig)[arguments]<#:configure-flags>: Make this a G-expression instead of a raw S-expression. (fontconfig-with-documentation)[arguments]<#:configure-flags>: Likewise. --- gnu/packages/fontutils.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index dbce5beba8..234f11129a 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -64,6 +64,7 @@ #:use-module (gnu packages xorg) #:use-module (gnu packages tex) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix svn-download) @@ -347,6 +348,7 @@ Font Format (WOFF).") ("python" ,python-minimal))) ;to avoid a cycle through tk (arguments `(#:configure-flags + ,#~ (list "--disable-docs" "--with-cache-dir=/var/cache/fontconfig" ;; register the default fonts @@ -400,7 +402,7 @@ high quality, anti-aliased and subpixel rendered text on a display.") (arguments (substitute-keyword-arguments (package-arguments fontconfig) ((#:configure-flags configure-flags) - `(delete "--disable-docs" ,configure-flags)) + #~(delete "--disable-docs" #$configure-flags)) ((#:phases phases '%standard-phases) `(modify-phases ,phases (add-after 'install 'move-man-sections -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 12:20:02 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 16:20:02 +0000 Received: from localhost ([127.0.0.1]:57883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luHDu-0003G7-6N for submit@debbugs.gnu.org; Fri, 18 Jun 2021 12:20:02 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:52500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luHDs-0003Fj-JT for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 12:20:01 -0400 Received: from butterfly.local ([188.188.242.184]) by michel.telenet-ops.be with bizsmtp id JgKy250093zRM2s06gKyKu; Fri, 18 Jun 2021 18:19:59 +0200 Message-ID: <80a252fbb3d4181eb15142eac2dbd7b7b9ad560a.camel@telenet.be> Subject: Re: [[PATCH v2 core-updates] 01/37] utils: Define target-linux? predicate. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Fri, 18 Jun 2021 18:18:27 +0200 In-Reply-To: <20210618160936.18972-1-maximedevos@telenet.be> References: <20210618160936.18972-1-maximedevos@telenet.be> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-RbBEYGC85rTpp/3UEP12" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624033199; bh=sw35Ef5nzkBgFwcj1bvnRsGNqbQcoexWCSF5lnsGYaY=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=N44Ie3183Schw6Pv6Yj3yWcBH3ku3W/KAYlGOUueTRFLLOg4UIojXURVs9zUpNvQn 9mM3sWiZbxDS67xdsvYEg4sddLEy+V97CraHOUTx/cCVy5AgABE8q/R/0qwGIaQmNQ vnGFgL9gj5e31gIk5cLL0oQ7oMkjW+wJH0lnoIzU0jhnNHxJiIUSQRJWe6DIhz0EjT jiW3Xr8d6QPo/eCu+IqfdyKp1h585P4R0EjPv4O2W82m/w18P6N+k1v2q0IcGcDi5D j+IXVbTGntXKmvTlgYHR6Fg7OOt8JWWVg1Z+e+/4FMkye1wHGLvMmdB8GBdUdeqgj9 kafgnOJ/xoF0g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org 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.7 (-) --=-RbBEYGC85rTpp/3UEP12 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > [[PATCH v2 core-updates] 01/37] utils: Define target-linux? predicate. Oops --subject-prefix doesn't work as I thought it does. I'll send a v3. --=-RbBEYGC85rTpp/3UEP12 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+4iGRcl7gUCYMzHUxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7mUcAQCVpMHXxcfbQM2ril8GkgEHC4po wuuapOmR4QlW0pKaTAD+J6aFcZz+TkK0a5SD6Qa9k+eBTlEfzJsGMtPerr9Apw8= =gHS6 -----END PGP SIGNATURE----- --=-RbBEYGC85rTpp/3UEP12-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:11 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:11 +0000 Received: from localhost ([127.0.0.1]:57960 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI98-0004jc-1b for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:11 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI95-0004j3-VO for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:08 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hK5aw; Fri, 18 Jun 2021 19:19:06 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 01/37] utils: Define target-linux? predicate. Date: Fri, 18 Jun 2021 19:15:55 +0200 Message-Id: <20210618171631.20534-1-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036746; bh=KuxsCFQnj4ZbArXRFEqUpWBp+xjAPFA4gW0yO+6p0Uk=; h=From:To:Cc:Subject:Date:Reply-To; b=GpbAaqGH+Fclbxs44EqQTHm5Ld8i3n1jKg30EtUOHLQ/dEX4x8UK048m33vMliLux spyom+WxIIsG+7oiGI6LAmL7Na/U5nYXaYp1yv4psUm6k+Z8sM/twkSjM6LTQru96U 7UIcz8nVF5Tuat72xkmC1zSFGxyazKGOR/c4D3Og77RDZRpAiM5PQFo7PZr5vIOIyp UFwDceg+6KhB1BC4uWYLjA/6UBCwLhiUCDoGvtwOppi4b7c6nLRqsx6U1N6R67fquj UwfxCHO7JPaUeOcaf+c2EvJBW80xIO0MGNyPx1BbzCug4hgDVZlIdwNU8gl/Moubs0 glBrmAcHn3VPw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * guix/utils.scm (target-linux?): New predicate. * tests/utils.scm ("target-linux?"): Test it. ("target-mingw?"): Also test ‘target-mingw?’. --- guix/utils.scm | 6 ++++++ tests/utils.scm | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index 19990ceb8a..4ff2602e23 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2020 Maxim Cournoyer ;;; Copyright © 2021 Simon Tournier ;;; Copyright © 2021 Chris Marusich +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -81,6 +82,7 @@ %current-system %current-target-system package-name->name+version + target-linux? target-mingw? target-arm32? target-aarch64? @@ -543,6 +545,10 @@ a character other than '@'." (idx (values (substring spec 0 idx) (substring spec (1+ idx)))))) +(define* (target-linux? #:optional (target (or (%current-target-system) + (%current-system)))) + (string-contains target "linux")) + (define* (target-mingw? #:optional (target (%current-target-system))) (and target (string-suffix? "-mingw32" target))) diff --git a/tests/utils.scm b/tests/utils.scm index 7fcbb25552..80a0e669a4 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2016 Mathieu Lirzin ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -289,6 +290,22 @@ skip these tests." (string-closest "hello" '("kikoo" "helo" "hihihi" "halo")) (string-closest "hello" '("aaaaa" "12345" "hellohello" "h")))) +(test-equal "target-linux?" + '(#t #f #f #t) + (map (compose ->bool target-linux?) + '("i686-linux-gnu" "i686-w64-mingw32" + ;; Checking that "gnu" is present is not sufficient, + ;; as GNU/Hurd exists. + "i686-pc-gnu" + ;; Some targets have a suffix. + "arm-linux-gnueabihf"))) + +(test-equal "target-mingw?" + '(#f #f #t) + (map (compose ->bool target-mingw?) + '("i686-linux-gnu" "i686-pc-gnu" + "i686-w64-mingw32"))) + (test-end) (false-if-exception (delete-file temp-file)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:15 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:15 +0000 Received: from localhost ([127.0.0.1]:57990 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9D-0004l5-6l for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:15 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI96-0004j6-4C for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:09 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hK7bD; Fri, 18 Jun 2021 19:19:07 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 04/37] net-base: Make #:builder argument a G-expression. Date: Fri, 18 Jun 2021 19:15:58 +0200 Message-Id: <20210618171631.20534-4-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036747; bh=OUVVb2aVinBOmXNC982I6Xbat+zZCYFQMkoE2v2einI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=mrZTbfRcxqhUkapMZRlpKGSttCVSycPy7KYH2Ah64lmeUit7N48xHkHMsKeA5NWCN kXhtFQu+dev6iu4JomJRQkqwQxVA/tZz69zHSDJopPfb5AXHIcl4dbRJP7hXnPCmzp DBf7wG+VbHOa54ZmiTAMlQN19B6suR2/mz+RDLNbf+wbwFGVfJLZJbm6YnT+IBkW/z ZQ78wpOeRJ6DU5eYWS/6cWBvMtFCmde0rbDynVacdqljGYaWZWGg+FRO1cI40xOyZC oDUsueUj7UpuYX70fl3aujNC4KjHmGgebSZ20YwdGhZOivq1JW3amnAAdPzawNjYUD LPKkJsaKI8k5Q== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This allows using ungexp-native and this-package-native-input later. * gnu/packages/admin.scm (net-base)[arguments]{#:builder}: Make this a G-expression. --- gnu/packages/admin.scm | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 531686fdbb..5c7e41f51b 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -74,6 +74,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (gnu packages) #:use-module (gnu packages algebra) #:use-module (gnu packages autogen) @@ -936,25 +937,25 @@ to allow automatic login and starting any app.") (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) - #:builder (begin - (use-modules (guix build utils) - (srfi srfi-26)) - - (let* ((source (assoc-ref %build-inputs "source")) - (tar (assoc-ref %build-inputs "tar")) - (xz (assoc-ref %build-inputs "xz")) - (output (assoc-ref %outputs "out")) - (etc (string-append output "/etc"))) - (setenv "PATH" (string-append xz "/bin")) - (invoke (string-append tar "/bin/tar") "xvf" - source) - (chdir ,(string-append "netbase-" version)) - (mkdir-p etc) - (for-each copy-file - '("etc-services" "etc-protocols" "etc-rpc") - (map (cut string-append etc "/" <>) - '("services" "protocols" "rpc"))) - #t)))) + #:builder ,#~(begin + (use-modules (guix build utils) + (srfi srfi-26)) + + (let* ((source (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar")) + (xz (assoc-ref %build-inputs "xz")) + (output (assoc-ref %outputs "out")) + (etc (string-append output "/etc"))) + (setenv "PATH" (string-append xz "/bin")) + (invoke (string-append tar "/bin/tar") "xvf" + source) + (chdir #$(string-append "netbase-" version)) + (mkdir-p etc) + (for-each copy-file + '("etc-services" "etc-protocols" "etc-rpc") + (map (cut string-append etc "/" <>) + '("services" "protocols" "rpc"))) + #t)))) (native-inputs `(("tar" ,tar) ("xz" ,xz))) (synopsis "IANA protocol, port, and RPC number assignments") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:15 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:16 +0000 Received: from localhost ([127.0.0.1]:57994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9D-0004lC-Jn for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:15 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI96-0004j5-7Z for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:09 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hK6b2; Fri, 18 Jun 2021 19:19:06 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 02/37] utils: Define a target-x86-32? and target-x86-64? predicate. Date: Fri, 18 Jun 2021 19:15:56 +0200 Message-Id: <20210618171631.20534-2-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036746; bh=lf5YV93HuGoFIHD1h6x01QuYB2H0sCsCvf+MhMqf3Ic=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=n9k7sEeAp6hkSj1w0Lsr3bVGtuDnfO1pijnnZNRf/T4QHS+FcvQ+zuCJzjAjDuFJk 0WHzhAWKTVp8G+oeHcNGLHIdfcA4XyIl+ATXuzl/gyjigsgqDxyAuy2XMVSN4c3Hys UjM3H2DQJU6y55zGB04CW8NyppM7TtQ4AefQSAd001e0IwSysuhVW1kqSuM5HE65gy Mf5WbFh5WdzlSXTEpUg9+cdepIV7TI4wa/v8BBXmnNAdI4jOgzf2+tdKxgyL/vvy3I PtX8MiwwQQWySvygzhxR8/dtIaa7wYZ3/ngn4yGvcukx19MyVsjq6tlHWXvpPTEaJQ SvVR1sHdQ2nfA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * guix/utils.scm (target-x86-32?, target-x86-64?): New predicates. * tests/utils.scm ("target-x86-32?", "target-x86-64?"): New tests. --- guix/utils.scm | 20 ++++++++++++++++++++ tests/utils.scm | 23 +++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index 4ff2602e23..2256ea2ca6 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -84,6 +84,8 @@ package-name->name+version target-linux? target-mingw? + target-x86-32? + target-x86-64? target-arm32? target-aarch64? target-arm? @@ -553,6 +555,24 @@ a character other than '@'." (and target (string-suffix? "-mingw32" target))) +(define* (target-x86-32? #:optional (target (or (%current-target-system) + (%current-system)))) + "Is the architecture of TARGET a variant of Intel's 32-bit architecture +(IA32)?" + ;; Intel also has a 16-bit architecture in the iN86 series, i286 + ;; (see, e.g. https://en.wikipedia.org/wiki/Intel/808286) so this + ;; procedure is not named target-x86?. + (or (string-prefix? "i386-" target) + (string-prefix? "i486-" target) + (string-prefix? "i586-" target) + (string-prefix? "i686-" target))) + +(define* (target-x86-64? #:optional (target (or (%current-target-system) + (%current-system)))) + "Is the architecture of TARGET a variant of Intel/AMD's 64-bit +architecture (x86_64)?" + (string-prefix? "x86_64-" target)) + (define* (target-arm32? #:optional (target (or (%current-target-system) (%current-system)))) (string-prefix? "arm" target)) diff --git a/tests/utils.scm b/tests/utils.scm index 80a0e669a4..92439b5587 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -306,6 +306,29 @@ skip these tests." '("i686-linux-gnu" "i686-pc-gnu" "i686-w64-mingw32"))) +(test-equal "target-x86-32?" + '(#f #f #f #t #t #t #t #f) + ;; These are (according to Wikipedia) two RISC architectures + ;; by Intel and presumably not compatible with the x86-32 series. + (map target-x86-32? + '("i860-gnu" "i960-gnu" + ;; This is a 16-bit architecture + "i286-gnu" + ;; These are part of the x86-32 series. + "i386-gnu" "i486-gnu" "i586-gnu" "i686-gnu" + ;; Maybe this one will exist some day, but not yet. + "i786-gnu"))) + +(test-equal "target-x86-64?" + '(#t #f #f #f) + (map target-x86-64? + `("x86_64-linux-gnu" "i386-linux-gnu" + ;; Just because it includes "64" doesn't make it 64-bit. + "aarch64-linux-gnu" + ;; Note that (expt 2 109) in decimal notation starts with 64. + ;; However, it isn't 32-bit. + ,(format #f "x86_~a-linux-gnu" (expt 2 109))))) + (test-end) (false-if-exception (delete-file temp-file)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:16 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:16 +0000 Received: from localhost ([127.0.0.1]:57998 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9D-0004lL-VC for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:16 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI96-0004j8-F0 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:09 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hK7bG; Fri, 18 Jun 2021 19:19:07 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 05/37] net-base: Fix cross-compilation, eliminating %build-inputs & friends Date: Fri, 18 Jun 2021 19:15:59 +0200 Message-Id: <20210618171631.20534-5-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036747; bh=7CCAUBNV9RJ5wmDTt8PN/AU2ubDq/YhEKCtv/jZqj2w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=AOtdfXIon3C9JHpOl8b8yvP1XqbbcetuvCS64AZ5U/luckKjpoeMgYcn7dnOOtGqL Pn6LEgQt0eGFRqK/UcKHJ9JrAYyCeDLWm17QIQSDo1ZWCODVpSDXrltoqA25TvoNoV Omt165w6SRePmtSS8EC/0KZSLSiLqVrSPJ9bh5oDgVpyCrPjAQ+nrH1oC7nqexjAw9 dfpPaSj+dPdLKXoHCd5b7pgFOWoxDGwOq3tC/u6Fe6mie4asjWO9H+JzxdLykIC/gA PNRRiBjMdyi3pyMrrYQviW/7yeVlgOrGhkJyplSDQsajZvFTwFGKCjl4FarTKEwNrR El8cgM5/83YTw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) "source" is not in %build-inputs when cross-compiling, so another approach for referring to the package source code is needed. * gnu/packages/admin.scm (net-base)[arguments]<#:builder>: Eliminate %build-inputs and %outputs. --- gnu/packages/admin.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 5c7e41f51b..f499a1252b 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -941,10 +941,10 @@ to allow automatic login and starting any app.") (use-modules (guix build utils) (srfi srfi-26)) - (let* ((source (assoc-ref %build-inputs "source")) - (tar (assoc-ref %build-inputs "tar")) - (xz (assoc-ref %build-inputs "xz")) - (output (assoc-ref %outputs "out")) + (let* ((source #+(package-source this-package)) + (tar #+(this-package-native-input "tar")) + (xz #+(this-package-native-input "xz")) + (output #$output) (etc (string-append output "/etc"))) (setenv "PATH" (string-append xz "/bin")) (invoke (string-append tar "/bin/tar") "xvf" -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:16 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:17 +0000 Received: from localhost ([127.0.0.1]:58002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9E-0004lX-84 for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:16 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI96-0004j9-QJ for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:09 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hK7bK; Fri, 18 Jun 2021 19:19:08 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 06/37] net-base: Don't cross-compile. Date: Fri, 18 Jun 2021 19:16:00 +0200 Message-Id: <20210618171631.20534-6-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036748; bh=xjDeyamV9yxjs2aY6I5pdFnCmGm20uQOQ9gNpihMQQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=tRq4S+0y+8rkTbNL/bKrbgKWgDyQkAct28jfVxMHKy6F4pKdpWIduiaul6aDWbPTM MFzltl4grC7rsDs6WbPB3GTaw9MIbqGwKssW1EeuSyR19qKRA0Wy1T38MK8oCioxxA Iz/betde/QfxdGRZenSRsPodvcZhv5qWpbqPc3Dsgwa9ywUAzZZ3/fCsQT1YfatsVv sX3sDCHnfRQIv4n7d+Ww5K5uWchshI4aEnhNP8sXeLFRQQX39z+F/04Rxr58XSPBcc Um3M0N31WW20nZbxBDYH657P8GG8iMEOGSoBv+8EVQCVZZ5r+wx2Z0wxU3BxJmQ5O9 uvK96gnaH848Q== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) net-base is pure data, so cross-compiling is pointless. * gnu/packages/admin.scm (net-base)[arguments]<#:target>: Set to #f. (net-base)[arguments]<#:allowed-references>: Disallow all references. --- gnu/packages/admin.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index f499a1252b..5e41ba9967 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -937,6 +937,11 @@ to allow automatic login and starting any app.") (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) + ;; This package consists solely of architecture-independent + ;; tables. Cross-compilation is pointless! Make sure we'll + ;; always get the same derivation. + #:target #f + #:allowed-references () #:builder ,#~(begin (use-modules (guix build utils) (srfi srfi-26)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:17 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:17 +0000 Received: from localhost ([127.0.0.1]:58006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9E-0004lj-QF for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:17 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI97-0004jB-6d for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:10 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hK8bQ; Fri, 18 Jun 2021 19:19:08 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 07/37] tzdata: Don't bother with cross-compiling. Date: Fri, 18 Jun 2021 19:16:01 +0200 Message-Id: <20210618171631.20534-7-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036748; bh=kOQUqdfe/b2Ix6iebNw4GykUprcUIzEM0B9Sc62yn8Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=F3+7MCGbTTMLpVxRNNFtznoAscyO5czrpFw6TxARco8Jmtlolmjh4Ioz/rKYx6Nvt Yuej70Iw4N7L/MtVB2rtj0qexB/1UflDziCutQC/4dngYa5kSyqyrBbNWSovyTjub5 /3zf9nJPLa/qUhPuTnd2GmRdlVS67ZcwH/I9XJpbbWPMEFuxMPGPYPzDKfCIxyvyXN DgwCjMTLTIFsJrvrSq85XHZt6qKPjQTQygOy+B6zxmwvABvRZYEemMgL9UJ5CRCLfL VoYOqoaN0zV8hunTgTlZeMdAH3NMoKMtMKD149bPWgI05MBO69jNebn5e1RAzH3I26 MOChjkLUdmJRw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) The time zone database is architecture-independent, so trying to cross-compile it is pointless! * gnu/packages/base.scm (tzdata)[arguments]<#:target>: Set to #f. (tzdata)[allowed-references]: Only include the "out" output itself, to make sure no (architecture-dependent) binaries are installed. --- gnu/packages/base.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index d30299a7b6..2674be8048 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2020 Vitaliy Shatrov ;;; Copyright © 2020 Chris Marusich ;;; Copyright © 2021 Leo Le Bouter +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -1251,6 +1252,14 @@ command.") (build-system gnu-build-system) (arguments `(#:tests? #f + ;; This consists purely of (architecture-independent) data, + ;; so ‘cross-compilation’ is pointless here! + ;; (The binaries zic, dump, and tzselect are deleted in the post-install + ;; phase.) + #:target #f + ;; share/zoneinfo/posix is a symlink to share/zoneinfo, + ;; so include the package itself in #:allowed-references. + #:allowed-references ("out") #:make-flags (let ((out (assoc-ref %outputs "out")) (tmp (getenv "TMPDIR"))) (list (string-append "TOPDIR=" out) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:17 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:18 +0000 Received: from localhost ([127.0.0.1]:58012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9F-0004m1-Dq for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:17 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI97-0004j3-7N for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:10 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hK8bV; Fri, 18 Jun 2021 19:19:08 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 08/37] libgpg-error: Remove trailing #f from phases. Date: Fri, 18 Jun 2021 19:16:02 +0200 Message-Id: <20210618171631.20534-8-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036749; bh=UkBFl7DBKUemJe3cRqGofUDVrc8TErEYB0dd5362VyE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=oSMXHqyUpv7h025Dih2svR8XLsRtdwkxNatu6E0eCilWdN3sF6b/R+mxmIKxHKWLt UM4zauTt7WBNHrfH3epex5GCi0mZ5n3xGUsWNaPEUXdYc/fK3lFSjoTN5QfnWOkefn xjZFLG5YH8DdVc7MU1ZUHabkn7A0TIWo7I3dSsNWzdBmnDldwNTROQjmMdymaG5ilr tAs6JYsejCC5JA/MW2ArbSqBq8etVNy9meCTR/9LixrvRrJeInMuqsJNwHIhBB7FXb If9z3+an3G9RF0mTnBhNAvKoh1Vn3iPK4M4L4B7akcdCiG4pPdH4cvz+w2g71PHjsU 90eBSRnFIj0vQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) These aren't required anymore. * gnu/packages/gnupg.scm (libgpgerror)[arguments]{cross-symlinks}: Remove trailing #f. --- gnu/packages/gnupg.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index cb481b38e1..2f44e6ec6a 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -114,8 +114,7 @@ (string-append x "-unknown-linux-gnu"))))) (symlink (string-append "lock-obj-pub." triplet ".h") - "src/syscfg/lock-obj-pub.linux-gnu.h")) - #t)))) + "src/syscfg/lock-obj-pub.linux-gnu.h")))))) '())) (native-inputs `(("gettext" ,gettext-minimal))) (home-page "https://gnupg.org") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:18 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:19 +0000 Received: from localhost ([127.0.0.1]:58016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9F-0004mD-Sg for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:18 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI97-0004jA-5q for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:10 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hK6b8; Fri, 18 Jun 2021 19:19:07 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 03/37] packages: Define this-package-input and this-package-native-input. Date: Fri, 18 Jun 2021 19:15:57 +0200 Message-Id: <20210618171631.20534-3-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036747; bh=ktlZPKOFCiKBCSKOml0XVUAO70kiPtFkDzCU75II8EQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=HQdtnEwPY+hxvSqUsiJKl6qQcGBAfG42YnXrISJlxVVDNwCyuPXrpH7fqxlCTguje yOLuN42GufJyEP3v17/axEE6NaCkUi+0heeq8HVf8xCi+wpY2GLtcwY75O4hVCBlY2 bkFxf/AGV9+X+8vBq80EyqY2y+hbusS7/qFThh/trEHz2mL1lvCcNsRGrbDQImeveJ mkM1AGmpzjOF/kd5TVPiiBp70scrAhEaZBNxm23okTDeh4AVegY39hVjATVvkbzBYW mNf9dj5DRXhSJppF4ERam7qwkHIorjpMkfV5famKX04psbtQf02ZcZkveHRAlsjGIV Puusyd42ARtYg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) These macros are intended to be used in build phases. More precisely, (assoc-ref %build-inputs "input") can be replaced by #$(this-package-input "input") or #+(this-package-native-input "native-input") as appropriate. * guix/packages.scm (package-input, package-native-input): New (unexported) procedures. (this-package-input, this-package-native-input): New macros. --- guix/packages.scm | 29 +++++++++++++++++++++++++++++ tests/packages.scm | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/guix/packages.scm b/guix/packages.scm index a66dbea1b7..80c8bbebf0 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -108,6 +108,9 @@ deprecated-package package-field-location + this-package-input + this-package-native-input + package-direct-sources package-transitive-sources package-direct-inputs @@ -513,6 +516,32 @@ object." #f))) (_ #f))) +(define (package-input package name) + "Return the package input NAME of PACKAGE--i.e., an input +from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not +considered. If this input does not exist, return #f instead." + (and=> (or (assoc-ref (package-inputs package) name) + (assoc-ref (package-propagated-inputs package) name)) + car)) + +(define (package-native-input package name) + "Return the native package input NAME of PACKAGE--i.e., an input +from the ‘native-inputs’ field. If this native input does not exist, +return #f instead." + (and=> (assoc-ref (package-native-inputs package) name) + car)) + +(define-syntax-rule (this-package-input name) + "Return the input NAME of the package being defined--i.e., an input +from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not +considered. If this input does not exist, return #f instead." + (package-input this-package name)) + +(define-syntax-rule (this-package-native-input name) + "Return the native package input NAME of the package being defined--i.e., +an input from the ‘native-inputs’ field. If this native input does not +exist, return #f instead." + (package-native-input this-package name)) ;; Error conditions. diff --git a/tests/packages.scm b/tests/packages.scm index 47d10af5bc..91ec38e4cc 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -1851,6 +1852,39 @@ (package-location (specification->package "guile@2")) (specification->location "guile@2")) +(test-eq "this-package-input, exists" + hello + (package-arguments + (dummy-package "a" + (inputs `(("hello" ,hello))) + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-input, exists in propagated-inputs" + hello + (package-arguments + (dummy-package "a" + (propagated-inputs `(("hello" ,hello))) + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-input, does not exist" + #f + (package-arguments + (dummy-package "a" + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-native-input, exists" + hello + (package-arguments + (dummy-package "a" + (native-inputs `(("hello" ,hello))) + (arguments (this-package-native-input "hello"))))) + +(test-eq "this-package-native-input, does not exists" + #f + (package-arguments + (dummy-package "a" + (arguments (this-package-native-input "hello"))))) + (test-end "packages") ;;; Local Variables: -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:19 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:19 +0000 Received: from localhost ([127.0.0.1]:58024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9G-0004mg-T5 for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:19 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI97-0004j6-JC for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:11 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hK9bd; Fri, 18 Jun 2021 19:19:09 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 09/37] libgpg-error: Prevent silent miscompilation some systems. Date: Fri, 18 Jun 2021 19:16:03 +0200 Message-Id: <20210618171631.20534-9-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036749; bh=nKM9iRbL4pxeve/Z9zTlm79RMuw3U+bWD4uPyj+c1VU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=bS7lOiQrb9kU0ZsoRIa/VFYzGahZuP/a6uvURHfh6mfUPzyTuh5RkkbTEzTElDjZi +CvhHbkZPXYDnAgN1VNZLupS3FiNnchNkSW4/vC4Y0GdXpCXrWGD9uMHbZTpSrnEmg uZflcUUF8kQHcx2lxWtcCEWp5GqEGELzS20XnuYaddja43MkigfgTdvkV8gkZdqDhC 4IE6hsgpR2eT07XExl1kwa1/gAxtJ2jU0mHpHoqnjoXskDKzq8TBJgB56r43wS9yeJ ++e/9j7dandJzOwz+Hc2PpX0WDXvD/y8QzM/BpSzHo3M95cxyErcr8mhgFCFwAehTX JlRQs+OfodKCQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/gpg.scm (libgpgerror)[arguments]<#:phases>{cross-symlinks}: Only link to src/syscfg/lock-obj-pub.linux-gnu.h if the package is being compiled for a Linux target. Do not link either if the architecture is unknown, as the headers vary with the architecture. --- gnu/packages/gnupg.scm | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 2f44e6ec6a..de213d381f 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2018 Björn Höfling ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Fredrik Salomonsson +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -77,6 +78,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system perl) #:use-module (guix build-system python) + #:use-module (ice-9 match) #:use-module (srfi srfi-1)) (define-public libgpg-error @@ -94,27 +96,37 @@ (build-system gnu-build-system) (arguments (if (%current-target-system) - `(#:modules ((ice-9 match) - (guix build gnu-build-system) + `(#:modules ((guix build gnu-build-system) (guix build utils)) #:phases (modify-phases %standard-phases ;; When cross-compiling, some platform specific properties cannot ;; be detected. Create a symlink to the appropriate platform - ;; file. See Cross-Compiling section at: + ;; file if required. Note that these platform files depend on + ;; both the operating system and architecture! + ;; + ;; See Cross-Compiling section at: ;; https://github.com/gpg/libgpg-error/blob/master/README (add-after 'unpack 'cross-symlinks - (lambda* (#:key target inputs #:allow-other-keys) - (let ((triplet - (match (string-take target - (string-index target #\-)) - ("armhf" "arm-unknown-linux-gnueabi") - ("mips64el" "mips-unknown-linux-gnu") - (x - (string-append x "-unknown-linux-gnu"))))) - (symlink - (string-append "lock-obj-pub." triplet ".h") - "src/syscfg/lock-obj-pub.linux-gnu.h")))))) + (lambda _ + (define (link triplet source) + (symlink (string-append "lock-obj-pub." triplet ".h") + (string-append "src/syscfg/lock-obj-pub." + source ".h"))) + ,(let* ((target (%current-target-system)) + (architecture + (string-take target (string-index target #\-)))) + (cond ((target-linux? target) + (match architecture + ("armhf" + `(link "arm-unknown-linux-gnueabi" "linux-gnu")) + ("mips64el" + `(link "mips-unknown-linux-gnu" "linux-gnu")) + ;; Don't always link to the "linux-gnu" + ;; configuration, as this is not correct for + ;; all architectures. + (_ #t))) + (#t #t))))))) '())) (native-inputs `(("gettext" ,gettext-minimal))) (home-page "https://gnupg.org") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:20 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:20 +0000 Received: from localhost ([127.0.0.1]:58030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9H-0004mx-LQ for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:20 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI98-0004j5-0X for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:11 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hK9bh; Fri, 18 Jun 2021 19:19:09 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 10/37] libgpgerror: Maybe fix a cross-compilation bug. Date: Fri, 18 Jun 2021 19:16:04 +0200 Message-Id: <20210618171631.20534-10-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036749; bh=IPFgvneN7bHDKrYexwhQDz6Y7ERatBQe8mtSRZ9vaMo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=L9soqCPc/udlMZWi3kC6oP+VvcVNETiG9jTlh9lD2CiTa6olyrMxSFpAWQODbzzcF w6hpGVMaO4LyhOwPMKNsJ5AaeTkmsG1drf9WAaP9+OQI+4QbK0Kh6wtDB9WcEkQ8wF e0T4M43c/US+hBA5+oYN5GP87BVhhtl4iSYsPaWhpJao0fEQKTxtQGjkmKTcmdjEjb mFmJlbwCrcXiQSNUsj1MJqo8ubpyUPcVPFS/6upCZRFsgMBns3uLo1kTvRI/IWCQSU 8ZdaJ3o/cHHVyjzDGwP9qHxsDHCe9mXEp/PZ/oWIidFiOgOLvwHB1YMhQ0L+Vq2zbC ZBApGsIjEv3pw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Previously, a symlink was created at src/syscfg/lock-obj-pub.linux-gnu.h pointing at lock-obj-pub.MANGLED-TARGET.h. I would think this has to be the other way around, but I am not really sure. * gnu/packages/gnupg.scm (gnupg)[arguments]<#:phases>{cross-symlinks}(link): Switch 'triplet' and 'source'. --- gnu/packages/gnupg.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index de213d381f..f5d4118af9 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -110,9 +110,9 @@ (add-after 'unpack 'cross-symlinks (lambda _ (define (link triplet source) - (symlink (string-append "lock-obj-pub." triplet ".h") + (symlink (string-append "lock-obj-pub." source ".h") (string-append "src/syscfg/lock-obj-pub." - source ".h"))) + triplet ".h"))) ,(let* ((target (%current-target-system)) (architecture (string-take target (string-index target #\-)))) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:26 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:26 +0000 Received: from localhost ([127.0.0.1]:58034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9I-0004nE-6G for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:26 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI98-0004j8-Ci for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:11 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hK9br; Fri, 18 Jun 2021 19:19:10 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 11/37] libgpg-error: Fix cross-compilation error. Date: Fri, 18 Jun 2021 19:16:05 +0200 Message-Id: <20210618171631.20534-11-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036750; bh=po7rDv7BdIVE5g9HkdjKKb8vIZeOm4IuDrvIrTcXbG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=SgOU4CjiL7upYnEQwn6AtANSUFB2+dTlHA/retKoffz2Lh6fW1jf4JTTxRwa7e6Nk E4iV3SwlsHBzZ9ZMEFVNoQU53+SWbKzczUw5AUmUtT63h4uMqpaPNImqub91nzrSip 2u45V7GsheaaN2kimEWIh68u8Zrt6L9cbmxMW8Pxgi+m6wM6lB2R/I2HvtNWF9tNsI Z/Sk2EyuB4XPusHk8lTpFd3Gkd1eEOcLbMagExr4LVyR70KZ/rl9N+El4v5RjRWhvC 1vqGW31iaa2AtHpNFc4ZeItsEMyE8+WaKUMpFJ3x81s9OolpuuqkdhbkIHqcchzZrc rcS3HN9MqlSwg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) TODO: inform upstream about the cross-compilation error. * gnu/packages/gnupg.scm (libgpg-error)[arguments]{fix-gen-lock-obj.sh}: Prevent generated header files from being sprinkled with ‘\c’. --- gnu/packages/gnupg.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index f5d4118af9..1fee30584c 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -100,6 +100,13 @@ (guix build utils)) #:phases (modify-phases %standard-phases + ;; If this is left out, some generated header + ;; files will be sprinkled with ‘\c’, which + ;; the compiler won't like. + (add-after 'unpack 'fix-gen-lock-obj.sh + (lambda _ + (substitute* "src/gen-lock-obj.sh" + (("if test -n `echo -n`") "if ! test -n `echo -n`")))) ;; When cross-compiling, some platform specific properties cannot ;; be detected. Create a symlink to the appropriate platform ;; file if required. Note that these platform files depend on -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:26 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:27 +0000 Received: from localhost ([127.0.0.1]:58038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9O-0004ni-H3 for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:26 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI99-0004j3-HO for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:12 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKBcA; Fri, 18 Jun 2021 19:19:11 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 14/37] wrap-python3: Fix cross-compilation. Date: Fri, 18 Jun 2021 19:16:08 +0200 Message-Id: <20210618171631.20534-14-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036751; bh=uZHMNHI9o+rXnoj5Twc+b/EgkHvhpnoWxJwexV6r8Q8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=XQuor4ZXse3g5cVyv9YKwrdhQybz1rSd4HOTiaN/9U5XzoSBpROrKThjadOfnEWSV QFGkNRMCxmXJOgCz2qspYWG+LbUuD1cu4cMh67um+o6aY7XqEwadH4cMN0aFu+yCi5 CeDY6bJ3JEq3qkFVaGmMwyl7QEqVXPgvdwSDzKFt3b2ivKjLcISkVyzqpdXKb0IZh+ utCbcmLnjeHfutOGtBRZ801D+RfELWQvSxho41uqzFIdxTtECwfrvWgW/LrrX+YHAn 79H6+1IvwvGusfMMljm/s9D5BdXlMZieTHi/9mStgebmQRf8qgJ37ibnH44XF9Vkqq Ig/a3vzZGAZpg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) When cross-compiling, "bash" is missing from %build-inputs, leading to a build error. Use this-package-input instead of %build-inputs to resolve this. While we're at it, eliminate all uses of %outputs and %build-inputs. * gnu/packages/python.scm (wrap-python3)[arguments]<#:builder>: Eliminte %outputs and %build-inputs. --- gnu/packages/python.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 9628836567..fbad0b65b8 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -60,6 +60,7 @@ ;;; Copyright © 2019 Tanguy Le Carrour ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020, 2021 Greg Hogan +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -575,8 +576,8 @@ for more information."))) #:builder ,#~(begin (use-modules (guix build utils)) - (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) - (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) + (let ((bin (string-append #$output "/bin")) + (python #$(file-append (this-package-input "python") "/bin/"))) (mkdir-p bin) (for-each (lambda (old new) @@ -586,8 +587,7 @@ for more information."))) `("python" ,"pydoc" ,"idle" ,"pip")) ;; python-config outputs search paths based upon its location, ;; use a bash wrapper to avoid changing its outputs. - (let ((bash (string-append (assoc-ref %build-inputs "bash") - "/bin/bash")) + (let ((bash #$(file-append (this-package-input "bash") "/bin/bash")) (old (string-append python "python3-config")) (new (string-append bin "/python-config"))) (with-output-to-file new -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:27 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:27 +0000 Received: from localhost ([127.0.0.1]:58040 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9O-0004np-SM for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:27 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI99-0004jA-UL for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:12 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKBcH; Fri, 18 Jun 2021 19:19:11 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 15/37] python: Fix reference to input when cross-compiling. Date: Fri, 18 Jun 2021 19:16:09 +0200 Message-Id: <20210618171631.20534-15-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036751; bh=PDI+BmIWM67CqaekPjoSL4qQbhEt3DyB5sTW2X9yYys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=nG9bt0Xhn9JPbPIinss13DjiPfhByLTnEG0g3qnn2PsV+VyRovtTKjRl6XRKcOzOb CrI/h9Ht5TXNYe+aIGVHycJgLrd2xjtvalcTaieHkU8XwJtpIeQTke9605eyBW+NjH flAXTye9y/eB9FrwkPXUKfr9lj0gbCr8WUtXriZa/fKdWA9UraB/bj9x/NMTuKc0Nj 3zHybZGcOmhHv/Yn4tlH51BJKf7TQAjqKU/V0o/p1mpHCLwKVW2ws7gPv8xy/2SoHW gY/U7J0uzXAubZ0hfEky6Ydv8cx58ccpo+6izlknopkCY6NJk8WbBR1Kpom8IPVs8n /hEneq0SADzmg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) "sitecustomize.py" is a native input, so look it up in 'native-inputs', not 'inputs'. * gnu/packages/python.scm (customize-site): Look up "sizecustomize.py" in 'native-inputs', not 'inputs'. --- gnu/packages/python.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index fbad0b65b8..f004b8e739 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -111,13 +111,14 @@ (define* (customize-site version) "Generate a install-sitecustomize.py phase, using VERSION." - `(lambda* (#:key inputs outputs #:allow-other-keys) + `(lambda* (#:key native-inputs inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (site-packages (string-append out "/lib/python" ,(version-major+minor version) "/site-packages")) - (sitecustomize.py (assoc-ref inputs "sitecustomize.py")) + (sitecustomize.py (assoc-ref (or native-inputs inputs) + "sitecustomize.py")) (dest (string-append site-packages "/sitecustomize.py"))) (mkdir-p site-packages) (copy-file sitecustomize.py dest) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:27 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:27 +0000 Received: from localhost ([127.0.0.1]:58042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9P-0004nx-71 for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:27 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9A-0004j5-A4 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:12 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKBcR; Fri, 18 Jun 2021 19:19:12 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 16/37] openssl: Remove trailing #t from phases. Date: Fri, 18 Jun 2021 19:16:10 +0200 Message-Id: <20210618171631.20534-16-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036752; bh=s5lvIzml+iEf2MhU975NrmAtyb33WbQYhk+vg+z1dIY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=PZcTStCsWgo2SEEBpJUNV0gIucAerIUifx8C4aHLIjiX7hx+/Zmvqw/HjGHPzzm5e tFYOKLW7a5oeYmjUSe+FDpFLn1bw3eMUOTf2wtL8Ozqy3NuZ1foRkei1sjiFRgAVJe /RsZIFhs2MhFfKoMmKlkOLCB37wf+uqWn/SAQquQ+NxeN7HAkvLLGvTOoHCYqMeY1T dcSSTfu7fKK7j6yFwesAVs8d7TeEtZggu5XBRzklPYbm6YXIBQ2UUiPE2czjrnSm8t mSKqxkMs06w4I3NPIIQ8PUyzfJNM4uTdBCcPA8sdvm9wUZpzX3svt5TyBHCK2SNEeB MjF2154ah59Gw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Delete trailing #t. --- gnu/packages/tls.scm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 608a7d05b8..5bfc5545db 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -366,8 +366,7 @@ required structures.") ((string-prefix? "powerpc64" target) "linux-ppc64") ((string-prefix? "powerpc" target) - "linux-ppc"))) - #t))) + "linux-ppc")))))) '()) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) @@ -406,8 +405,7 @@ required structures.") (for-each (lambda (file) (install-file file slib) (delete-file file)) - (find-files lib "\\.a$")) - #t))) + (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation (lambda* (#:key outputs #:allow-other-keys) ;; Move man3 pages and full HTML documentation to "doc". @@ -420,8 +418,7 @@ required structures.") (copy-recursively man3 man-target) (delete-file-recursively man3) (copy-recursively html html-target) - (delete-file-recursively html) - #t))) + (delete-file-recursively html)))) (add-after 'install 'remove-miscellany (lambda* (#:key outputs #:allow-other-keys) @@ -430,8 +427,7 @@ required structures.") (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" ,(package-version this-package) - "/misc")) - #t)))))) + "/misc")))))))) (native-search-paths (list (search-path-specification (variable "SSL_CERT_DIR") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:27 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:28 +0000 Received: from localhost ([127.0.0.1]:58044 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9P-0004o4-GV for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:27 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9A-0004j6-L9 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:13 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKCcY; Fri, 18 Jun 2021 19:19:12 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 17/37] openssl: Make the #:phases argument a G-expression. Date: Fri, 18 Jun 2021 19:16:11 +0200 Message-Id: <20210618171631.20534-17-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036752; bh=UpZd7CWWFi0sI2W3ZGUelllQ18on6haAa/t2CC4/2tA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=eRUMxeec4//72WYuL4+aJXGQlhgyMcsD41uiH7H8a+FU0lApAcB0JJD54+LTmomn4 051J6rzkIEJkqltEEE3EifB60Ot+vvOQdAAOBMYI1//bXBcbPoIHod5Kn0G9fBbCEq ry4GO6hDg2EOIwy5uYWnRtMmx7BtHgg1yrFmP1W+K3RTeFI7fI7rl173c4uLQE/4u9 Ko0QK0fkJQJUXHzK9tWGmdYgzsReGrEcV5H1g2obwvAkjD5fWVIqdKJA6uSGPeZnGs BXsq2TMxJd7PaO9tz0qnyrZpJJNXhAQtymh3q76I7120yFwM6DQyeZORTsqKvcO195 i8NzmKCS0iR7Q== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This allows using this-package-native-input later. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Make this a G-expression. (openssl-1.0)[arguments]<#:phases>: Likewise. --- gnu/packages/tls.scm | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 5bfc5545db..9de9a78e84 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -38,6 +38,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system perl) @@ -341,9 +342,10 @@ required structures.") ;; so we explicitly disallow it here. #:disallowed-references ,(list (canonical-package perl)) #:phases + ,#~ (modify-phases %standard-phases - ,@(if (%current-target-system) - '((add-before + #$@(if (%current-target-system) + #~((add-before 'configure 'set-cross-compile (lambda* (#:key target outputs #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) @@ -367,7 +369,7 @@ required structures.") "linux-ppc64") ((string-prefix? "powerpc" target) "linux-ppc")))))) - '()) + #~()) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -377,9 +379,9 @@ required structures.") (("/usr/bin/env") (string-append (assoc-ref %build-inputs "coreutils") "/bin/env"))) - (invoke ,@(if (%current-target-system) - '("./Configure") - '("./config")) + (invoke #$@(if (%current-target-system) + #~("./Configure") + #~("./config")) "shared" ;build shared libraries "--libdir=lib" @@ -388,13 +390,13 @@ required structures.") ;; conventional. (string-append "--openssldir=" out "/share/openssl-" - ,(package-version this-package)) + #$(package-version this-package)) (string-append "--prefix=" out) (string-append "-Wl,-rpath," lib) - ,@(if (%current-target-system) - '((getenv "CONFIGURE_TARGET_ARCH")) - '()))))) + #$@(if (%current-target-system) + #~((getenv "CONFIGURE_TARGET_ARCH")) + #~()))))) (add-after 'install 'move-static-libraries (lambda* (#:key outputs #:allow-other-keys) ;; Move static libraries to the "static" output. @@ -426,7 +428,7 @@ required structures.") ;; scripts. Remove them to avoid retaining a reference on Perl. (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" - ,(package-version this-package) + #$(package-version this-package) "/misc")))))))) (native-search-paths (list (search-path-specification @@ -471,7 +473,7 @@ required structures.") ;; Parallel build is not supported in 1.0.x. ((#:parallel-build? _ #f) #f) ((#:phases phases) - `(modify-phases ,phases + #~(modify-phases #$phases (add-before 'patch-source-shebangs 'patch-tests (lambda* (#:key inputs native-inputs #:allow-other-keys) (let ((bash (assoc-ref (or native-inputs inputs) "bash"))) @@ -494,9 +496,9 @@ required structures.") ;; Override this phase because OpenSSL 1.0 does not understand -rpath. (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) - (invoke ,@(if (%current-target-system) - '("./Configure") - '("./config")) + (invoke #$@(if (%current-target-system) + #~("./Configure") + #~("./config")) "shared" ;build shared libraries "--libdir=lib" @@ -504,12 +506,12 @@ required structures.") ;; PREFIX/ssl. Change that to something more ;; conventional. (string-append "--openssldir=" out - "/share/openssl-" ,version) + "/share/openssl-" #$version) (string-append "--prefix=" out) - ,@(if (%current-target-system) - '((getenv "CONFIGURE_TARGET_ARCH")) - '()))))) + #$@(if (%current-target-system) + '((getenv "CONFIGURE_TARGET_ARCH")) + '()))))) (delete 'move-extra-documentation) (add-after 'install 'move-man3-pages (lambda* (#:key outputs #:allow-other-keys) @@ -534,7 +536,7 @@ required structures.") ;; scripts. Remove them to avoid retaining a reference on Perl. (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" - ,version "/misc")) + #$version "/misc")) #t))))))))) (define-public libressl -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:28 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:28 +0000 Received: from localhost ([127.0.0.1]:58046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9P-0004oB-V0 for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:28 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9B-0004j8-2r for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:13 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKCcl; Fri, 18 Jun 2021 19:19:12 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 18/37] openssl: Use G-exp machinery for referring to outputs. Date: Fri, 18 Jun 2021 19:16:12 +0200 Message-Id: <20210618171631.20534-18-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036752; bh=YhqcZofahoNOOGEzlc59JaojMMV5QRbpQX/W3AtKzII=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=jIehDTMQTpTzukeWkgC//KPla3LnoInPDFfBlnZNrF7DWXC2+oAtr0GjWyxypxiAa hUPQRvJO8mp4pX+CFKJ5pKhYMDPcdn1PlIpWLupzAFWPGtt3sqPXZph/TbE1reUa2a yZruSYSeowxnAXxg9YbTFxg3Mw6p0fz2wSefC3speTT5Fsrrli4F+fhxcvsvVOOzle 4EHDD0X7dctKNtRgomQFzAAM4DdIX7uHSFZwZz5NZBolcNJbczPFInqOkswoJtaVIL 0s2b/Sc1fgHo14hAaa2tBLkgFxILWRSRjbVHl+BbbgHKhHi8NEDE03sdCn4nR5a1Jx gyfNSiRQCmoMQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This doesn't fix anything broken, just for simplifying the code a little while we're rebuilding the world anyway. IMHO this makes the code a little more readable. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Don't refer to the association list 'outputs', use #$output, #$output:doc and #$output:static instead. --- gnu/packages/tls.scm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 9de9a78e84..90211c733d 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020 Maxim Cournoyer +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -347,7 +348,7 @@ required structures.") #$@(if (%current-target-system) #~((add-before 'configure 'set-cross-compile - (lambda* (#:key target outputs #:allow-other-keys) + (lambda* (#:key target #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) (setenv "CONFIGURE_TARGET_ARCH" (cond @@ -371,8 +372,8 @@ required structures.") "linux-ppc")))))) #~()) (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) + (lambda _ + (let* ((out #$output) (lib (string-append out "/lib"))) ;; It's not a shebang so patch-source-shebangs misses it. (substitute* "config" @@ -398,23 +399,23 @@ required structures.") #~((getenv "CONFIGURE_TARGET_ARCH")) #~()))))) (add-after 'install 'move-static-libraries - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; Move static libraries to the "static" output. - (let* ((out (assoc-ref outputs "out")) + (let* ((out #$output) (lib (string-append out "/lib")) - (static (assoc-ref outputs "static")) + (static #$output:static) (slib (string-append static "/lib"))) (for-each (lambda (file) (install-file file slib) (delete-file file)) (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; Move man3 pages and full HTML documentation to "doc". - (let* ((out (assoc-ref outputs "out")) + (let* ((out #$output) (man3 (string-append out "/share/man/man3")) (html (string-append out "/share/doc/openssl")) - (doc (assoc-ref outputs "doc")) + (doc #$output:doc) (man-target (string-append doc "/share/man/man3")) (html-target (string-append doc "/share/doc/openssl"))) (copy-recursively man3 man-target) @@ -423,13 +424,12 @@ required structures.") (delete-file-recursively html)))) (add-after 'install 'remove-miscellany - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; The 'misc' directory contains random undocumented shell and Perl ;; scripts. Remove them to avoid retaining a reference on Perl. - (let ((out (assoc-ref outputs "out"))) - (delete-file-recursively (string-append out "/share/openssl-" - #$(package-version this-package) - "/misc")))))))) + (delete-file-recursively (string-append #$output "/share/openssl-" + #$(package-version this-package) + "/misc"))))))) (native-search-paths (list (search-path-specification (variable "SSL_CERT_DIR") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:28 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:28 +0000 Received: from localhost ([127.0.0.1]:58048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9Q-0004oJ-B1 for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:28 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9B-0004j3-FA for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:13 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKCct; Fri, 18 Jun 2021 19:19:13 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 19/37] openssl: Move documentation instead of copying and deleting it. Date: Fri, 18 Jun 2021 19:16:13 +0200 Message-Id: <20210618171631.20534-19-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036753; bh=tccV5/cHu439jXtpaZe5XLAOFrBmvilcUPK5tJbOj6g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=Sh6gUxCr+ksqGe5bKQpNtHJ+ckFkAsVvQ3r9zyJZ0XnSyzleDVLQxHF5f8w8l9rDk 4ywS8/c8LNTbAv7ZOPRMvPuy9jSCo9FBmL4xthPOE+TmNU0Ovf+dTyrqjN+LMHSoQL kqQf+iFulsg+lLQW4EtAmA2Lb+0Q4Ztnm8X68X/+5qwDuj9QH92gOOtKqfaavsWeAt Jc02NQ5ZxKDv5ulOUkRX3UbT++qkj3TIXFWqmIB/dv9HAWKVDbWTEs5mpo10Od39AI +Kf46ezki7HmKSllaGwstrNhnbK60xRyh1q9YBtXtICLeNbbvCBEnlJ5xShLuDpDLN TekiA2443efFA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/tls.scm (openssl)[arguments]<#:phases>{move-extra-documentation}: Use 'rename-file' instead of 'copy-recursively' and 'delete-file-recursively'. --- gnu/packages/tls.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 90211c733d..9aa0b5a212 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -418,10 +418,10 @@ required structures.") (doc #$output:doc) (man-target (string-append doc "/share/man/man3")) (html-target (string-append doc "/share/doc/openssl"))) - (copy-recursively man3 man-target) - (delete-file-recursively man3) - (copy-recursively html html-target) - (delete-file-recursively html)))) + (mkdir-p (dirname man3-target)) + (mkdir-p (dirname html-target)) + (rename-file man3 man-target) + (rename-file html html-target)))) (add-after 'install 'remove-miscellany (lambda _ -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:28 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:29 +0000 Received: from localhost ([127.0.0.1]:58050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9Q-0004oQ-KI for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:28 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9B-0004jA-SQ for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:14 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKDcy; Fri, 18 Jun 2021 19:19:13 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 20/37] openssl: Move all man pages to separate output, not only man3. Date: Fri, 18 Jun 2021 19:16:14 +0200 Message-Id: <20210618171631.20534-20-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036753; bh=N8OeVKJpboHCfJBxETy5Vb0auS0E6suYXS8mlWbYOmk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=Wt6VdHDaGGPt4t0TYac+V5Qaap+RlequO5VBpHcE0dXngU4iXTAoLZNBKkhuZxbPQ aErm2fGrrKYkXEd/n29eV41raSmpcPDcaR85XLl8URa3TI1j7YcvtXvhgtm2mKRqh2 StbTJER7vAw8xNkYH/G69b9Pb+vQZVxIAZB799HBUdSpd8U42kFA/rB2cbCpRLsP9k XgSiOswWGK1ltZ6Lcfp12kzObW6jfT/ddEEwdWrggbVjxQaPCaskRYakc80OibzU23 exnM199/HeGzbMx+M0jN0pgBPid7IX5xzQzOsMK01dZMAN97fOvHygiFDc+urUMF40 VEzFqnXfXtrSg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) There does not seem to be any reason to only move man3 pages. So, move all man pages to a separate output for documentation. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>{move-extra-documentation}: Move all man pages, not only man3. --- gnu/packages/tls.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 9aa0b5a212..c178806805 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -411,16 +411,16 @@ required structures.") (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation (lambda _ - ;; Move man3 pages and full HTML documentation to "doc". + ;; Move man pages and full HTML documentation to "doc". (let* ((out #$output) - (man3 (string-append out "/share/man/man3")) - (html (string-append out "/share/doc/openssl")) + (man (string-append out "/share/man")) + (html (string-append out "/share/doc/openssl")) (doc #$output:doc) - (man-target (string-append doc "/share/man/man3")) + (man-target (string-append doc "/share/man")) (html-target (string-append doc "/share/doc/openssl"))) - (mkdir-p (dirname man3-target)) + (mkdir-p (dirname man-target)) (mkdir-p (dirname html-target)) - (rename-file man3 man-target) + (rename-file man man-target) (rename-file html html-target)))) (add-after 'install 'remove-miscellany -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:29 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:29 +0000 Received: from localhost ([127.0.0.1]:58052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9Q-0004oX-TT for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:29 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9C-0004j5-9e for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:14 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKDd3; Fri, 18 Jun 2021 19:19:14 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 21/37] openssl: Find bin/env when cross-compiling. Date: Fri, 18 Jun 2021 19:16:15 +0200 Message-Id: <20210618171631.20534-21-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036754; bh=vhZXOsCczCO429r2Yoc9TLnkfRn6IvuUP6kheXL3cLo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=fEsAQGTTL0ENKW1HHYcd0DK4vANAKzYWbABBLwUwvrKYSLh66uR4zTQ0AWyZ1QHN1 nBSN9dF5hB8CNr2g8e7zC034rpV4AINEo4zsYi60Donrxl26PDJvID9BgYzZH0VRSE pG2ThQXXcGuCbAAXgpupGmgPt4YJHiBobOTO6mu7aWkbb3uR4Xuo28yoqad8i0/gnP UV9XjOMd2cAdFF9LLVfkk/nNy1QGkKYX3uOTPXFFTjQRhiX19TA0hoO/xddxiscILQ H8e0SvtTnIDIsQGqL8uwK6fF4GaUR5wsxuwasEx8SVUhREeZlayoE2KEnZJiK+wLPX HotXRDUK7A5aA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) %build-inputs does not exist when cross-compiling, so find bin/env by another way. * (openssl)[arguments]<#:phases>{configure}: Don't use '%build-inputs', use 'which' instead. --- gnu/packages/tls.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index c178806805..a4e754e27f 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -376,10 +376,10 @@ required structures.") (let* ((out #$output) (lib (string-append out "/lib"))) ;; It's not a shebang so patch-source-shebangs misses it. + ;; Don't use (assoc-ref %build-inputs "coreutils"), as + ;; %build-inputs is not defined when cross-compiling. (substitute* "config" - (("/usr/bin/env") - (string-append (assoc-ref %build-inputs "coreutils") - "/bin/env"))) + (("/usr/bin/env") (which "env"))) (invoke #$@(if (%current-target-system) #~("./Configure") #~("./config")) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:29 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:29 +0000 Received: from localhost ([127.0.0.1]:58054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9R-0004of-6d for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:29 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9C-0004j6-L3 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:14 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKEd7; Fri, 18 Jun 2021 19:19:14 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 22/37] openssl: Extract logic for computing CONFIGURE_TARGET_ARCH. Date: Fri, 18 Jun 2021 19:16:16 +0200 Message-Id: <20210618171631.20534-22-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036754; bh=1ERsHqWnvtyigwuip0m1eh/IFO2MV3pns4YrtQZDDxw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=if50NeI/txYRuZwDepx2buANmcBU0PnqoMgwKJ9TblhYnvIpMXhdCrNnzdol68E6J ZwOLMuzEGUmO1/XlxZwoI5pdML9wk0hHdDjfNduGFFWt3QyCGl/ejqm6pyNoMVmkCE aoiOdndIy8v7aEhbyIkOLXg1e4ZjAsBAm7ANOUGkotPa9Xpyb01F0NWQv0QlN6SWXe HkmOtbssVE99hfsshJ1FNQbAyh/y6e4c/U7BmWFJRRCWHZPHHemM6ZQ7opcMxti/Bl 0goOHo2MFBrixIIytTlzKZCRMVwdIE/9KS4+EVP3v+TpED4S2OjOzBDoJ2bAcA8etS zHubEJsSqvCkg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) By computing this value outside the build code, new targets can be added without causing rebuilds for other targets. * gnu/packages/tls.scm (target->openssl-target): New procedure. (openssl)[arguments]<#:phases>{set-cross-compile}: Use it. --- gnu/packages/tls.scm | 46 ++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index a4e754e27f..af91e42888 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -313,6 +313,31 @@ required structures.") (define-public guile3.0-gnutls (deprecated-package "guile3.0-gnutls" gnutls)) +(define (target->openssl-target target) + "Return the value to set CONFIGURE_TARGET_ARCH to when cross-compiling +OpenSSL for TARGET." + ;; Keep this code outside the build code, + ;; such that new targets can be added + ;; without causing rebuilds for other targets. + (cond ((string-prefix? "i586" target) + "hurd-x86") + ((string-prefix? "i686" target) + "linux-x86") + ((string-prefix? "x86_64" target) + "linux-x86_64") + ((string-prefix? "mips64el" target) + "linux-mips64") + ((string-prefix? "arm" target) + "linux-armv4") + ((string-prefix? "aarch64" target) + "linux-aarch64") + ((string-prefix? "powerpc64le" target) + "linux-ppc64le") + ((string-prefix? "powerpc64" target) + "linux-ppc64") + ((string-prefix? "powerpc" target) + "linux-ppc"))) + (define-public openssl (package (name "openssl") @@ -351,25 +376,8 @@ required structures.") (lambda* (#:key target #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) (setenv "CONFIGURE_TARGET_ARCH" - (cond - ((string-prefix? "i586" target) - "hurd-x86") - ((string-prefix? "i686" target) - "linux-x86") - ((string-prefix? "x86_64" target) - "linux-x86_64") - ((string-prefix? "mips64el" target) - "linux-mips64") - ((string-prefix? "arm" target) - "linux-armv4") - ((string-prefix? "aarch64" target) - "linux-aarch64") - ((string-prefix? "powerpc64le" target) - "linux-ppc64le") - ((string-prefix? "powerpc64" target) - "linux-ppc64") - ((string-prefix? "powerpc" target) - "linux-ppc")))))) + #$(target->openssl-target + (%current-target-system)))))) #~()) (replace 'configure (lambda _ -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:29 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:29 +0000 Received: from localhost ([127.0.0.1]:58056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9R-0004om-IJ for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:29 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9D-0004j8-0J for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:15 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKEdH; Fri, 18 Jun 2021 19:19:14 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 23/37] readline: Make #:configure-flags a G-expression. Date: Fri, 18 Jun 2021 19:16:17 +0200 Message-Id: <20210618171631.20534-23-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036754; bh=6pKRGWeWOQaDnklxh6edH5vqNzGDBgspCLih5AvELa8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=SAhVB4+Acsuptw6fthKwMeM4ZRFrXgKOeeDudKF/C76z1WtcOMVlxt9A/5nG6TK6n 2pwVPTXZiP+FGqZsdlf8gCiTH/HXbWETmuLI+5TaalMNEEsQ7AnLUJoJZHo2Z30SLo mPjSNRbfy5PfdK5pw7+4p2dpXnI3b3UwvjxSzPr6su8IXsD3cr8QLSu1z1j1rXhV1x 99twNMmK/Nyi0ssPW+x9w9NcJtQJawW7ypHephgc3sv8V+RyhkDEPsh9b3sT8ZCihm SANE+NuguFfdT5MAgC9yV+Zn1xKws2ZITpWRbItQBlS5VrUzwwJCjGwpbtZ/LmaEuG lN2lUthZ2Uf3Q== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This allos using ungexp and this-package-input later. * gnu/packages/readline.scm (readline)[arguments]<#:configure-flags>: Make this a G-expression. --- gnu/packages/readline.scm | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm index b4c91675a4..6cfa24c666 100644 --- a/gnu/packages/readline.scm +++ b/gnu/packages/readline.scm @@ -29,6 +29,7 @@ #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (ice-9 format)) (define (patch-url version seqno) @@ -76,19 +77,19 @@ (build-system gnu-build-system) (propagated-inputs `(("ncurses" ,ncurses))) (arguments `(#:configure-flags - (list (string-append "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib") + ,#~(list (string-append "LDFLAGS=-Wl,-rpath -Wl," + (assoc-ref %build-inputs "ncurses") + "/lib") - ;; This test does an 'AC_TRY_RUN', which aborts when - ;; cross-compiling, so provide the correct answer. - ,@(if (%current-target-system) - '("bash_cv_wcwidth_broken=no") - '()) - ;; MinGW: ncurses provides the termcap api. - ,@(if (target-mingw?) - '("bash_cv_termcap_lib=ncurses") - '())) + ;; This test does an 'AC_TRY_RUN', which aborts when + ;; cross-compiling, so provide the correct answer. + #$@(if (%current-target-system) + '("bash_cv_wcwidth_broken=no") + '()) + ;; MinGW: ncurses provides the termcap api. + #$@(if (target-mingw?) + '("bash_cv_termcap_lib=ncurses") + '())) ,@(if (target-mingw?) ;; MinGW: termcap in ncurses -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:53 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:53 +0000 Received: from localhost ([127.0.0.1]:58058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9o-0004pP-U7 for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:53 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9E-0004j5-45 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:16 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKFdY; Fri, 18 Jun 2021 19:19:15 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 26/37] bash: Fix cross-compilation build error. Date: Fri, 18 Jun 2021 19:16:20 +0200 Message-Id: <20210618171631.20534-26-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036755; bh=Jg15KuLDc9Pd0cjkQKGHl1QMNvmHzgPBIjg4oyLTNo8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=Whafk8vV5dybHyvXIYDi88xGSYYJVao/QasbAnTi8xRqr9z7Aj5kDP+ZYgNagO8e/ 2M9tMf08wd78Y8wvdoon1wvMO8nWQ0700Szhqo37qvF0zxzLMYnYFh8ms8/B1StJmL QpX58wrmBrj0hB5Nlgd7rdqq2eM5ciKYBK0RjUMHDfn4SkuVNjF+QyeJpI6ejCtZjq rin3du9+H1YkuCE1KS74/RN9QDM0XyXoZFWa9WwjcibXKFmuDA58cWTTpmfSLmr9XX 5h9z754/w6FJaqyun2DlUoW+QcV03qzYGSkgkuukUKMqExfwqKhajKozDYDD0E+MEO +qLB31B3WihVQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) %build-inputs does not exist when cross-compiling, so use this-package-input instead. * gnu/packages/bash.scm (bash)[arguments]<#:configure-flags>: Use this-package-input instead of %build-inputs. --- gnu/packages/bash.scm | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index b3af873a66..d51ab26bc8 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -103,22 +103,25 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." 1)) (define-public bash - (let* ((cppflags (string-join '("-DDEFAULT_PATH_VALUE='\"/no-such-path\"'" - "-DSTANDARD_UTILS_PATH='\"/no-such-path\"'" - "-DNON_INTERACTIVE_LOGIN_SHELLS" - "-DSSH_SOURCE_BASHRC") - " ")) - (configure-flags - #~`("--with-installed-readline" - ,#$(string-append "CPPFLAGS=" cppflags) - ,(string-append - "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "readline") - "/lib" - " -Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib"))) - (version "5.1")) + (let ((cppflags (string-join '("-DDEFAULT_PATH_VALUE='\"/no-such-path\"'" + "-DSTANDARD_UTILS_PATH='\"/no-such-path\"'" + "-DNON_INTERACTIVE_LOGIN_SHELLS" + "-DSSH_SOURCE_BASHRC") + " ")) + (version "5.1")) + ;; Delay expansion to inside a lexical environment + ;; where this-package is bound. + (define-syntax configure-flags + (identifier-syntax + #~`("--with-installed-readline" + ,#$(string-append "CPPFLAGS=" cppflags) + ,(string-append + "LDFLAGS=-Wl,-rpath -Wl," + ;; %build-inputs does not exist when cross-compiling, + ;; so use this-package-input instead. + #$(file-append (this-package-input "readline") "/lib") + " -Wl,-rpath -Wl," + #$(file-append (this-package-input "ncurses") "/lib"))))) (package (name "bash") (source (origin -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:53 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:53 +0000 Received: from localhost ([127.0.0.1]:58060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9p-0004pR-67 for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:53 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9E-0004j6-FU for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:16 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKFdf; Fri, 18 Jun 2021 19:19:16 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 27/37] fontconfig: Make the #:configure-flags argument a G-expression. Date: Fri, 18 Jun 2021 19:16:21 +0200 Message-Id: <20210618171631.20534-27-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036756; bh=eE/ELwt0ayoao9TRVzPRFatyA74xUIrSYWIXnB6jcQM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=lHSk6Dit8aMezQn+xFQ9mieSdsccj9STBmM1dZlep8jOyYR0ivL4H/RZIGC2TmJtx WeUsInttPipZzM+UpS1zdL+TeAI3EA2iDCCV+xmbLbLIiE9dqRzbyqyok1Jr3ldx6x HFpEqNf/tJg0y7Pf7RZFT++rk6DXn1rE5aQvUhk7xnIcA98/SR/IM60xwxWydA/C/S MzwD1Fy0JNRXtv3YbPv9RTuLHedtEC2+cGHbdTdIhxwY08G5gnqcmUAewVZHLLJ/MZ j2RAo17xoD7AhdPz4j8Z2x6GJRGZwU6yulBKLw1G2Q95T0JnKzGxE/Z3Z9aHO9YG6n 5+ISCcVANZX5Q== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This allows using #$(this-package-input ...) later. * gnu/packages/fontutils.scm (fontconfig)[arguments]<#:configure-flags>: Make this a G-expression instead of a raw S-expression. (fontconfig-with-documentation)[arguments]<#:configure-flags>: Likewise. --- gnu/packages/fontutils.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index dbce5beba8..234f11129a 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -64,6 +64,7 @@ #:use-module (gnu packages xorg) #:use-module (gnu packages tex) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix svn-download) @@ -347,6 +348,7 @@ Font Format (WOFF).") ("python" ,python-minimal))) ;to avoid a cycle through tk (arguments `(#:configure-flags + ,#~ (list "--disable-docs" "--with-cache-dir=/var/cache/fontconfig" ;; register the default fonts @@ -400,7 +402,7 @@ high quality, anti-aliased and subpixel rendered text on a display.") (arguments (substitute-keyword-arguments (package-arguments fontconfig) ((#:configure-flags configure-flags) - `(delete "--disable-docs" ,configure-flags)) + #~(delete "--disable-docs" #$configure-flags)) ((#:phases phases '%standard-phases) `(modify-phases ,phases (add-after 'install 'move-man-sections -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:53 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:53 +0000 Received: from localhost ([127.0.0.1]:58062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9p-0004pY-FL for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:53 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9E-0004j8-Rl for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:17 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKGdj; Fri, 18 Jun 2021 19:19:16 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 28/37] fontconfig: Fix build error when cross-compiling. Date: Fri, 18 Jun 2021 19:16:22 +0200 Message-Id: <20210618171631.20534-28-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036756; bh=E3QkiIRS2uR7h5BsXw4b/WY2KbCrmONCKPV2ehUqpiE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=Pj7L9tTijh7yo3hOwIaODsPF2ihG7M08t5tu0hcyAqT6FWCa+3YtfyRk/qkaCwtZH pZ21JD7s1SOjNSChlmIyLlKfPRN25R5e9ZszHLXbI5tonHAqnou3IymT257eUXjaPa nSfRQQfP1+YYdnIdfjd2wFlFPKPNqynDC4jacHP4NJFGtijWPYu22mIe+j0l+pvqKi VKpkyhb6ZX2PWrE3Ymx8mPg4DcNCv7pUB8vYgPzSJ1PZk3aWaCi7Wc/lnQaVBrJzHH Csn2qRB/8l6+l9s/RiNmkCepvP4Er/DHYUES3AajTtbLLA4Gq8ajrnIgu2hQyAbxZ0 HLDqRq13vxV+w== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) %build-inputs does not exist when cross-compiling, so use #$(this-package-input ...) instead. * gnu/packages/fontutils.scm (fontconfig)[arguments]<#:configure-flags>: Use this-package-input instead of %build-inputs. --- gnu/packages/fontutils.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 234f11129a..b0d40efeae 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -353,8 +353,8 @@ Font Format (WOFF).") "--with-cache-dir=/var/cache/fontconfig" ;; register the default fonts (string-append "--with-default-fonts=" - (assoc-ref %build-inputs "font-dejavu") - "/share/fonts") + #$(file-append (this-package-input "font-dejavu") + "/share/fonts")) ;; Register fonts from user and system profiles. (string-append "--with-add-fonts=" -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:54 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:54 +0000 Received: from localhost ([127.0.0.1]:58064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9p-0004pf-ME for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:53 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9F-0004j9-8c for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:18 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKGdn; Fri, 18 Jun 2021 19:19:17 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 29/37] glib: Use a correct python in scripts when cross-compiling. Date: Fri, 18 Jun 2021 19:16:23 +0200 Message-Id: <20210618171631.20534-29-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036757; bh=lCJWeyObrNhygznWt8O1GFxQ1qcJ7GORkrjP1mPEuYY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=SpaKT6pID5BTdRcY3GZkhUOTM1baVNsI+qzPuVw8gQYNEf0RZ46eAIrDjqV5TTZYp lj1Enc8g+79eJuVXB3hnRBCB2piR+E8CcJYx+uVH8649iMzm9tE3RIqaqCJRm6OX9W hBjx/LyLoEC1iO+MCZjUYjO+uSSTGMiujYyVvH5/Ko+7SrKiEsRO24PyaMjayETCbT a9LqpqYqKxEwM8uYxTUrUX6S2qSxfqKNfjVPF1fdp+UwXYD70qq1XyCvTpB7qIhX/u U1wZdX4EPeaRIqsTwKhwYbAAuP08rHata7wHSnLtCNuLX27r/NPX9eflnC2AGBDJlr r3zbO/cLtHdIw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) During the build, a native python should be used as these scripts will be invoked during the build, but when installed, they should be a python for the system we're compiling for. * gnu/packages/glib.scm (glib)[arguments]<#:phases>{patch-python-references}: Look up "python" in 'native-inputs', not 'inputs'. (glib)[inputs]{python,python-wrapper,bash-minimal}: New inputs. --- gnu/packages/glib.scm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 94276ae0ef..25c5ae494b 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2020 Florian Pelz ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020 Arthur Margerit +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -222,14 +223,19 @@ shared NFS home directories.") #t)) ;; Python references are not being patched in patch-phase of build, ;; despite using python-wrapper as input. So we patch them manually. + ;; + ;; These python scripts are both used during build and installed, + ;; so at first, use a python from 'native-inputs', not 'inputs'. When + ;; cross-compiling, the 'patch-shebangs' phase will replace + ;; the native python with a python from 'inputs'. (add-after 'unpack 'patch-python-references - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs #:allow-other-keys) (substitute* '("gio/gdbus-2.0/codegen/gdbus-codegen.in" "glib/gtester-report.in" "gobject/glib-genmarshal.in" "gobject/glib-mkenums.in") (("@PYTHON@") - (string-append (assoc-ref inputs "python") + (string-append (assoc-ref (or native-inputs inputs) "python") "/bin/python" ,(version-major+minor (package-version python))))) @@ -282,6 +288,13 @@ shared NFS home directories.") ("xsltproc" ,libxslt))) (inputs `(("bash-completion" ,bash-completion) + ;; "python", "python-wrapper" and "bash-minimal" + ;; are for the 'patch-shebangs' phase, to make + ;; sure the installed scripts end up with a correct shebang + ;; when cross-compiling. + ("python" ,python) + ("python-wrapper" ,python-wrapper) + ("bash-minimal" ,(canonical-package bash-minimal)) ("dbus" ,dbus) ("libelf" ,libelf))) (propagated-inputs -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:54 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:54 +0000 Received: from localhost ([127.0.0.1]:58066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9q-0004pn-10 for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:54 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI98-0004j9-QV for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:16 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKAby; Fri, 18 Jun 2021 19:19:10 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 12/37] libgcrypt: Fix cross-compilation build error. Date: Fri, 18 Jun 2021 19:16:06 +0200 Message-Id: <20210618171631.20534-12-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036750; bh=iyB61VxSz7o0o0YVn5/Hy/tABDE+f8iFAuqZZNSIiJo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=gFaBHPq3I8p2jQKZ1bLtAYRso6EIeNLAxcVL8aZ4CztA2Hi+LRdU3bQ/Rql9G+SwT uRnYwBrRgLUcAx/mHhyNzG/+Z2qviCuKxwC3Dg6rFJlqslZ8f25XVstMStFcSxcGca HJS6MgaNiM+0Ow5f961dg1hgNzmWI9POrNuoFH/tYcZl6UshPDLUYgUvodL/+bOGZc S4SFOT0kAklT1mWh58wYvCR6NrInRzudChfLtVHDiShcyYej/nQZQV2DZcx7/NxZq7 Hd1Tg8wbBtNDgiLyjYc+HfN5v/8rJcrEhhnMboIfbzYv0EfP5SE2K1UWkzEaHh/IZ7 nsbQkzwQcVIwQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) When cross-compiling a package using gnu-build-system, %build-inputs does not exist. But libgcrypt uses %build-inputs anyway. Fix it. * gnu/packages/gnupg.scm (libgcrypt)[arguments]<#:configure-flags>: Make this a G-exp instead of a raw S-exp. Eliminate %build-inputs and use this-package-input instead. --- gnu/packages/gnupg.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 1fee30584c..35cfdf6f43 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -74,6 +74,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) @@ -169,11 +170,12 @@ Daemon and possibly more in the future.") ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one. `(#:configure-flags - (list (string-append "--with-gpg-error-prefix=" - (assoc-ref %build-inputs "libgpg-error-host")) - ;; When cross-compiling, _gcry_mpih_lshift etc are undefined - ,@(if (%current-target-system) '("--disable-asm") - '())))) + ,#~(list (string-append "--with-gpg-error-prefix=" + #$(this-package-input "libgpg-error-host")) + ;; When cross-compiling, _gcry_mpih_lshift etc are undefined + #$@(if (%current-target-system) + #~("--disable-asm") + #~())))) (outputs '("out" "debug")) (home-page "https://gnupg.org/") (synopsis "Cryptographic function library") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:54 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:54 +0000 Received: from localhost ([127.0.0.1]:58068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9q-0004pu-BD for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:54 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9D-0004jA-NU for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:16 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKFdT; Fri, 18 Jun 2021 19:19:15 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 25/37] bash: Make #:configure-flags a G-expression. Date: Fri, 18 Jun 2021 19:16:19 +0200 Message-Id: <20210618171631.20534-25-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036755; bh=1zWLyKNdDiD8e2cuo2aK9D7rNa9KmEnbc2E+HBexX54=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=FQ1dtlRnitZ4MloYmgv95nUI60F5h1KuKbxv3qwynD9V9qiAB6+np8dd8cVGUGTqT cru/9jEbCv4SYIsIYj7+kyxebSTQAfcI9FbUWpmKLuGMDn6ye6CggcAFnrFKgm9/hQ nnBzpZSlNsXoyuveF/1KzQdX6N4wtJAtYt4BjF0dErvq7fMDml//KAGDbllWOBvcOK UE6wxyrW+CpbJxULtfcofBqYgjcpUiF6ECnoV5s1u17XruQCuFSqDKIXErWPfZvQ9a Lm723erwXfUqt5XwuSaZsbcpo6G+p5yvLrE3EUz5xjELHf0zotckUD34E6WeqK1Wb3 RzHTaisbdTiyQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This allows using this-package-input later. * gnu/packages/bash.scm (bash)[arguments]<#:configure-flags>: Make this a G-expression instead of a raw S-expression. --- gnu/packages/bash.scm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 7e98367bbb..b3af873a66 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -109,15 +109,15 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." "-DSSH_SOURCE_BASHRC") " ")) (configure-flags - ``("--with-installed-readline" - ,,(string-append "CPPFLAGS=" cppflags) - ,(string-append - "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "readline") - "/lib" - " -Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib"))) + #~`("--with-installed-readline" + ,#$(string-append "CPPFLAGS=" cppflags) + ,(string-append + "LDFLAGS=-Wl,-rpath -Wl," + (assoc-ref %build-inputs "readline") + "/lib" + " -Wl,-rpath -Wl," + (assoc-ref %build-inputs "ncurses") + "/lib"))) (version "5.1")) (package (name "bash") @@ -143,8 +143,8 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." `(;; When cross-compiling, `configure' incorrectly guesses that job ;; control is missing. #:configure-flags ,(if (%current-target-system) - `(cons* "bash_cv_job_control_missing=no" - ,configure-flags) + #~(cons* "bash_cv_job_control_missing=no" + #$configure-flags) configure-flags) ;; Bash is reportedly not parallel-safe. See, for instance, -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:55 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:55 +0000 Received: from localhost ([127.0.0.1]:58070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9q-0004q1-MB for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:54 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9D-0004j3-CI for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:18 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKEdQ; Fri, 18 Jun 2021 19:19:15 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 24/37] readline: Fix build error when cross-compiling. Date: Fri, 18 Jun 2021 19:16:18 +0200 Message-Id: <20210618171631.20534-24-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036755; bh=OE2XkfDDREhGi22ahelmmYnT5woDpIc1bL8b6o9Sgmw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=IjAROuzS3E2u+SO0u5xYkPWijmborInq+HQY+D9hM476PYlQS+HNCzwqv2++gHqfA VyVjCvWSFl8GgDj86yWiLpe/1nUrEMC3h89h//UUqi0LhfPyjyyt6geqjH8SV9UgpR afugn/y40wzIHi2YeGUuPa73BY1aHUPlfr/gC6J/SCYxj+h/RLajyxIZ6pvMO2r2qw oTR3y/C5IxZG42ixtkrvoFYNA6wf23EfAcdYq+Bcn3+1YqHTbsTBs1kClBu3IqACdy GcO+nixaMWDLiKy/dKnh+/Ulo5ETJ/hO5/dBh7VGlNEoMI/z632/GgeOMaJmP9J5tv OKXcxelJnjFTw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) %build-inputs does not exist when cross-compiling, so use this-package-input instead. * gnu/packages/readline.scm (readline)[arguments]<#:configure-flags>: Use this-package-input instead of %build-inputs. --- gnu/packages/readline.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm index 6cfa24c666..f9f2797247 100644 --- a/gnu/packages/readline.scm +++ b/gnu/packages/readline.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019, 2020 Marius Bakke +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -77,9 +78,10 @@ (build-system gnu-build-system) (propagated-inputs `(("ncurses" ,ncurses))) (arguments `(#:configure-flags - ,#~(list (string-append "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib") + ,#~(list (string-append + "LDFLAGS=-Wl,-rpath -Wl," + #$(this-package-input "ncurses") + "/lib") ;; This test does an 'AC_TRY_RUN', which aborts when ;; cross-compiling, so provide the correct answer. -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:55 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:55 +0000 Received: from localhost ([127.0.0.1]:58072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9r-0004q9-0C for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:55 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9F-0004jA-LN for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:18 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKHe1; Fri, 18 Jun 2021 19:19:17 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 30/37] glib: Verify the cross-compiled python is used in installed scripts. Date: Fri, 18 Jun 2021 19:16:24 +0200 Message-Id: <20210618171631.20534-30-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036757; bh=giAeuQfjk3falpP+LZZcVxXeFPnS4KkQbVcp7Utdx7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=DMyZSUzQL2FVMttMTiwFDeayL005AG2h0BubsgPFfvkKVP+K++Sdns6eeumFnDIpz 7jM8jr+I1g+3+hmk4HME8kO4ykqo/9pUrkBYqoaYxGmQUw6Csg5wnYUlPCeIE/c3i1 cOuoYAlK5P3dO6I45KtWsmkAwHZVvN5OJb/nPpQhmMYLeEgJRpOSmSmE/y3BjK7Ryg jR0WzSdCkDXqCQCdqVEd4H6Q+/HcEMfNFKMcl4lKeVHGFCkeXTR4vpHGmggTSz5/oZ kD+xXJBXcBSqrZZ/U6DdQHhWagK4MUvig0PoCy9JHJJaV1Fwd/5tbNNKJZggC2hf4g TBiO9FbguGzwQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/glib.scm (glib)[arguments]<#:disallowed-references>: Disallow the native python when cross-compiling. --- gnu/packages/glib.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 25c5ae494b..244544ea6f 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -77,6 +77,8 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix gexp) + #:use-module (srfi srfi-26) #:use-module ((srfi srfi-1) #:hide (zip)) ;; Export variables up-front to allow circular dependency with the 'xorg' @@ -200,7 +202,15 @@ shared NFS home directories.") (outputs '("out" ; everything "bin")) ; glib-mkenums, gtester, etc.; depends on Python (arguments - `(#:disallowed-references (,tzdata-for-tests) + `(#:disallowed-references + (,tzdata-for-tests + ;; Verify glib-mkenums, gtester, ... use the cross-compiled + ;; python. + ,@(if (%current-target-system) + (map (cut gexp-input <> #:native? #t) + `(,(this-package-native-input "python") + ,(this-package-native-input "python-wrapper"))) + '())) #:configure-flags '("-Dman=true" "-Dselinux=disabled") #:phases -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:55 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:55 +0000 Received: from localhost ([127.0.0.1]:58074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9r-0004qG-9C for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:55 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9G-0004j5-1Y for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:18 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKHe5; Fri, 18 Jun 2021 19:19:17 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 31/37] glib: Look up "tzdata" in 'native-inputs', not 'inputs'. Date: Fri, 18 Jun 2021 19:16:25 +0200 Message-Id: <20210618171631.20534-31-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036757; bh=vxnBAG50YIH3F0oavVB7X2j23R02j34MPE0qrGyVBi0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=jKRzehJ2Dx/wqEPd+m+IP8cs232BHOJdLi/iEVbFk63pe+gkb08axKPsfVgDhQhRK +RT497AwI5JKfsKjyGM1chneHS6qrGkI43okgq4J/keBe3vpdIoaNRqB4MStYjaTSh ytqY5eTZ/HTMPOR7ZVUgF6wJR8sDA4b0GgWS47vByDho8PuckcItnHA+KZAu62rOwU p/myme3nzKa+8hassYKd6dx95hXE4vmOkkdZaRdf/B0YHwWpParPaiqioIvUf3i9r7 AMbA4OzYKYqLh2+epPjWhEPVlzcQSKl/G9XU4EgBoizBE10AWKyY45tQmhCb74+gSX HSB1nUkR+loTA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Otherwise, "tzdata" won't be found when cross-compiling and string-append will complain about types. Alternatively, "tzdata" could be moved from 'native-inputs' to 'inputs'. * gnu/packages/glib.scm (glib)[arguments]<#:phases>{pre-check}: Look up "tzdata" in 'native-inputs', not 'inputs'. --- gnu/packages/glib.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 244544ea6f..57e8282a89 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -251,10 +251,11 @@ shared NFS home directories.") (package-version python))))) #t)) (add-before 'check 'pre-check - (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) ;; For tests/gdatetime.c. (setenv "TZDIR" - (string-append (assoc-ref inputs "tzdata") + (string-append (assoc-ref (or native-inputs inputs) + "tzdata") "/share/zoneinfo")) ;; Some tests want write access there. (setenv "HOME" (getcwd)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:55 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:55 +0000 Received: from localhost ([127.0.0.1]:58076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9r-0004qN-Hv for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:55 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9G-0004j6-CW for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:18 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKHeH; Fri, 18 Jun 2021 19:19:18 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 32/37] tk: Make #:configure-flags a G-expression. Date: Fri, 18 Jun 2021 19:16:26 +0200 Message-Id: <20210618171631.20534-32-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036758; bh=5uYwnGhqcyoz8f9UYuhpumozlHAVHIx5CnK53MVgB28=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=JiDyEkK6NyOBo/mB4HOb++rPLa0Sl8J/mWzTfIxIQaJteAIu85EbBvZSWdydtJwvP PhCJW7P+ea/mcC+1TqOkyBFy5g/sUWgZqPper86r26ZH0+93XW0ZA0D59cL6syZSps +iFQ+3Pj0m0DsQcaeIt2BgFjt4hz7LayW2ZF91dSDrzP3GX34vTqCu9ot6SwVXVrH2 ZliUV+UxHdamp0mpbJEJdqFIilWMu9Hmobod85eqCL/rzmSi3/HHjstoAyPd/njubm sPt2BxV1Lwz2pSb1ST2I8TclVWs7Q9k9xL7orTsdhqBdm2tiLuAs8YabRaJmRWH9mg u4kuvxUzZ8zKw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This allows using #$(this-package-input ...) later. * gnu/packages/tcl.scm (tk)[arguments]<#:configure-flags>: Make this a G-expression instead of an S-expression. --- gnu/packages/tcl.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm index 5fccfa5da9..c87a8187f2 100644 --- a/gnu/packages/tcl.scm +++ b/gnu/packages/tcl.scm @@ -230,15 +230,16 @@ X11 GUIs.") "/lib -lfontconfig"))))))) #:configure-flags + ,#~ (list (string-append "--with-tcl=" (assoc-ref %build-inputs "tcl") "/lib") ;; This is needed when cross-compiling, see: ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719247 - ,@(if (%current-target-system) - '("tcl_cv_strtod_buggy=1" - "ac_cv_func_strtod=yes") - '())) + #$@(if (%current-target-system) + #~("tcl_cv_strtod_buggy=1" + "ac_cv_func_strtod=yes") + #~())) ;; The tests require a running X server, so we just skip them. #:tests? #f)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:56 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:56 +0000 Received: from localhost ([127.0.0.1]:58078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9r-0004qU-QF for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:56 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34886) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9G-0004j8-P4 for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:19 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKJeR; Fri, 18 Jun 2021 19:19:18 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 33/37] tk: Do not use %build-inputs when cross-compiling. Date: Fri, 18 Jun 2021 19:16:27 +0200 Message-Id: <20210618171631.20534-33-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036758; bh=zt7BAM2kxTcKP2NYK6l7VYfWxdJEaUVC9x+20Op9hjE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=pbvh/Rodp5UEzg3AsEroldsEI6zrkq1dEOMMcC+Aj6Fm+m9q8pGzwfK16OqvGlqtx 32pcAB+CP4HoTMRGsD4awX6u6j7WCeGDZOdana5EQkM+gdz2SVKoHjPWp2XSdLygZi 0y4CZIoMSZw/qwI4M55F6irVM/VH4hm8iw42Tb2Vu71E6PH011beVEugLbm1Ucw2aQ jj4UxjuXFk0S38B8lZwZxyYL82+Oo1jJ+A2m6d8uNClsR/o1oQaUKQ/DucAr/rpzlP YTE7LnL+X6Q1aWRgN+GkQWZ1G993qzbfM/KOMB5APP2cfJrK/4h+4YOrojqHdCPjKa 1g4p4HqsfOmGQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) %build-inputs does not exists when cross-compiling, so use #$(this-package-input ...) instead. * gnu/packages/tcl.scm (tk)[arguments]<#:configure-flags>: Use 'this-package-input' instead of '%build-inputs' when cross-compiling. --- gnu/packages/tcl.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm index c87a8187f2..91ba8bbb3f 100644 --- a/gnu/packages/tcl.scm +++ b/gnu/packages/tcl.scm @@ -29,6 +29,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system perl) @@ -232,7 +233,9 @@ X11 GUIs.") #:configure-flags ,#~ (list (string-append "--with-tcl=" - (assoc-ref %build-inputs "tcl") + #$(if (%current-target-system) + (this-package-input "tcl") + #~(assoc-ref %build-inputs "tcl")) "/lib") ;; This is needed when cross-compiling, see: ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719247 -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:56 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:56 +0000 Received: from localhost ([127.0.0.1]:58080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9s-0004qc-3b for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:56 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34810) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9H-0004j3-FO for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:19 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKJea; Fri, 18 Jun 2021 19:19:19 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 35/37] opendht: Correct 'nettle' variable name in inputs. Date: Fri, 18 Jun 2021 19:16:29 +0200 Message-Id: <20210618171631.20534-35-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036759; bh=mQc4bfvIiXbBC0LdrMy992TtZOsGoT1AF1x3F6ZKEDo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=lwidCeR5mkQuOCH0KN27fWmb8KDYk/rXFfrODdiI3Y5v/Dev6F5Hk1x/h7oweED9d /G+IjaAr/1rzrNJsbSWQ3EnK43EEAXxgfdxIlk1+229K+FykHaPXOpztlTqDJxBO3n e6bi4P/xUuCtxQOIbF4K1fQM+DCiRRvSSsuWQrnC0SyZHmR+i3wayIfqCdTe5UwJPa Lg2kR0nzYL+fqfxaZCGe27MKCgupmRE6VNWg5jb3Rm4wCnQmMEe+p/S5RDQvW5U5TT flkMnNFGzAW8CMSQuN+Bn/cqr3dB1bYVMigLkKUqMTFkRHGblbUssHoxa7NGHV4ovd 3lIc131/LzDGQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Previously, opendht referred to 'nettle-3.7'. But nettle-3.7 has been renamed to simply 'nettle'. So, refer to 'nettle' instead of 'nettle-3.7'. This should fix recent evaluation failures of core-updates on ci.guix.gnu.org. * gnu/packages/networking.scm (opendht)[inputs]{nettle}: Refer to 'nettle' instead of 'nettle-3.7'. --- gnu/packages/networking.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index 62c4d7a392..6b154067b1 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -3478,7 +3478,7 @@ and targeted primarily for asynchronous processing of HTTP-requests.") (build-system cmake-build-system) (inputs `(("argon2" ,argon2) - ("nettle" ,nettle-3.7) + ("nettle" ,nettle) ("readline" ,readline) ("jsoncpp" ,jsoncpp) ("openssl" ,openssl) ;required for the DHT proxy -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:56 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:56 +0000 Received: from localhost ([127.0.0.1]:58082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9s-0004qj-Ch for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:56 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34904) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9H-0004j9-3S for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:19 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKJeW; Fri, 18 Jun 2021 19:19:18 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 34/37] libelf: Use the cross-compiler when cross-compiling. Date: Fri, 18 Jun 2021 19:16:28 +0200 Message-Id: <20210618171631.20534-34-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036758; bh=RWokKCzoehfrSlcLNti6dqTDx97owvOxCcB16lv8MSw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=Eilbndoqs0aRP3VagJ4JicRj8G5sQmmRiYhb6/RY+FnYriwwlPyXPyDX9+i6d6q+F FrubbxR+sP9XRqeYCUKdFzj12b6j0g4c27hUgYtjVyINAImn2C1FYIYy69BHaiD2DO 2Nx39FUSrwzb2EuJh6F5ve7NgrFCUgjktZ60rCQzGoOTLUXyd2p3bFSvtf1MNjaqtN xC/y+MicXDsP6CrlLEcrEP+Wkg+F9cJ+1ovHkvCd+4XHnLD7v4LZBcoY/x4czdcF8e n7eOw6T8GUk9Zf3N0f+RV1QPOiNQ2smAOYBSF+tkRhaIqfGDo53xtKz+oR4dYZfSI2 R/I6L5S/ziA2g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * gnu/packages/elf.scm (libelf)[arguments]<#:phases>{delete-configure}: Regenerate the configure script when cross-compiling. (libelf)[arguments]<#:phases>{configure}: Do not replace when cross-compiling. (libelf)[native-inputs]: Add autoconf when cross-compiling. --- gnu/packages/elf.scm | 48 +++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index 0309dd95b5..66c2334e5c 100644 --- a/gnu/packages/elf.scm +++ b/gnu/packages/elf.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2020 Mark Wielaard ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2021 Leo Le Bouter +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -32,6 +33,7 @@ #:use-module (guix build-system gnu) #:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+)) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages compression) #:use-module (gnu packages documentation) #:use-module (gnu packages gcc) @@ -205,22 +207,36 @@ static analysis of the ELF binaries at hand.") (arguments `(#:phases (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - ;; This old `configure' script doesn't support - ;; variables passed as arguments. - (let ((out (assoc-ref outputs "out"))) - (setenv "CONFIG_SHELL" (which "bash")) - (invoke "./configure" - (string-append "--prefix=" out) - ,@(if (string=? "powerpc64le-linux" - (%current-system)) - '("--host=powerpc64le-unknown-linux-gnu") - '()) - ,@(if (string=? "aarch64-linux" - (%current-system)) - '("--host=aarch64-unknown-linux-gnu") - '())))))))) + ,(if (%current-target-system) + ;; This old 'configure' script doesn't + ;; support cross-compilation well. E.g., it fails + ;; to find the cross-compiler. + `(add-before 'bootstrap 'delete-configure + (lambda _ + (delete-file "configure"))) + `(replace 'configure + ;; This old `configure' script doesn't support + ;; variables passed as arguments. TODO: would + ;; simply regenerating 'configure' work + ;; well enough, even if compiling natively + ;; on powerpc or aarch64? + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (setenv "CONFIG_SHELL" (which "bash")) + (invoke "./configure" + (string-append "--prefix=" out) + ,@(if (string=? "powerpc64le-linux" + (%current-system)) + '("--host=powerpc64le-unknown-linux-gnu") + '()) + ,@(if (string=? "aarch64-linux" + (%current-system)) + '("--host=aarch64-unknown-linux-gnu") + '()))))))))) + (native-inputs + (if (%current-target-system) + `(("autoconf" ,autoconf)) + '())) (home-page (string-append "https://web.archive.org/web/20181111033959/" "http://www.mr511.de/software/english.html")) (synopsis "ELF object file access library") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:19:57 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:19:57 +0000 Received: from localhost ([127.0.0.1]:58084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9s-0004qq-QG for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:57 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9I-0004j5-9n for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:21 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKKem; Fri, 18 Jun 2021 19:19:20 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 37/37] meson: Support cross-compilation. Date: Fri, 18 Jun 2021 19:16:31 +0200 Message-Id: <20210618171631.20534-37-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036760; bh=9QgLcPXJWK9iabqmcx9sqfvov3avBGvRjKPIpMrusAg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=M3kPZfuq1nBYyL4Ag+XwuaJ1RRIuDH/WAYpXTOV5bj2Ewzte0gvVxgWxzJADj8OWt /hNGIcNW/g/qBp6trAgmaZKwjJsZK5En8bYI0PKk39hUkpDf1BpqKPYGbboACXBCi5 6k01HSmGrR0vD0bfchhxy6kyUKJKCD92fxdif8zA43PbW3S7q8M/nMOWpM0SKnpUNE d0bWulh0ZZNKQbALeB9Za26yLMvQN6GLcmA+veB5SmTJJ8bPBRcbERqM+xZd44eBey J+809uZZQPD2mkGLKiZDAqbBDAiZCT8JqL38y1SLoLYo6RWUSvo8tVkGvvjzDae5WG gxDRblpunsuAg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) For cross-compilation, meson needs to be passed a ‘cross file’ with information on the architecture, CPU type, endianness and operating system, and the name of the cross-compiler binaries. The new module (guix build meson-configuration) has some utilities for writing these cross files, used by 'make-cross-file' in a G-exp. The values for the cross file are generated by 'make-machine-alist' and 'make-binaries-alist'. 'make-machine-alist' and 'make-binaries-alist' live on the host side, such that new architectures and operating systems can be added without causing rebuilds for old architectures. Currently, only GNU/Hurd, GNU/Linux, MinGW, x86-32 and x86-64 are supported by 'make-machine-alist'. For other architectures, someone needs to figure out what to use as ‘CPU type’ first. Only i686-linux-gnu has been tested. This has been tested with: $ ./pre-inst-env guix build glib --target=i686-linux-gnu on a x86_64-linux system. ‘If it compiles, it should work.’ * guix/build/meson-configuration.scm (configuration-port): New parameter. (write-section-header): New procedure. (write-assignment): New procedure. (write-assignments): New procedure. * guix/build-system/meson.scm (target-hurd?): New predicate. (make-machine-alist): New procedure. (make-binaries-alist): New procedure. (make-cross-file): New procedure. (meson-cross-build): New procedure. (lower)[build-inputs]: Add standard cross packages when cross-compiling. Do not include regular 'inputs' when cross-compiling. (lower)[host-inputs]: Include 'inputs' when cross-compiling. (lower)[target-inputs]: Add cross packages when cross-compiling. (lower)[build]: Call 'meson-cross-build' instead of 'cross-build' when cross-compiling. (lower)[target]: Set it. (lower)[private-keywords]: Do not remove #:target when cross-compiling. --- Makefile.am | 1 + guix/build-system/meson.scm | 197 ++++++++++++++++++++++++++--- guix/build/meson-configuration.scm | 71 +++++++++++ 3 files changed, 250 insertions(+), 19 deletions(-) create mode 100644 guix/build/meson-configuration.scm diff --git a/Makefile.am b/Makefile.am index a10e06e5a7..d4bf626fd5 100644 --- a/Makefile.am +++ b/Makefile.am @@ -234,6 +234,7 @@ MODULES = \ guix/build/emacs-utils.scm \ guix/build/java-utils.scm \ guix/build/lisp-utils.scm \ + guix/build/meson-configuration.scm \ guix/build/maven/java.scm \ guix/build/maven/plugin.scm \ guix/build/maven/pom.scm \ diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm index 5adc0f92c8..1f763af2aa 100644 --- a/guix/build-system/meson.scm +++ b/guix/build-system/meson.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017 Peter Mikkelsen ;;; Copyright © 2018, 2019 Marius Bakke ;;; Copyright © 2021 Ludovic Courtès +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,7 +31,8 @@ #:use-module (guix packages) #:use-module (ice-9 match) #:export (%meson-build-system-modules - meson-build-system)) + meson-build-system + make-cross-file)) ;; Commentary: ;; @@ -40,6 +42,62 @@ ;; ;; Code: +(define (target-hurd? triplet) + (and (string-suffix? "-gnu" triplet) + (not (string-contains triplet "linux")))) + +(define (make-machine-alist triplet) + "Make an association list describing what should go into +the ‘host_machine’ section of the cross file when cross-compiling +for TRIPLET." + `((system . ,(cond ((target-hurd? triplet) "gnu") + ((target-linux? triplet) "linux") + ((target-mingw? triplet) "windows") + (#t (error "meson: unknown operating system")))) + (cpu_family . ,(cond ((target-x86-32? triplet) "x86") + ((target-x86-64? triplet) "x86_64") + ((target-arm32? triplet) "arm") + ((target-aarch64? triplet) "aarch64") + ((target-powerpc? triplet) + (if (target-64bit? triplet) + "ppc64" + "ppc")) + (#t (error "meson: unknown architecture")))) + (cpu . ,(cond ((target-x86-32? triplet) ; i386, ..., i686 + (substring triplet 0 4)) + ((target-x86-64? triplet) "x86_64") + (#t (error "meson: unknown CPU")))) + (endian . ,(cond ((string-prefix? "powerpc64le-" triplet) "little") + ((string-prefix? "mips64el-" triplet) "little") + ((target-x86-32? triplet) "little") + ((target-x86-64? triplet) "little") + (#t (error "meson: unknown architecture")))))) + +(define (make-binaries-alist triplet) + "Make an associatoin list describing what should go into +the ‘binaries’ section of the cross file when cross-compiling for +TRIPLET." + `((c . ,(cc-for-target triplet)) + (cpp . ,(cxx-for-target triplet)) + (pkgconfig . ,(pkg-config-for-target triplet)) + (objcopy . ,(string-append triplet "-objcopy")) + (ar . ,(string-append triplet "-ar")) + (ld . ,(string-append triplet "-ld")) + (strip . ,(string-append triplet "-strip")))) + +(define (make-cross-file triplet) + (computed-file "cross-file" + (with-imported-modules '((guix build meson-configuration)) + #~(begin + (use-modules (guix build meson-configuration)) + (call-with-output-file #$output + (lambda (f) + (parameterize ((configuration-port f)) + (write-section-header "host_machine") + (write-assignments '#$(make-machine-alist triplet)) + (write-section-header "binaries") + (write-assignments '#$(make-binaries-alist triplet))))))))) + (define %meson-build-system-modules ;; Build-side modules imported by default. `((guix build meson-build-system) @@ -68,24 +126,34 @@ #:rest arguments) "Return a bag for NAME." (define private-keywords - `(#:meson #:ninja #:inputs #:native-inputs #:outputs #:target)) - - (and (not target) ;; TODO: add support for cross-compilation. - (bag - (name name) - (system system) - (build-inputs `(("meson" ,meson) - ("ninja" ,ninja) - ,@native-inputs - ,@inputs - ;; Keep the standard inputs of 'gnu-build-system'. - ,@(standard-packages))) - (host-inputs (if source - `(("source" ,source)) - '())) - (outputs outputs) - (build meson-build) - (arguments (strip-keyword-arguments private-keywords arguments))))) + `(#:meson #:ninja #:inputs #:native-inputs #:outputs + ,@(if target + '() + '(#:target)))) + + (bag + (name name) + (system system) (target target) + (build-inputs `(("meson" ,meson) + ("ninja" ,ninja) + ,@native-inputs + ,@(if target '() inputs) + ;; Keep the standard inputs of 'gnu-build-system'. + ,@(if target + (standard-cross-packages target 'host) + '()) + ,@(standard-packages))) + (host-inputs `(,@(if source + `(("source" ,source)) + '()) + ,@(if target inputs '()))) + ;; Keep the standard inputs of 'gnu-buid-system'. + (target-inputs (if target + (standard-cross-packages target 'target) + '())) + (outputs outputs) + (build (if target meson-cross-build meson-build)) + (arguments (strip-keyword-arguments private-keywords arguments)))) (define* (meson-build name inputs #:key @@ -161,6 +229,97 @@ has a 'meson.build' file." #:disallowed-references disallowed-references #:guile-for-build guile))) +(define* (meson-cross-build name + #:key + target + build-inputs host-inputs target-inputs + guile source + (outputs '("out")) + (configure-flags ''()) + (search-paths '()) + (native-search-paths '()) + + (build-type "debugoptimized") + (tests? #f) + (test-target "test") + (glib-or-gtk? #f) + (parallel-build? #t) + (parallel-tests? #f) + (validate-runpath? #t) + (patch-shebangs? #t) + (strip-binaries? #t) + (strip-flags ''("--strip-debug")) + (strip-directories ''("lib" "lib64" "libexec" + "bin" "sbin")) + (elf-directories ''("lib" "lib64" "libexec" + "bin" "sbin")) + (phases '%standard-phases) + (system (%current-system)) + (imported-modules %meson-build-system-modules) + (modules '((guix build meson-build-system) + (guix build utils))) + allowed-references + disallowed-references) + "Cross-build SOURCE for TARGET using MESON, and with INPUTS, assuming that +SOURCE has a 'meson.build' file." + (define cross-file + (make-cross-file target)) + (define inputs + (if (null? target-inputs) + (input-tuples->gexp host-inputs) + #~(append #$(input-tuples->gexp host-inputs) + #+(input-tuples->gexp target-inputs)))) + (define builder + (with-imported-modules imported-modules + #~(begin + (use-modules #$@(sexp->gexp modules)) + + (define build-phases + #$(let ((phases (if (pair? phases) (sexp->gexp phases) phases))) + (if glib-or-gtk? + phases + #~(modify-phases #$phases + (delete 'glib-or-gtk-compile-schemas) + (delete 'glib-or-gtk-wrap))))) + + ;; Do not use 'with-build-variables', as there should be + ;; no reason to use %build-inputs and friends. + (meson-build #:source #+source + #:system #$system + #:outputs #$(outputs->gexp outputs) + #:inputs #$inputs + #:native-inputs #+(input-tuples->gexp build-inputs) + #:search-paths '#$(sexp->gexp + (map search-path-specification->sexp + search-paths)) + #:native-search-paths '#$(sexp->gexp + (map search-path-specification->sexp + native-search-paths)) + #:phases build-phases + #:configure-flags `("--cross-file" #+cross-file + ,@#$(sexp->gexp configure-flags)) + #:build-type #$build-type + #:tests? #$tests? + #:test-target #$test-target + #:parallel-build? #$parallel-build? + #:parallel-tests? #$parallel-tests? + #:validate-runpath? #$validate-runpath? + #:patch-shebangs? #$patch-shebangs? + #:strip-binaries? #$strip-binaries? + #:strip-flags #$(sexp->gexp strip-flags) + #:strip-directories #$(sexp->gexp strip-directories) + #:elf-directories #$(sexp->gexp elf-directories))))) + + (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) + system #:graft? #f))) + (gexp->derivation name builder + #:system system + #:target target + #:substitutable? substitutable? + #:allowed-references allowed-references + #:disallowed-references disallowed-references + #:guile-for-build guile))) + (define meson-build-system (build-system (name 'meson) diff --git a/guix/build/meson-configuration.scm b/guix/build/meson-configuration.scm new file mode 100644 index 0000000000..81b4eaa7e1 --- /dev/null +++ b/guix/build/meson-configuration.scm @@ -0,0 +1,71 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Maxime Devos +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix build meson-configuration) + #:use-module (ice-9 match) + #:export (write-section-header write-assignment + write-assignments make-machine-alist + configuration-port)) + +;; Commentary: +;; +;; Utilities for generating a ‘Cross build definition file’ for +;; the Meson build system. Configuration values are currently +;; never escaped. In practice this is unlikely to be a problem +;; in the build environment. +;; +;; Code: + +(define configuration-port + (fluid->parameter (make-unbound-fluid))) + +(define (write-section-header section-name) + "Write a section header for section named SECTION-NAME +to the configuration port." + (format (configuration-port) "[~a]~%" section-name)) + +(define (write-assignment key value) + "Write an assignment of VALUE to KEY to the configuration +port. VALUE must be a string (without any special characters +such as quotes), a boolean or an integer. Lists are currently +not supported" + (define port (configuration-port)) + (match value + ((? string?) + (format port "~a = '~a'~%" key value)) + ((? integer?) + (format port "~a = ~a~%" key value)) + (#f + (format port "~a = true~%" key)) + (#t + (format port "~a = false~%" key)))) + +(define* (write-assignments alist) + "Write the assignments in ALIST, an association list, +to the configuration port." + (for-each (match-lambda + ((key . value) + (write-assignment key value))) + alist)) + +(define* (make-machine-alist #:key system cpu-family cpu endian) + "Make an association list for the [host_machine] section." + `((system . ,system) + (cpu-family . ,cpu-family) + (cpu . ,cpu) + (endian . ,endian))) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:20:03 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:20:03 +0000 Received: from localhost ([127.0.0.1]:58086 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9t-0004qy-Ja for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:20:03 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9H-0004jA-Rg for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:23 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKKeh; Fri, 18 Jun 2021 19:19:19 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 36/37] cross-base: Fix cross-compiler for i686-linux-gnu. Date: Fri, 18 Jun 2021 19:16:30 +0200 Message-Id: <20210618171631.20534-36-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036759; bh=cL6/X82yxoqwh+DYMtBl3NVxy2HSHe9g4hdvR4Kv7Bw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=WQoO5oH7JUufqZdiA37OEnNqY+t00vKOX4hFYZlM56HQbXt5WraYlXqUp6DikKuBP hyLAiWQs2s8q/n+Sm4fz5LARiKsyNe0F6yH1YxUdZ0gHqALSympyPoVmyUDDcr1s0N JZTFgHfZKCdJoLDS2D2Vw5wnTrAEAirjVGnI2e/kpD1iFN1/sLRTRwT1Bmfp9/ULq5 ehJki+ahmH3GRaxnXxQcsx2ERmtl2FZefrdatj+ixcCaiFAS/+B5HBxsZvFbATAimK ENoGDqjM3FeH+6tgeGIZSwP42SnQbvMHT5j15QJ7lE6KsbKLTa+KFGGdqzl87I4EpS Bz99qFtq1tSqQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) GCC doesn't find libgcc_s.so anymore and looks in the wrong location. Fix this (well, more a work-around really). * gnu/packages/cross-base.scm (cross-gcc-arguments)<#:configure-flags>: Add --with-toolexecdir, such that libstdc++ ends up in the right place. Add --with-slibdir such that libgcc_s.so end up in the right place. (cross-gcc-arguments)<#:phases>{move-shared-libraries}: New phase, moving libraries in the correct place. Delete .la files, libasan.so and libusan.so to prevent circular references. Likewise, fix a reference in libstdc++.so.VERSION-gdb.py. --- gnu/packages/cross-base.scm | 63 +++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 9487ac9238..995b4ae065 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2019, 2020, 2021 Marius Bakke ;;; Copyright © 2019 Carl Dong ;;; Copyright © 2020 Mathieu Othacehe +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,6 +34,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (srfi srfi-1) @@ -169,9 +171,26 @@ base compiler and using LIBC (which may be either a libc package or #f.)" )) ;; Install cross-built libraries such as libgcc_s.so in - ;; the "lib" output. + ;; the "lib" output. At least for version 8.4.0, GCC + ;; will put libstdc++ in ${toolexecdir}/lib instead. + ;; (A bug?) So set --with-toolexecdir as well. + ,@(if libc - `((string-append "--with-toolexeclibdir=" + `((string-append "--with-toolexecdir=" + (assoc-ref %outputs "lib")) + (string-append "--with-toolexeclibdir=" + (assoc-ref %outputs "lib") + "/" ,target "/lib")) + '()) + ;; At least for GCC 8.0, libgcc_s.so and libstdc++.so + ;; are not installed in the location specified in + ;; --with-toolexeclibdir so GCC will not find it + ;; when cross-compiling, say, GNU Hello. + ;; + ;; Work-around by specifying slibdir. This is not + ;; sufficient, see move-shared-libraries below. + ,@(if (and libc (version>=? (package-version xgcc) "8.0")) + `((string-append "--with-slibdir=" (assoc-ref %outputs "lib") "/" ,target "/lib")) '()) @@ -193,7 +212,45 @@ base compiler and using LIBC (which may be either a libc package or #f.)" ,flags)) flags)) ((#:phases phases) - `(cross-gcc-build-phases ,target ,phases)))))) + (if (and libc (version>=? (package-version xgcc) "8.0")) + #~(modify-phases (cross-gcc-build-phases #$target #$phases) + (add-after 'install 'move-shared-libraries + (lambda _ + (let* ((slib (format #f "~a/~a/lib/" #$output:lib #$target)) + (badlib (format #f "~a/~a/lib/" #$output #$target)) + (libs (map basename (find-files badlib #:fail-on-error? #t)))) + (for-each + (lambda (lib) + (let ((from (string-append badlib lib)) + (to (string-append slib lib))) + (when (file-exists? to) + (error "~a was found twice, refusing to overwrite!" + lib)) + ;; The debugging script libstdc++.so.VERSION-gdb.py has + ;; reference to #$output. Correct it. + (when (string-suffix? "-gdb.py" lib) + (substitute* from + (("libdir = '(.*)'") + (string-append "libdir = '" slib "'"))) + (system* "cat" from)) + ;; The .la files have references to BADLIB, + ;; leading to cyclic references between + ;; the outputs of the package. Remove them + ;; and hope noone notices. + ;; + ;; Likewise, libasan.so.* and libubsan.so.* + ;; have references to #$output. + (if (or (string-suffix? ".la" lib) + (string-prefix? "libasan.so" lib) + (string-prefix? "libubsan.so" lib)) + (delete-file from) + (rename-file from to)))) + libs) + ;; If you have "cyclic references" problems, + ;; uncomment this and use --keep-failed to figure + ;; things out. + (copy-recursively #$output:lib "out-test"))))) + #~(cross-gcc-build-phases #$target #$phases))))))) (define (cross-gcc-patches xgcc target) "Return GCC patches needed for XGCC and TARGET." -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 18 13:20:04 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jun 2021 17:20:04 +0000 Received: from localhost ([127.0.0.1]:58090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI9z-0004ra-H5 for submit@debbugs.gnu.org; Fri, 18 Jun 2021 13:20:04 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:34916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luI99-0004jB-7E for 49025@debbugs.gnu.org; Fri, 18 Jun 2021 13:19:24 -0400 Received: from localhost.localdomain ([213.119.219.214]) by andre.telenet-ops.be with bizsmtp id JhK5250094e8Tal01hKAc6; Fri, 18 Jun 2021 19:19:10 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v3 core-updates 13/37] wrap-python3: Make #:builder a G-exp instead of a raw S-exp. Date: Fri, 18 Jun 2021 19:16:07 +0200 Message-Id: <20210618171631.20534-13-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210618171631.20534-1-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624036750; bh=IRhMRYtA5bO8jImKpsV7nKzgOxcI4vux1/LJAwKO0vs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To; b=DWdIvE158NHud+DNXSYJJfPeUrjNheTUZhxqMNGglWqn9yoYdrhZU+FytnzAm4xFh MjzZ6BQaokkemtwN5CVtUEVFPTjtBOnxz75lM041k/Oh6HRITOjVkMfBaC0arFmM9d WQXkas7yR6zbYIeWJ8UIE54c79UuUm/hGXR65o3KzUQhNFROACun42ds4DOJGWzVtM sEd9YIt4hJ/APmD/ybu9Jxx0BsJjsgIzhoTfa2kYKDJTch5RD/2FM5OJlHw6UEt4oO P0AohuQS4UU2Nz/P1CA2vb3wmMXKj/zLIN9Gj7DJxRqNKEh7BKtcKZlpsbKsXOZq6E q+QjkoVpwFbNA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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: , Reply-To: 49025@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) This allows using ungexp later. * gnu/packages/python.scm (wrap-python3)<#:builder>: Make this a G-expression. --- gnu/packages/python.scm | 46 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index b2ec486d7a..9628836567 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -573,29 +573,29 @@ for more information."))) (arguments `(#:modules ((guix build utils)) #:builder - (begin - (use-modules (guix build utils)) - (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) - (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) - (mkdir-p bin) - (for-each - (lambda (old new) - (symlink (string-append python old) - (string-append bin "/" new))) - `("python3" ,"pydoc3" ,"idle3" ,"pip3") - `("python" ,"pydoc" ,"idle" ,"pip")) - ;; python-config outputs search paths based upon its location, - ;; use a bash wrapper to avoid changing its outputs. - (let ((bash (string-append (assoc-ref %build-inputs "bash") - "/bin/bash")) - (old (string-append python "python3-config")) - (new (string-append bin "/python-config"))) - (with-output-to-file new - (lambda () - (format #t "#!~a~%" bash) - (format #t "exec \"~a\" \"$@\"~%" old) - (chmod new #o755) - #t))))))) + ,#~(begin + (use-modules (guix build utils)) + (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) + (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) + (mkdir-p bin) + (for-each + (lambda (old new) + (symlink (string-append python old) + (string-append bin "/" new))) + `("python3" ,"pydoc3" ,"idle3" ,"pip3") + `("python" ,"pydoc" ,"idle" ,"pip")) + ;; python-config outputs search paths based upon its location, + ;; use a bash wrapper to avoid changing its outputs. + (let ((bash (string-append (assoc-ref %build-inputs "bash") + "/bin/bash")) + (old (string-append python "python3-config")) + (new (string-append bin "/python-config"))) + (with-output-to-file new + (lambda () + (format #t "#!~a~%" bash) + (format #t "exec \"~a\" \"$@\"~%" old) + (chmod new #o755) + #t))))))) (synopsis "Wrapper for the Python 3 commands") (description "This package provides wrappers for the commands of Python@tie{}3.x such -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 03:43:40 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 07:43:40 +0000 Received: from localhost ([127.0.0.1]:58475 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luVdk-0003Qd-3w for submit@debbugs.gnu.org; Sat, 19 Jun 2021 03:43:40 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:55602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luVdg-0003QS-T8 for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 03:43:38 -0400 Received: from butterfly.local ([213.132.157.3]) by baptiste.telenet-ops.be with bizsmtp id Jvja2500204goZR01vjaR6; Sat, 19 Jun 2021 09:43:35 +0200 Message-ID: Subject: Re: [PATCH v3 core-updates 36/37] cross-base: Fix cross-compiler for i686-linux-gnu. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Sat, 19 Jun 2021 09:43:33 +0200 In-Reply-To: <20210618171631.20534-36-maximedevos@telenet.be> References: <20210618171631.20534-1-maximedevos@telenet.be> <20210618171631.20534-36-maximedevos@telenet.be> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-nlQGpwNngWvZvfhV7eyV" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624088615; bh=BEhyvsdetxfDdtYNG2Hy6xi12BxnDPovr2U4RQO+R0g=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=eR/I4pNwEZv4wA4qPf97vSFnbtjQAKnN72LN0vLqe4lPtuIx3e9WKKkvU+Vwxebfv h0Nfxi24BhoI8nTZVVq+Pu3kvWtsD3t9/YcCxIVvpD8awV/xupwm44OYKQYR77H9Kd jnkuHf1G0eLiMjaXdjUCIXIWJ7QhtVQIWUYrV4/Lk2heDsQj0YoyffbTwav2YkL/Ij /TistjjOlwd79i17P08DUhOc3sZhgVMKG0p/cXze2rWMJu68XYtX4dmhLvOG/9f0ee 3VdA7u8NcTOh4HGibHMiHxmydnMCl/+r7UQ9oi2aUDNkpG1Ic2FJIbyietBYZGR63U a6HtylMzwSniA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org 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.7 (-) --=-nlQGpwNngWvZvfhV7eyV Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Maxime Devos schreef op vr 18-06-2021 om 19:16 [+0200]: > GCC doesn't find libgcc_s.so anymore and looks in the wrong > location. Fix this (well, more a work-around really). > [...] There exists a separate issue for this bug (bug#48913, https://issues.guix.gnu.org) -- please send comments there! Greetings, Maxime. --=-nlQGpwNngWvZvfhV7eyV 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+4iGRcl7gUCYM2gJRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7g4GAQDoMdk37S/0wMVElb0RB3ZeX5S/ Bvd69tTyClUZ4zvbVAD/ch3ULzc6cz3pbxm5WldTbDGFjE4LFfh6HH3LoikHrgU= =afMF -----END PGP SIGNATURE----- --=-nlQGpwNngWvZvfhV7eyV-- From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:11 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:11 +0000 Received: from localhost ([127.0.0.1]:60282 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX0-0005Vc-8T for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:11 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucWy-0005VF-Ay for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:09 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB401357nj; Sat, 19 Jun 2021 17:05:07 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 01/36] utils: Define target-linux? predicate. Date: Sat, 19 Jun 2021 17:04:23 +0200 Message-Id: <20210619150458.12057-2-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115107; bh=KuxsCFQnj4ZbArXRFEqUpWBp+xjAPFA4gW0yO+6p0Uk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=TPRSHM1JZ6mBrHsAtr9VQq1jJhdBlopOej7++sF6IEANgWSdm7wwOGoBbTJPk3aCQ ByRCDOtkObmLKZqxsp5nA13RI0Q/nWgmIELgiHDgqlZagVYYVkMQGZJ1OxYc53UFUf gaLXwD92521AoW99Ytm65anNLgGvhHl3jXkc5VPFHq5YOhOCeeLG6/klJFQJRW6/Vc ZhnU9XnRd/MCmxcdTV8wV4CEF0RDLL6D2/s2FMs3cWpOy098rRNnJ46FyZHQDqEzJZ 9bbSlbpDt7TOSUkkhNm0PCvuIvzCV/Lmlc/+N3MXn2DWZfSgMy7thcuEPEQNnomRmP 3+f9WE3wsM9vw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) * guix/utils.scm (target-linux?): New predicate. * tests/utils.scm ("target-linux?"): Test it. ("target-mingw?"): Also test ‘target-mingw?’. --- guix/utils.scm | 6 ++++++ tests/utils.scm | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index 19990ceb8a..4ff2602e23 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2020 Maxim Cournoyer ;;; Copyright © 2021 Simon Tournier ;;; Copyright © 2021 Chris Marusich +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -81,6 +82,7 @@ %current-system %current-target-system package-name->name+version + target-linux? target-mingw? target-arm32? target-aarch64? @@ -543,6 +545,10 @@ a character other than '@'." (idx (values (substring spec 0 idx) (substring spec (1+ idx)))))) +(define* (target-linux? #:optional (target (or (%current-target-system) + (%current-system)))) + (string-contains target "linux")) + (define* (target-mingw? #:optional (target (%current-target-system))) (and target (string-suffix? "-mingw32" target))) diff --git a/tests/utils.scm b/tests/utils.scm index 7fcbb25552..80a0e669a4 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2016 Mathieu Lirzin ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -289,6 +290,22 @@ skip these tests." (string-closest "hello" '("kikoo" "helo" "hihihi" "halo")) (string-closest "hello" '("aaaaa" "12345" "hellohello" "h")))) +(test-equal "target-linux?" + '(#t #f #f #t) + (map (compose ->bool target-linux?) + '("i686-linux-gnu" "i686-w64-mingw32" + ;; Checking that "gnu" is present is not sufficient, + ;; as GNU/Hurd exists. + "i686-pc-gnu" + ;; Some targets have a suffix. + "arm-linux-gnueabihf"))) + +(test-equal "target-mingw?" + '(#f #f #t) + (map (compose ->bool target-mingw?) + '("i686-linux-gnu" "i686-pc-gnu" + "i686-w64-mingw32"))) + (test-end) (false-if-exception (delete-file temp-file)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:16 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:16 +0000 Received: from localhost ([127.0.0.1]:60302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX5-0005Wn-Hl for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:16 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucWy-0005VD-5a for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:09 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB401356nZ; Sat, 19 Jun 2021 17:05:06 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 00/36] Support cross-compilation with meson Date: Sat, 19 Jun 2021 17:04:22 +0200 Message-Id: <20210619150458.12057-1-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115106; bh=yOoFa0uAGahN0uKpX1LV+IKBYhAgR2lBcf1duQ2lRjs=; h=From:To:Cc:Subject:Date; b=qA8JJ0ONG3JdM87y8Od8KvB8Gp/3ilJjhPRdd7CDO/CSxpd661GGeK+U6rmLplDXy xyejmtWMkTHd+Lhfn6nzi0smtCRy1/CtYw3rz4vjTJ7SneLWjV+v6MBsxxNAtZH5Ac wdGuBXx05Uo3BOBfinK+5ZFYxzmdivVSX1mivB4ipyz433g/QVHnKg1ziahZt4I2lk TJGQXcSK2EoyxqQyMORt/8GETGRvRVueYF8Dl++6WkzPf3dFAYM4eoMToXMGnxDjDW ozNtgF0eBfVzvhSdUB3ta4lUrkEvD7rtbiXC546CS9V/Co7Hw57eiq2AB+gWlZD0Tc M3mGQES8+EvKA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) This is the same as v1 (v2 and v3 are the same as v1 but the sending was messed up), but with merge conflicts resolved. Also, one patch of v1 is already on core-updates, so it is dropped here. I'm currently testing whether things still work, and whether the patch for GCC still works and if it is still required. Here is the old description: This patch series adds cross-compilation support to meson-build-system. meson-build-system is used by many gtk applications (sometimes directly, sometimes because a dependency uses meson-build-system). Meson cross-compilation is implemented by the last patch. The one-before-last patch works-around the brokenness of GCC cross-compilers on current core-updates (see ;). The first two patches define a few utilities target-linux?, target-x86-32? and target-x86-64? which are used by the last patch, but could be useful elsewhere as well. The third patch is used in various cross-compilation fixes. The other 33 patches are cross-compilation fixes for dependencies of glib, and follow-up patches making the package definitions somewhat nicer IMHO (like removing trailing #t from phases, and computing derivation for some architecture-independent packages when cross-compiling and compiling natively). Maxime Devos (36): utils: Define target-linux? predicate. utils: Define a target-x86-32? and target-x86-64? predicate. packages: Define this-package-input and this-package-native-input. net-base: Make #:builder argument a G-expression. net-base: Fix cross-compilation, eliminating %build-inputs & friends net-base: Don't cross-compile. tzdata: Don't bother with cross-compiling. libgpg-error: Remove trailing #f from phases. libgpg-error: Prevent silent miscompilation some systems. libgpgerror: Maybe fix a cross-compilation bug. libgpg-error: Fix cross-compilation error. libgcrypt: Fix cross-compilation build error. wrap-python3: Make #:builder a G-exp instead of a raw S-exp. wrap-python3: Fix cross-compilation. python: Fix reference to input when cross-compiling. openssl: Remove trailing #t from phases. openssl: Make the #:phases argument a G-expression. openssl: Use G-exp machinery for referring to outputs. openssl: Move documentation instead of copying and deleting it. openssl: Move all man pages to separate output, not only man3. openssl: Find bin/env when cross-compiling. openssl: Extract logic for computing CONFIGURE_TARGET_ARCH. readline: Make #:configure-flags a G-expression. readline: Fix build error when cross-compiling. bash: Make #:configure-flags a G-expression. bash: Fix cross-compilation build error. fontconfig: Make the #:configure-flags argument a G-expression. fontconfig: Fix build error when cross-compiling. glib: Use a correct python in scripts when cross-compiling. glib: Verify the cross-compiled python is used in installed scripts. glib: Look up "tzdata" in 'native-inputs', not 'inputs'. tk: Make #:configure-flags a G-expression. tk: Do not use %build-inputs when cross-compiling. libelf: Use the cross-compiler when cross-compiling. cross-base: Fix cross-compiler for i686-linux-gnu. meson: Support cross-compilation. Makefile.am | 1 + gnu/packages/admin.scm | 44 ++++--- gnu/packages/base.scm | 9 ++ gnu/packages/bash.scm | 39 +++--- gnu/packages/cross-base.scm | 63 ++++++++- gnu/packages/elf.scm | 48 ++++--- gnu/packages/fontutils.scm | 8 +- gnu/packages/glib.scm | 34 ++++- gnu/packages/gnupg.scm | 60 ++++++--- gnu/packages/python.scm | 51 ++++---- gnu/packages/readline.scm | 27 ++-- gnu/packages/tcl.scm | 14 +- gnu/packages/tls.scm | 142 +++++++++++---------- guix/build-system/meson.scm | 197 ++++++++++++++++++++++++++--- guix/build/meson-configuration.scm | 71 +++++++++++ guix/packages.scm | 29 +++++ guix/utils.scm | 26 ++++ tests/packages.scm | 34 +++++ tests/utils.scm | 40 ++++++ 19 files changed, 724 insertions(+), 213 deletions(-) create mode 100644 guix/build/meson-configuration.scm base-commit: bcdc13454c4afab37b650d4bbfa95e539060619f -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:17 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:18 +0000 Received: from localhost ([127.0.0.1]:60310 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX6-0005Ww-2t for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:17 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucWy-0005VG-Sp for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:09 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB401358nw; Sat, 19 Jun 2021 17:05:08 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 02/36] utils: Define a target-x86-32? and target-x86-64? predicate. Date: Sat, 19 Jun 2021 17:04:24 +0200 Message-Id: <20210619150458.12057-3-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115108; bh=lf5YV93HuGoFIHD1h6x01QuYB2H0sCsCvf+MhMqf3Ic=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rPcH0BNkhhX8ULDsiBMt1lC+MpODjRcM1VziATt6gL8iBV0vJ/Pk6Fb1VS54kVJ9L QUn5gmxWiLeaKV9DogEtxvB7BOfComEyCSuZ18A2VzaCIKPO7iYqavJNlCDuBZ5+7K +SaEGFPgp/4g6zuuLM82oycL6JguJUpUIbAuQu95g0tc5yAD1gjb0/i9SmY0kB9VaH DZcqt9zLA30XCp3iTvuOB+CeQlF/mrI6nwmEOYcyZNfd67GEFjA0NEVek8mfVMmVq5 +zQ2K8TdPup3BtVx92OgQ59ZvHPQjXalRZyT2Q+kcTxo/NX4O6xe991VAHE9brJHnJ QSJv7OiguqXqQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) * guix/utils.scm (target-x86-32?, target-x86-64?): New predicates. * tests/utils.scm ("target-x86-32?", "target-x86-64?"): New tests. --- guix/utils.scm | 20 ++++++++++++++++++++ tests/utils.scm | 23 +++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index 4ff2602e23..2256ea2ca6 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -84,6 +84,8 @@ package-name->name+version target-linux? target-mingw? + target-x86-32? + target-x86-64? target-arm32? target-aarch64? target-arm? @@ -553,6 +555,24 @@ a character other than '@'." (and target (string-suffix? "-mingw32" target))) +(define* (target-x86-32? #:optional (target (or (%current-target-system) + (%current-system)))) + "Is the architecture of TARGET a variant of Intel's 32-bit architecture +(IA32)?" + ;; Intel also has a 16-bit architecture in the iN86 series, i286 + ;; (see, e.g. https://en.wikipedia.org/wiki/Intel/808286) so this + ;; procedure is not named target-x86?. + (or (string-prefix? "i386-" target) + (string-prefix? "i486-" target) + (string-prefix? "i586-" target) + (string-prefix? "i686-" target))) + +(define* (target-x86-64? #:optional (target (or (%current-target-system) + (%current-system)))) + "Is the architecture of TARGET a variant of Intel/AMD's 64-bit +architecture (x86_64)?" + (string-prefix? "x86_64-" target)) + (define* (target-arm32? #:optional (target (or (%current-target-system) (%current-system)))) (string-prefix? "arm" target)) diff --git a/tests/utils.scm b/tests/utils.scm index 80a0e669a4..92439b5587 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -306,6 +306,29 @@ skip these tests." '("i686-linux-gnu" "i686-pc-gnu" "i686-w64-mingw32"))) +(test-equal "target-x86-32?" + '(#f #f #f #t #t #t #t #f) + ;; These are (according to Wikipedia) two RISC architectures + ;; by Intel and presumably not compatible with the x86-32 series. + (map target-x86-32? + '("i860-gnu" "i960-gnu" + ;; This is a 16-bit architecture + "i286-gnu" + ;; These are part of the x86-32 series. + "i386-gnu" "i486-gnu" "i586-gnu" "i686-gnu" + ;; Maybe this one will exist some day, but not yet. + "i786-gnu"))) + +(test-equal "target-x86-64?" + '(#t #f #f #f) + (map target-x86-64? + `("x86_64-linux-gnu" "i386-linux-gnu" + ;; Just because it includes "64" doesn't make it 64-bit. + "aarch64-linux-gnu" + ;; Note that (expt 2 109) in decimal notation starts with 64. + ;; However, it isn't 32-bit. + ,(format #f "x86_~a-linux-gnu" (expt 2 109))))) + (test-end) (false-if-exception (delete-file temp-file)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:20 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:21 +0000 Received: from localhost ([127.0.0.1]:60336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX7-0005Xb-MN for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:20 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucWz-0005VK-Ec for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:10 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB401358o5; Sat, 19 Jun 2021 17:05:08 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 03/36] packages: Define this-package-input and this-package-native-input. Date: Sat, 19 Jun 2021 17:04:25 +0200 Message-Id: <20210619150458.12057-4-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115108; bh=ktlZPKOFCiKBCSKOml0XVUAO70kiPtFkDzCU75II8EQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rV9Gk406TswbgmJMdujKRQJwUKSXETPvEQR+ZmHlTG7YiOEGb7uug2Nw+DV6WLJTY 6uKz4fE5uld4ZmtS+6Kc3ohw0XYPr5/7XudeHRnzSHf0mLincDpPAX5Hoz/dgH7jGQ fITtsf69IYXrNxXUBzmOI7lIgCYoum7G6gfkES3tys8ih+NUA2sbJYYpnpN7Iu/coq oOQdx+lNHFIuTYEgyf92aNI4tYHy+BzPVFM6COdK1Voz0A2M5gyfGtFrKXRq43Veye hTVAqd7cdWgHDtzmdcfSbcKHHa3frm5QaSZYkJT3t0b1g++48VLYzKvZFISpgYOqXq 8vSZBrmaideYA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) These macros are intended to be used in build phases. More precisely, (assoc-ref %build-inputs "input") can be replaced by #$(this-package-input "input") or #+(this-package-native-input "native-input") as appropriate. * guix/packages.scm (package-input, package-native-input): New (unexported) procedures. (this-package-input, this-package-native-input): New macros. --- guix/packages.scm | 29 +++++++++++++++++++++++++++++ tests/packages.scm | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/guix/packages.scm b/guix/packages.scm index a66dbea1b7..80c8bbebf0 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -108,6 +108,9 @@ deprecated-package package-field-location + this-package-input + this-package-native-input + package-direct-sources package-transitive-sources package-direct-inputs @@ -513,6 +516,32 @@ object." #f))) (_ #f))) +(define (package-input package name) + "Return the package input NAME of PACKAGE--i.e., an input +from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not +considered. If this input does not exist, return #f instead." + (and=> (or (assoc-ref (package-inputs package) name) + (assoc-ref (package-propagated-inputs package) name)) + car)) + +(define (package-native-input package name) + "Return the native package input NAME of PACKAGE--i.e., an input +from the ‘native-inputs’ field. If this native input does not exist, +return #f instead." + (and=> (assoc-ref (package-native-inputs package) name) + car)) + +(define-syntax-rule (this-package-input name) + "Return the input NAME of the package being defined--i.e., an input +from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not +considered. If this input does not exist, return #f instead." + (package-input this-package name)) + +(define-syntax-rule (this-package-native-input name) + "Return the native package input NAME of the package being defined--i.e., +an input from the ‘native-inputs’ field. If this native input does not +exist, return #f instead." + (package-native-input this-package name)) ;; Error conditions. diff --git a/tests/packages.scm b/tests/packages.scm index 47d10af5bc..91ec38e4cc 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -1851,6 +1852,39 @@ (package-location (specification->package "guile@2")) (specification->location "guile@2")) +(test-eq "this-package-input, exists" + hello + (package-arguments + (dummy-package "a" + (inputs `(("hello" ,hello))) + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-input, exists in propagated-inputs" + hello + (package-arguments + (dummy-package "a" + (propagated-inputs `(("hello" ,hello))) + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-input, does not exist" + #f + (package-arguments + (dummy-package "a" + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-native-input, exists" + hello + (package-arguments + (dummy-package "a" + (native-inputs `(("hello" ,hello))) + (arguments (this-package-native-input "hello"))))) + +(test-eq "this-package-native-input, does not exists" + #f + (package-arguments + (dummy-package "a" + (arguments (this-package-native-input "hello"))))) + (test-end "packages") ;;; Local Variables: -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:21 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:22 +0000 Received: from localhost ([127.0.0.1]:60352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXA-0005Ym-Pb for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:21 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucWz-0005VD-Ue for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:10 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB401359oJ; Sat, 19 Jun 2021 17:05:09 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 05/36] net-base: Fix cross-compilation, eliminating %build-inputs & friends Date: Sat, 19 Jun 2021 17:04:27 +0200 Message-Id: <20210619150458.12057-6-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115109; bh=sJA6kjHnhnC1ncPAJ/dX1Nxw7NaJGy/XrvJfXqMOoLI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Wx4Q2n85phhEi7R1QCnABPhX9s1pMG8mLYttrJ7Sm/vIzPVDBSXC3YCz4QcECIlKP 81kFa0gyjnMxSY9wzOO/FgCDulG9jrux90aRYseATJuYyUBYwwJsymBJfHkhchY/lH H72cIIprlj7VhQzFkY639QduTgDYeiTafHBwovxfuGsa4yV3by5g0zB7ubEfToD9R3 XxZT9pvsmw3TEC782YLEY/jIcdC8ANlhxwLbqbYInfh2ow2r5Gph5VL8JFp3cKzj4y et8kgCBW02EIsDO8lu8NLSyhJnOFopIN9BE3wzhIUK5wvIAJR/JTIQu2V9blngbCbz 2OvNzalCPYtww== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) "source" is not in %build-inputs when cross-compiling, so another approach for referring to the package source code is needed. * gnu/packages/admin.scm (net-base)[arguments]<#:builder>: Eliminate %build-inputs and %outputs. --- gnu/packages/admin.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 230ba98b41..e54be5a672 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -941,10 +941,10 @@ to allow automatic login and starting any app.") (use-modules (guix build utils) (srfi srfi-26)) - (let* ((source (assoc-ref %build-inputs "source")) - (tar (assoc-ref %build-inputs "tar")) - (xz (assoc-ref %build-inputs "xz")) - (output (assoc-ref %outputs "out")) + (let* ((source #+(package-source this-package)) + (tar #+(this-package-native-input "tar")) + (xz #+(this-package-native-input "xz")) + (output #$output) (etc (string-append output "/etc"))) (setenv "PATH" (string-append xz "/bin")) (invoke (string-append tar "/bin/tar") "xvf" -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:22 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:22 +0000 Received: from localhost ([127.0.0.1]:60354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXB-0005Z4-RI for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:22 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucWz-0005VF-He for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:10 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB401359oB; Sat, 19 Jun 2021 17:05:09 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 04/36] net-base: Make #:builder argument a G-expression. Date: Sat, 19 Jun 2021 17:04:26 +0200 Message-Id: <20210619150458.12057-5-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115109; bh=ctZm9OVHom3MpxyL0gcsO+Tj7VTiM45ESGzTs/AaDrY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=dqsj6kJ15LuThYohvGrPTjunFNYTew6lLkk/Peq89vThC+n/vfcGrHlg5zkoEiF7k 3abFM69UUfLeBLIuxqo2MS3tcpcQ8znLeKFtM5n5VB0Bk/DXHTX69C9F8/fsEoxKQO CiphZBEzdluZx25+KJiglaxBd987grUscr/rbaeKISOVtzgrvyioEj9i9Ex8OVnYCi LL8LqTdlp/9Eb8heJbgZvvmQxkRhA2O59LdYCOvFP8pa7XkflEp/TVxdUdsvh/5Uju Kq23r+B4r+SQDmzRgzJp3Ea4cdBVOTx2z/0E9bVhkbiO7quqgvYe9OJLqDbckeCKQe gXY6YSaRhiJTw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) This allows using ungexp-native and this-package-native-input later. * gnu/packages/admin.scm (net-base)[arguments]{#:builder}: Make this a G-expression. --- gnu/packages/admin.scm | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 48b9c8b893..230ba98b41 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -74,6 +74,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (gnu packages) #:use-module (gnu packages algebra) #:use-module (gnu packages autogen) @@ -936,25 +937,25 @@ to allow automatic login and starting any app.") (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) - #:builder (begin - (use-modules (guix build utils) - (srfi srfi-26)) - - (let* ((source (assoc-ref %build-inputs "source")) - (tar (assoc-ref %build-inputs "tar")) - (xz (assoc-ref %build-inputs "xz")) - (output (assoc-ref %outputs "out")) - (etc (string-append output "/etc"))) - (setenv "PATH" (string-append xz "/bin")) - (invoke (string-append tar "/bin/tar") "xvf" - source) - (chdir ,(string-append "netbase-" version)) - (mkdir-p etc) - (for-each copy-file - '("etc-services" "etc-protocols" "etc-rpc") - (map (cut string-append etc "/" <>) - '("services" "protocols" "rpc"))) - #t)))) + #:builder ,#~(begin + (use-modules (guix build utils) + (srfi srfi-26)) + + (let* ((source (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar")) + (xz (assoc-ref %build-inputs "xz")) + (output (assoc-ref %outputs "out")) + (etc (string-append output "/etc"))) + (setenv "PATH" (string-append xz "/bin")) + (invoke (string-append tar "/bin/tar") "xvf" + source) + (chdir #$(string-append "netbase-" version)) + (mkdir-p etc) + (for-each copy-file + '("etc-services" "etc-protocols" "etc-rpc") + (map (cut string-append etc "/" <>) + '("services" "protocols" "rpc"))) + #t)))) (native-inputs `(("tar" ,tar) ("xz" ,xz))) (synopsis "IANA protocol, port, and RPC number assignments") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:22 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:22 +0000 Received: from localhost ([127.0.0.1]:60356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXC-0005ZC-83 for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:22 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX0-0005VG-FM for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:11 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135AoW; Sat, 19 Jun 2021 17:05:10 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 06/36] net-base: Don't cross-compile. Date: Sat, 19 Jun 2021 17:04:28 +0200 Message-Id: <20210619150458.12057-7-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115110; bh=mP/lIiqCHaKooyJufEiV8wiC6CAQNVl/Sx99B1mEkhk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=GSHOLpRc7aF2lIX7lcwYwnnTNdMNlBqQomEPoNut/JW8NN02CmWpETgk3zNearm5j nfhWCIQxAy6BSbTRez0957cGei/E8ygK+rkyd6HRiTD5NKDf63ER8hE5PElR5DfF2O 4fW27omfIPvzzPy5LPZon3zUA0cjK8voYeVp5qczcFkgeur1qO4dnZzGGPX3Htz/h6 GWBvlyz1DtIcN44bJJs6Y3D05BNiz/ATjiBqsg5mEaTvyNWzQwY2hHST6XcVuFfRDy +u5m9bHsF1uI4MzbppwENhkM6WJexrMA4gPaxVIIGlCXrZp4t3EWxXqZ1cdni8Mt7M IWF10VPrSyIdw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) net-base is pure data, so cross-compiling is pointless. * gnu/packages/admin.scm (net-base)[arguments]<#:target>: Set to #f. (net-base)[arguments]<#:allowed-references>: Disallow all references. --- gnu/packages/admin.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index e54be5a672..f8afc3d374 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -937,6 +937,11 @@ to allow automatic login and starting any app.") (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) + ;; This package consists solely of architecture-independent + ;; tables. Cross-compilation is pointless! Make sure we'll + ;; always get the same derivation. + #:target #f + #:allowed-references () #:builder ,#~(begin (use-modules (guix build utils) (srfi srfi-26)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:22 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:23 +0000 Received: from localhost ([127.0.0.1]:60358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXC-0005ZJ-Hf for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:22 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX0-0005VD-W9 for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:11 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Aod; Sat, 19 Jun 2021 17:05:10 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 07/36] tzdata: Don't bother with cross-compiling. Date: Sat, 19 Jun 2021 17:04:29 +0200 Message-Id: <20210619150458.12057-8-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115110; bh=njv2jZR1vpk0wCCZRTmIX/86vA9G6pfaRGoIB44zAdM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=K79HqeJ8yb/yrIk5mSGWEvEJYPwJNzmMBOcGhMUw4Ev4FPJDaSe2Ws/EXruqOEY5Z PxXVvKQCkmvD7mAcni26Fg8vnC+OSdo9PlFwfUP2LzCLv9NqS6d7IeUTvU0WPfZnfG Km8min2X51726I8x21FrJNWAVKSUBUgedWZ++oen/chyVzkgsz714DNxfL9yh20v6a b0uoDwVbhJ7cXFSfbsj/blSTbl8U4gn4gdxlnaV28iYF2jAoXN3p1nhZV0VpczC918 dZ3mfc3prBbEaOXLBTeXkdnhCZgWB2pczD4lkgQCA7P8wied0rf74874qjCOEOIdGk qQ1DRfs/5KqFg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) The time zone database is architecture-independent, so trying to cross-compile it is pointless! * gnu/packages/base.scm (tzdata)[arguments]<#:target>: Set to #f. (tzdata)[allowed-references]: Only include the "out" output itself, to make sure no (architecture-dependent) binaries are installed. --- gnu/packages/base.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index edc4c4a427..62d6822750 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2020 Vitaliy Shatrov ;;; Copyright © 2020 Chris Marusich ;;; Copyright © 2021 Leo Le Bouter +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -1255,6 +1256,14 @@ command.") (build-system gnu-build-system) (arguments `(#:tests? #f + ;; This consists purely of (architecture-independent) data, + ;; so ‘cross-compilation’ is pointless here! + ;; (The binaries zic, dump, and tzselect are deleted in the post-install + ;; phase.) + #:target #f + ;; share/zoneinfo/posix is a symlink to share/zoneinfo, + ;; so include the package itself in #:allowed-references. + #:allowed-references ("out") #:make-flags (let ((out (assoc-ref %outputs "out")) (tmp (getenv "TMPDIR"))) (list (string-append "TOPDIR=" out) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:23 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:23 +0000 Received: from localhost ([127.0.0.1]:60360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXC-0005ZQ-Sv for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:23 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX1-0005VK-Fn for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:12 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Boh; Sat, 19 Jun 2021 17:05:11 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 08/36] libgpg-error: Remove trailing #f from phases. Date: Sat, 19 Jun 2021 17:04:30 +0200 Message-Id: <20210619150458.12057-9-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115111; bh=UkBFl7DBKUemJe3cRqGofUDVrc8TErEYB0dd5362VyE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=J7xoAVH2t4OoUj9Sw4pr5y5m0IMvwDBuQ7ZcYC9iaj45GWApOedJ0PpP0mDqrmhhd +ZLAhQg5TeDtobGPITl2pX3xRX3uvD+Due/g/RP33uXaLkD3Atu+FUFlt0sH18RsVK 3POL3/pjWpgh23ImEzmOVYv1VS36y5PE1A9MpURr4Q456iWxBX/NOdi7fyRCRRZxg4 yvFQI8NuB4KRHkcg8/w3c5vPLlGqcLLZlGikz9yP3AtxoKuuiX/B/ZmGE9noZ9nTpq 4rrBcPWVAkSgBoyxw951pu447SQsI5iwX3drVKwHDs+8yTXfAYyzqy9Ps/M2VTfxfE 2gt4HfEGRclxw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) These aren't required anymore. * gnu/packages/gnupg.scm (libgpgerror)[arguments]{cross-symlinks}: Remove trailing #f. --- gnu/packages/gnupg.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index cb481b38e1..2f44e6ec6a 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -114,8 +114,7 @@ (string-append x "-unknown-linux-gnu"))))) (symlink (string-append "lock-obj-pub." triplet ".h") - "src/syscfg/lock-obj-pub.linux-gnu.h")) - #t)))) + "src/syscfg/lock-obj-pub.linux-gnu.h")))))) '())) (native-inputs `(("gettext" ,gettext-minimal))) (home-page "https://gnupg.org") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:23 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:23 +0000 Received: from localhost ([127.0.0.1]:60362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXD-0005Za-5z for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:23 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX2-0005VG-D8 for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:12 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Cov; Sat, 19 Jun 2021 17:05:12 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 10/36] libgpgerror: Maybe fix a cross-compilation bug. Date: Sat, 19 Jun 2021 17:04:32 +0200 Message-Id: <20210619150458.12057-11-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115112; bh=IPFgvneN7bHDKrYexwhQDz6Y7ERatBQe8mtSRZ9vaMo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=AokURjxE3RPDa5/rn2BL2I0yhXQpjJn8AvCcReoSGa1KmABE1khZDjH2AGofZuDHl sIhAxqAGlle1e8pzmK4Hbk6ZSaYsaMd69VhK0OBfVbTWxXbfsHSS88Q6UkQhw9mc0r AaAhkNAySFf+413gOtuvwy8Y0Fo3H30vYXNF4cfHSVKOqw+FyL+P0/FKU5MXV+U5Zw xLSswZk9knC3HzwZJCGgXnJxwdHnw56OE9B79+U++hajO2VwQ0k2K5EPYN7FzKHQRt PDEg/w35EOhC+scZtISP5RDiCQzpknkLk2XUF8OQ2QfHswVfZlD2XnyVBbvG8rP3Wc EMdGjZQsDzJZQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) Previously, a symlink was created at src/syscfg/lock-obj-pub.linux-gnu.h pointing at lock-obj-pub.MANGLED-TARGET.h. I would think this has to be the other way around, but I am not really sure. * gnu/packages/gnupg.scm (gnupg)[arguments]<#:phases>{cross-symlinks}(link): Switch 'triplet' and 'source'. --- gnu/packages/gnupg.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index de213d381f..f5d4118af9 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -110,9 +110,9 @@ (add-after 'unpack 'cross-symlinks (lambda _ (define (link triplet source) - (symlink (string-append "lock-obj-pub." triplet ".h") + (symlink (string-append "lock-obj-pub." source ".h") (string-append "src/syscfg/lock-obj-pub." - source ".h"))) + triplet ".h"))) ,(let* ((target (%current-target-system)) (architecture (string-take target (string-index target #\-)))) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:23 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:24 +0000 Received: from localhost ([127.0.0.1]:60364 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXD-0005Zk-Gd for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:23 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX1-0005VF-Uf for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:12 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Bom; Sat, 19 Jun 2021 17:05:11 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 09/36] libgpg-error: Prevent silent miscompilation some systems. Date: Sat, 19 Jun 2021 17:04:31 +0200 Message-Id: <20210619150458.12057-10-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115111; bh=nKM9iRbL4pxeve/Z9zTlm79RMuw3U+bWD4uPyj+c1VU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=tpLQrTzLbWVNpxz3331dkgC0AFINZ67k5wzBMl266HSTjziNLerSg7bRf7tLAmm63 V5o68GWmORkJR+3Y+lMLupBusehrUv2D7Hka2TVtuZEphlVgemht70Z3oN5WJdDAk+ +J8XRRMscy4nTc5PaGT9FtM8S6mewNincALOQpe+8thxFE1GPf3jyiiQgLWyuHUM7x /57ZUuqNwlAnrahzxTiPyWow9IV8mPmI6zBpiVPUiyKpLBM61dWz2TjqjCZ77MjH30 aXzsk26Fw7e0pBEwFR84PPT6zTV2Y2MGuGihptYysKLgs8QxfgvuJkaweayMZ3aSCU uAeAyWceQrYWg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) * gnu/packages/gpg.scm (libgpgerror)[arguments]<#:phases>{cross-symlinks}: Only link to src/syscfg/lock-obj-pub.linux-gnu.h if the package is being compiled for a Linux target. Do not link either if the architecture is unknown, as the headers vary with the architecture. --- gnu/packages/gnupg.scm | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 2f44e6ec6a..de213d381f 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2018 Björn Höfling ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Fredrik Salomonsson +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -77,6 +78,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system perl) #:use-module (guix build-system python) + #:use-module (ice-9 match) #:use-module (srfi srfi-1)) (define-public libgpg-error @@ -94,27 +96,37 @@ (build-system gnu-build-system) (arguments (if (%current-target-system) - `(#:modules ((ice-9 match) - (guix build gnu-build-system) + `(#:modules ((guix build gnu-build-system) (guix build utils)) #:phases (modify-phases %standard-phases ;; When cross-compiling, some platform specific properties cannot ;; be detected. Create a symlink to the appropriate platform - ;; file. See Cross-Compiling section at: + ;; file if required. Note that these platform files depend on + ;; both the operating system and architecture! + ;; + ;; See Cross-Compiling section at: ;; https://github.com/gpg/libgpg-error/blob/master/README (add-after 'unpack 'cross-symlinks - (lambda* (#:key target inputs #:allow-other-keys) - (let ((triplet - (match (string-take target - (string-index target #\-)) - ("armhf" "arm-unknown-linux-gnueabi") - ("mips64el" "mips-unknown-linux-gnu") - (x - (string-append x "-unknown-linux-gnu"))))) - (symlink - (string-append "lock-obj-pub." triplet ".h") - "src/syscfg/lock-obj-pub.linux-gnu.h")))))) + (lambda _ + (define (link triplet source) + (symlink (string-append "lock-obj-pub." triplet ".h") + (string-append "src/syscfg/lock-obj-pub." + source ".h"))) + ,(let* ((target (%current-target-system)) + (architecture + (string-take target (string-index target #\-)))) + (cond ((target-linux? target) + (match architecture + ("armhf" + `(link "arm-unknown-linux-gnueabi" "linux-gnu")) + ("mips64el" + `(link "mips-unknown-linux-gnu" "linux-gnu")) + ;; Don't always link to the "linux-gnu" + ;; configuration, as this is not correct for + ;; all architectures. + (_ #t))) + (#t #t))))))) '())) (native-inputs `(("gettext" ,gettext-minimal))) (home-page "https://gnupg.org") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:24 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:24 +0000 Received: from localhost ([127.0.0.1]:60366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXD-0005Zr-UM for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:24 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX2-0005VD-T4 for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:13 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Cp3; Sat, 19 Jun 2021 17:05:12 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 11/36] libgpg-error: Fix cross-compilation error. Date: Sat, 19 Jun 2021 17:04:33 +0200 Message-Id: <20210619150458.12057-12-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115112; bh=po7rDv7BdIVE5g9HkdjKKb8vIZeOm4IuDrvIrTcXbG8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=l+SCvGom0qQahyyt01tnKY7RqcV1kCM4inwWjLr6q+2pnfnxqujbCkvX2PmTrb1Q7 Wo3BeiBqE5TO4b2MqdcuI68csYZ9eFx4Ml5jkBJyMgiTj2t+BO8Lef0OAM6I0OUNe9 pUpv917xYfNV8R1/MMMwUmpr0dQKoe7p0r3s9TBH7xvblcXgWzeL1hfeJNICrSb2CD OXJpPC9liCDAi6eBq9x4k8n1rk+aIwcxBSyl+v6ltTzrlLHBZ7IsxWtBhlM5Ymk519 mZGh5U+jhCPanxUu/7XsL6p9cITMx/BcyP6d6HwAnJUlOuRnb78sXGtyhNkNGWr/Kv uECsJ0BnLLrDw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) TODO: inform upstream about the cross-compilation error. * gnu/packages/gnupg.scm (libgpg-error)[arguments]{fix-gen-lock-obj.sh}: Prevent generated header files from being sprinkled with ‘\c’. --- gnu/packages/gnupg.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index f5d4118af9..1fee30584c 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -100,6 +100,13 @@ (guix build utils)) #:phases (modify-phases %standard-phases + ;; If this is left out, some generated header + ;; files will be sprinkled with ‘\c’, which + ;; the compiler won't like. + (add-after 'unpack 'fix-gen-lock-obj.sh + (lambda _ + (substitute* "src/gen-lock-obj.sh" + (("if test -n `echo -n`") "if ! test -n `echo -n`")))) ;; When cross-compiling, some platform specific properties cannot ;; be detected. Create a symlink to the appropriate platform ;; file if required. Note that these platform files depend on -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:24 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:25 +0000 Received: from localhost ([127.0.0.1]:60368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXE-0005Zz-9T for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:24 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX3-0005VK-Cn for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:13 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135DpA; Sat, 19 Jun 2021 17:05:13 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 12/36] libgcrypt: Fix cross-compilation build error. Date: Sat, 19 Jun 2021 17:04:34 +0200 Message-Id: <20210619150458.12057-13-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115113; bh=iyB61VxSz7o0o0YVn5/Hy/tABDE+f8iFAuqZZNSIiJo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=XqbG/HEtUGHjxmQ0QvLP4B4JxprTr+3WU/cz6JpC1gJRnzdtQLi5DO/yL/CGCtq0I o2pvVPDjIOuRBb+GjUICIJIwEIxlVObgK6oZrv95ZfQsylH2etZ+6C0P+FAoZyvaea pb/2npNRuFPDuZFbLBMaPw0tmc3y6ENseNSdJmPA+M4WupGa246r/7Wxn3cwYZ0kbr F5cutwjlYfcsiQy9lMclB0hXcTfhgcU3rgCN+WSgiYKFZvEJPXbIEHaHbm7wlQNydT NI8QqhEl1WYdjmyw5HqYV63mQEOWfarwmBls/wk477U2Ba8O+vY60mbTYvSzwcP57Y HWSfGNOaU/VrQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) When cross-compiling a package using gnu-build-system, %build-inputs does not exist. But libgcrypt uses %build-inputs anyway. Fix it. * gnu/packages/gnupg.scm (libgcrypt)[arguments]<#:configure-flags>: Make this a G-exp instead of a raw S-exp. Eliminate %build-inputs and use this-package-input instead. --- gnu/packages/gnupg.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 1fee30584c..35cfdf6f43 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -74,6 +74,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) @@ -169,11 +170,12 @@ Daemon and possibly more in the future.") ;; 'configure' uses 'gpg-error-config' to determine the '-L' flag, and ;; the 'gpg-error-config' it runs is the native one---i.e., the wrong one. `(#:configure-flags - (list (string-append "--with-gpg-error-prefix=" - (assoc-ref %build-inputs "libgpg-error-host")) - ;; When cross-compiling, _gcry_mpih_lshift etc are undefined - ,@(if (%current-target-system) '("--disable-asm") - '())))) + ,#~(list (string-append "--with-gpg-error-prefix=" + #$(this-package-input "libgpg-error-host")) + ;; When cross-compiling, _gcry_mpih_lshift etc are undefined + #$@(if (%current-target-system) + #~("--disable-asm") + #~())))) (outputs '("out" "debug")) (home-page "https://gnupg.org/") (synopsis "Cryptographic function library") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:25 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:25 +0000 Received: from localhost ([127.0.0.1]:60370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXE-0005a6-Pj for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:25 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX3-0005VF-Py for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:14 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135DpL; Sat, 19 Jun 2021 17:05:13 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 13/36] wrap-python3: Make #:builder a G-exp instead of a raw S-exp. Date: Sat, 19 Jun 2021 17:04:35 +0200 Message-Id: <20210619150458.12057-14-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115113; bh=baX07FzdaFst7CwU1puNWTYenQjGwgUH3elU6tLjlKM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=b23xAspIwItyiYTKDW8mTglSBaYAmPVHyQ3UfDPm4Gqg7wMn4d3JcgmkY6AQUX18q UIcAXMtXTuJJ4qsQkrKJeRb3BisGYi72ME1pc9GdgOyYjGvNWI0Gqv8huFKFO+Z0YB HAPz2t6/F8A4R8/rzuXtNMV5+lCgAAlbQKcqPRPeswKvnezmEK/oUqf01Otb7eqhH6 Ijyi/19p7/bXI2Mq++Yk102KZvnQAFm/HGNu3Bg0z2OZXwxe4Wwy2jlR6OMb1/4w9Y TkSsdOnKZPkBUMm5BxeoHrKTwMHLaUiafoHoJbMbD+IxS9Li3dFwQka38in8GZ6AiA zRPROeCUs0RCA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) This allows using ungexp later. * gnu/packages/python.scm (wrap-python3)<#:builder>: Make this a G-expression. --- gnu/packages/python.scm | 46 ++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 227c612a68..fe8b93b1ba 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -636,29 +636,29 @@ for more information."))) (arguments `(#:modules ((guix build utils)) #:builder - (begin - (use-modules (guix build utils)) - (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) - (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) - (mkdir-p bin) - (for-each - (lambda (old new) - (symlink (string-append python old) - (string-append bin "/" new))) - `("python3" ,"pydoc3" ,"pip3") - `("python" ,"pydoc" ,"pip")) - ;; python-config outputs search paths based upon its location, - ;; use a bash wrapper to avoid changing its outputs. - (let ((bash (string-append (assoc-ref %build-inputs "bash") - "/bin/bash")) - (old (string-append python "python3-config")) - (new (string-append bin "/python-config"))) - (with-output-to-file new - (lambda () - (format #t "#!~a~%" bash) - (format #t "exec \"~a\" \"$@\"~%" old) - (chmod new #o755) - #t))))))) + ,#~(begin + (use-modules (guix build utils)) + (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) + (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) + (mkdir-p bin) + (for-each + (lambda (old new) + (symlink (string-append python old) + (string-append bin "/" new))) + `("python3" ,"pydoc3" ,"idle3" ,"pip3") + `("python" ,"pydoc" ,"idle" ,"pip")) + ;; python-config outputs search paths based upon its location, + ;; use a bash wrapper to avoid changing its outputs. + (let ((bash (string-append (assoc-ref %build-inputs "bash") + "/bin/bash")) + (old (string-append python "python3-config")) + (new (string-append bin "/python-config"))) + (with-output-to-file new + (lambda () + (format #t "#!~a~%" bash) + (format #t "exec \"~a\" \"$@\"~%" old) + (chmod new #o755) + #t))))))) (synopsis "Wrapper for the Python 3 commands") (description "This package provides wrappers for the commands of Python@tie{}3.x such -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:25 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:26 +0000 Received: from localhost ([127.0.0.1]:60372 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXF-0005aI-Cl for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:25 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX5-0005VG-Ch for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:15 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Fpr; Sat, 19 Jun 2021 17:05:15 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 14/36] wrap-python3: Fix cross-compilation. Date: Sat, 19 Jun 2021 17:04:36 +0200 Message-Id: <20210619150458.12057-15-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115115; bh=ZMsN/6s+7XOcEFFTYApZei2dN0Kil09FxGyx/JO3NH0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bhq7lm9lCoB2JVEKIxulMUquAaQKTv4CEOUu+1efUnj00H2udkdCPgLpETzqHn/EO dGuciIA0OYSTe4lwI5c0Id3h3ND1MCSGR38PiWtoc1B6N/g7tpXHjk9N4NV7ToC246 J1HjqJVHqBZxqoY2mpzLOEKv8yLgKbb6dhDjCU0eiW9NXbZAO7BFWtNmVwzKyAKJJj SkypBXGvDm5/1+dsqvJudCtRw9ipVNf5hYnItAXwivd2V3W77dKtX07UAeRsxJERah bxIYe6+l+uC6veHHSZSGqFRqt+QrobIMNOWLbe5jo7L58w/hmEpljKGM+qSE2KekOp GCjK/I9eSIRkQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) When cross-compiling, "bash" is missing from %build-inputs, leading to a build error. Use this-package-input instead of %build-inputs to resolve this. While we're at it, eliminate all uses of %outputs and %build-inputs. * gnu/packages/python.scm (wrap-python3)[arguments]<#:builder>: Eliminate %outputs and %build-inputs. --- gnu/packages/python.scm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index fe8b93b1ba..8688104463 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -60,6 +60,7 @@ ;;; Copyright © 2019 Tanguy Le Carrour ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020, 2021 Greg Hogan +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -638,9 +639,9 @@ for more information."))) #:builder ,#~(begin (use-modules (guix build utils)) - (let ((bin (string-append (assoc-ref %outputs "out") "/bin")) - (python (string-append (assoc-ref %build-inputs "python") "/bin/"))) - (mkdir-p bin) + (let ((bin (string-append #$output "/bin")) + (python #$(file-append (this-package-input "python") "/bin/"))) + (mkdir-p bin) (for-each (lambda (old new) (symlink (string-append python old) @@ -649,8 +650,7 @@ for more information."))) `("python" ,"pydoc" ,"idle" ,"pip")) ;; python-config outputs search paths based upon its location, ;; use a bash wrapper to avoid changing its outputs. - (let ((bash (string-append (assoc-ref %build-inputs "bash") - "/bin/bash")) + (let ((bash #$(file-append (this-package-input "bash") "/bin/bash")) (old (string-append python "python3-config")) (new (string-append bin "/python-config"))) (with-output-to-file new -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:26 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:26 +0000 Received: from localhost ([127.0.0.1]:60374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXF-0005aV-V4 for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:26 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX5-0005VD-I3 for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:16 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Fpx; Sat, 19 Jun 2021 17:05:15 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 15/36] python: Fix reference to input when cross-compiling. Date: Sat, 19 Jun 2021 17:04:37 +0200 Message-Id: <20210619150458.12057-16-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115115; bh=S6Kz5HKekcso1/yfpL0lw+BUuLKhVWlcJ2Zv2aBaV8U=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Q1jSViudbfYe6pfGzQAqTO80xgFeH5qwIFjSv3piQLiR1tBE95ZCwLc0WLLJvOx6L jHa2Yk9GGVg8Zw5L9xsZtJMPaSC8b+nQ4yvif9fZq1sAM2EVxItQA5cT14+1T9QsyP xbbFhh5kQz4HOLnlJFtmb5zQsdLEa3nFqCJMfNbpPMyutgJqsZpweYMzrkaddfpdaD lVZyhN6P/mg/c+t49hvPwKNrt1PbgG4LAUMsyxwsJ/s4929fe+WN+cy0kDn78ZI53b 0RWYyO1aDuhxKqbIXSsNWWVhfWQktq68s5z+g6xiU+0svLVk/mBBRtrFlnPT/sQijv ldlztdjN6cE/g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) "sitecustomize.py" is a native input, so look it up in 'native-inputs', not 'inputs'. * gnu/packages/python.scm (customize-site): Look up "sizecustomize.py" in 'native-inputs', not 'inputs'. --- gnu/packages/python.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 8688104463..e72f888111 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -111,13 +111,14 @@ (define* (customize-site version) "Generate a install-sitecustomize.py phase, using VERSION." - `(lambda* (#:key inputs outputs #:allow-other-keys) + `(lambda* (#:key native-inputs inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (site-packages (string-append out "/lib/python" ,(version-major+minor version) "/site-packages")) - (sitecustomize.py (assoc-ref inputs "sitecustomize.py")) + (sitecustomize.py (assoc-ref (or native-inputs inputs) + "sitecustomize.py")) (dest (string-append site-packages "/sitecustomize.py"))) (mkdir-p site-packages) (copy-file sitecustomize.py dest) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:48 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:48 +0000 Received: from localhost ([127.0.0.1]:60376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXc-0005b9-9w for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:48 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX5-0005VK-NF for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:17 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Fq0; Sat, 19 Jun 2021 17:05:15 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 16/36] openssl: Remove trailing #t from phases. Date: Sat, 19 Jun 2021 17:04:38 +0200 Message-Id: <20210619150458.12057-17-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115115; bh=vNDYiA0rztYMrJMcUgVtj/Lv3iazYjwdQfejEHLOE2c=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=dMXegDftjE6/Lp+vnD2GPFEqtQOFh4OkKxC13ybgDdx0vHkBf/qN3Kvu/9hnayrep mgnbk1KIevL7H15etNlcRk9myWXbj+bF/nA0GF+qVE733NyAphe+QLFvXtyK+fkVpo YP8CqxqZdXMYqdbnk2Vd6zf4aetWWILl9GXEt5jbjPy1iPSIyq8XGlH5KtwVtO1Z9G LtM6L4+aJESBuxv4pi7FDy38rmMq1qXc9oe6BDBqQ2DTq+DBnzbPxL/68vbfAC1LN/ o/ysz7SuwMOBdK7ZeRZtxrdj1hc/row5AnrlgPaEQO/ro+ui7ygZKl9qdv9xzmvYF/ b0yGN3ixguysg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Delete trailing #t. --- gnu/packages/tls.scm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 31ffdb2a8a..3688449efe 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -363,8 +363,7 @@ required structures.") ((string-prefix? "powerpc64" target) "linux-ppc64") ((string-prefix? "powerpc" target) - "linux-ppc"))) - #t))) + "linux-ppc")))))) '()) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) @@ -403,8 +402,7 @@ required structures.") (for-each (lambda (file) (install-file file slib) (delete-file file)) - (find-files lib "\\.a$")) - #t))) + (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation (lambda* (#:key outputs #:allow-other-keys) ;; Move man3 pages and full HTML documentation to "doc". @@ -417,8 +415,7 @@ required structures.") (copy-recursively man3 man-target) (delete-file-recursively man3) (copy-recursively html html-target) - (delete-file-recursively html) - #t))) + (delete-file-recursively html)))) (add-after 'install 'remove-miscellany (lambda* (#:key outputs #:allow-other-keys) @@ -427,8 +424,7 @@ required structures.") (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" ,(package-version this-package) - "/misc")) - #t)))))) + "/misc")))))))) (native-search-paths (list (search-path-specification (variable "SSL_CERT_DIR") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:49 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:49 +0000 Received: from localhost ([127.0.0.1]:60378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXc-0005bB-Il for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:48 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX5-0005VF-Rl for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:17 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Fq5; Sat, 19 Jun 2021 17:05:15 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 17/36] openssl: Make the #:phases argument a G-expression. Date: Sat, 19 Jun 2021 17:04:39 +0200 Message-Id: <20210619150458.12057-18-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115115; bh=Gcw+h2QCxdUe0ND+PEA3g+/inIceKw9xgBiDzndF/dA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=th0oDzkDoNSc+UZdlAdazaA/IjEBfeDSzkT31uP1D4WLi+MCdiCFbtWnOEhHpM5L/ KnwoM3C5d4oJw9j8VQluytaO2tljGRmVZxb5WyFFWgygmqRcYux3ukwP9gwRXqYJgl Rem7ksE/1FSOWMfyQfg4zhW+BNML6tNE7c7y3zo60lioDgNZZ98Pv7i5K0D0UDKUYx tC8kLkahrFcJr1UdCFgfmY8d4ylYnFpDNBBccguK/uCjoZ4y3Q/Pwf+J6Hg0PsMRRT aJx0V2RJOMORmDmryAUBjgdNdcpD95N78c7hdiml7lNnwXae4iXn3UB/NrbOKBblja Kw4ZBiIYIt2+g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) This allows using this-package-native-input later. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Make this a G-expression. (openssl-1.0)[arguments]<#:phases>: Likewise. --- gnu/packages/tls.scm | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 3688449efe..f561c28251 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -39,6 +39,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system perl) @@ -338,9 +339,10 @@ required structures.") ;; so we explicitly disallow it here. #:disallowed-references ,(list (canonical-package perl)) #:phases + ,#~ (modify-phases %standard-phases - ,@(if (%current-target-system) - '((add-before + #$@(if (%current-target-system) + #~((add-before 'configure 'set-cross-compile (lambda* (#:key target outputs #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) @@ -364,7 +366,7 @@ required structures.") "linux-ppc64") ((string-prefix? "powerpc" target) "linux-ppc")))))) - '()) + #~()) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -374,9 +376,9 @@ required structures.") (("/usr/bin/env") (string-append (assoc-ref %build-inputs "coreutils") "/bin/env"))) - (invoke ,@(if (%current-target-system) - '("./Configure") - '("./config")) + (invoke #$@(if (%current-target-system) + #~("./Configure") + #~("./config")) "shared" ;build shared libraries "--libdir=lib" @@ -385,13 +387,13 @@ required structures.") ;; conventional. (string-append "--openssldir=" out "/share/openssl-" - ,(package-version this-package)) + #$(package-version this-package)) (string-append "--prefix=" out) (string-append "-Wl,-rpath," lib) - ,@(if (%current-target-system) - '((getenv "CONFIGURE_TARGET_ARCH")) - '()))))) + #$@(if (%current-target-system) + #~((getenv "CONFIGURE_TARGET_ARCH")) + #~()))))) (add-after 'install 'move-static-libraries (lambda* (#:key outputs #:allow-other-keys) ;; Move static libraries to the "static" output. @@ -423,7 +425,7 @@ required structures.") ;; scripts. Remove them to avoid retaining a reference on Perl. (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" - ,(package-version this-package) + #$(package-version this-package) "/misc")))))))) (native-search-paths (list (search-path-specification @@ -468,7 +470,7 @@ required structures.") ;; Parallel build is not supported in 1.0.x. ((#:parallel-build? _ #f) #f) ((#:phases phases) - `(modify-phases ,phases + #~(modify-phases #$phases (add-before 'patch-source-shebangs 'patch-tests (lambda* (#:key inputs native-inputs #:allow-other-keys) (let ((bash (assoc-ref (or native-inputs inputs) "bash"))) @@ -491,9 +493,9 @@ required structures.") ;; Override this phase because OpenSSL 1.0 does not understand -rpath. (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) - (invoke ,@(if (%current-target-system) - '("./Configure") - '("./config")) + (invoke #$@(if (%current-target-system) + #~("./Configure") + #~("./config")) "shared" ;build shared libraries "--libdir=lib" @@ -501,12 +503,12 @@ required structures.") ;; PREFIX/ssl. Change that to something more ;; conventional. (string-append "--openssldir=" out - "/share/openssl-" ,version) + "/share/openssl-" #$version) (string-append "--prefix=" out) - ,@(if (%current-target-system) - '((getenv "CONFIGURE_TARGET_ARCH")) - '()))))) + #$@(if (%current-target-system) + '((getenv "CONFIGURE_TARGET_ARCH")) + '()))))) (delete 'move-extra-documentation) (add-after 'install 'move-man3-pages (lambda* (#:key outputs #:allow-other-keys) @@ -531,7 +533,7 @@ required structures.") ;; scripts. Remove them to avoid retaining a reference on Perl. (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" - ,version "/misc")) + #$version "/misc")) #t))))))))) (define-public libressl -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:58 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:58 +0000 Received: from localhost ([127.0.0.1]:60380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXc-0005bJ-Vq for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:58 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX6-0005VG-88 for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:17 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135FqL; Sat, 19 Jun 2021 17:05:16 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 20/36] openssl: Move all man pages to separate output, not only man3. Date: Sat, 19 Jun 2021 17:04:42 +0200 Message-Id: <20210619150458.12057-21-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115116; bh=DPu/tlVUAJgSFitXRgPoGqHSE1UfwnoQAWQJ5vV+sdw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Lnquf4H7+cUS1HNABS6Q8OTeEHnmjYw2pO5NWyu2IOLJOUceMpxLRUEQVulKMKk9p Fm4DftuJCqoDeS60w/YHlkNTclBvendZ8RieeHtCEk1XVwKV4CcTszqE+gcYHUC9q2 uBVUJ6+d0J+NAOKGrj9pjzaKMtACq4oSf2RXrntmdtHZR5NEy0jGTBRwbSztM71kd+ IRDWNPXiqwgR4MY5FXxpEyC2LhATQO3ahXVdpsLTKMUeciPaf295hvjx654s5a5Z7c bKw/ed5wSvl+TQ7nFfVOKFIKeX2/wgMm9b71XtE0S3q+NNbhFw3houC5nx2bpcyXNT 7uqMPyxF7gOWA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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 (-) There does not seem to be any reason to only move man3 pages. So, move all man pages to a separate output for documentation. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>{move-extra-documentation}: Move all man pages, not only man3. --- gnu/packages/tls.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 4efbb4197f..dc9147c1e1 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -408,16 +408,16 @@ required structures.") (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation (lambda _ - ;; Move man3 pages and full HTML documentation to "doc". + ;; Move man pages and full HTML documentation to "doc". (let* ((out #$output) - (man3 (string-append out "/share/man/man3")) - (html (string-append out "/share/doc/openssl")) + (man (string-append out "/share/man")) + (html (string-append out "/share/doc/openssl")) (doc #$output:doc) - (man-target (string-append doc "/share/man/man3")) + (man-target (string-append doc "/share/man")) (html-target (string-append doc "/share/doc/openssl"))) - (mkdir-p (dirname man3-target)) + (mkdir-p (dirname man-target)) (mkdir-p (dirname html-target)) - (rename-file man3 man-target) + (rename-file man man-target) (rename-file html html-target)))) (add-after 'install 'remove-miscellany -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:59 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:59 +0000 Received: from localhost ([127.0.0.1]:60382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXm-0005bZ-OU for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:59 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX6-0005Wo-B9 for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:17 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135FqA; Sat, 19 Jun 2021 17:05:15 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 18/36] openssl: Use G-exp machinery for referring to outputs. Date: Sat, 19 Jun 2021 17:04:40 +0200 Message-Id: <20210619150458.12057-19-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115115; bh=+9EUvDdijOORPjwf03KiMZvP+fUaUlaV3hprpplYCQw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Or2FrLGZv0amXiKKSEMS4Db4OTpmiKyD+r1nn+MQxFCBJVjvr7u/MD54SJeVnc91q xf1t5uLSstm9VSdix8cf1JC1uGu0VJIwv4slwSuG4npCG8F3lCb32V3kapSuqmzSLh MhE9Oas/PpC6zDvj4sP9uHKq+5ylyTkrPm4FjFwnGVSRbJXUkBU+2VMzS7jjqGc1u7 7v03pWeMgm0Y/NF819vyuX2iSdmJOrLHbet5daRikT/zoPNfRS5xgXpQ+hCOFKk2V4 juO9uC5kG+9eqc9OdmRIa8hF9qR0wnmARiOh6qNUcvYjYsOY56/aUMV/ZgCPs8OkNi AOsm8gXgtu2uA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) This doesn't fix anything broken, just for simplifying the code a little while we're rebuilding the world anyway. IMHO this makes the code a little more readable. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Don't refer to the association list 'outputs', use #$output, #$output:doc and #$output:static instead. --- gnu/packages/tls.scm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index f561c28251..669d33f8de 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020, 2021 Maxim Cournoyer ;;; Copyright © 2021 Solene Rapenne +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -344,7 +345,7 @@ required structures.") #$@(if (%current-target-system) #~((add-before 'configure 'set-cross-compile - (lambda* (#:key target outputs #:allow-other-keys) + (lambda* (#:key target #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) (setenv "CONFIGURE_TARGET_ARCH" (cond @@ -368,8 +369,8 @@ required structures.") "linux-ppc")))))) #~()) (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) + (lambda _ + (let* ((out #$output) (lib (string-append out "/lib"))) ;; It's not a shebang so patch-source-shebangs misses it. (substitute* "config" @@ -395,23 +396,23 @@ required structures.") #~((getenv "CONFIGURE_TARGET_ARCH")) #~()))))) (add-after 'install 'move-static-libraries - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; Move static libraries to the "static" output. - (let* ((out (assoc-ref outputs "out")) + (let* ((out #$output) (lib (string-append out "/lib")) - (static (assoc-ref outputs "static")) + (static #$output:static) (slib (string-append static "/lib"))) (for-each (lambda (file) (install-file file slib) (delete-file file)) (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; Move man3 pages and full HTML documentation to "doc". - (let* ((out (assoc-ref outputs "out")) + (let* ((out #$output) (man3 (string-append out "/share/man/man3")) (html (string-append out "/share/doc/openssl")) - (doc (assoc-ref outputs "doc")) + (doc #$output:doc) (man-target (string-append doc "/share/man/man3")) (html-target (string-append doc "/share/doc/openssl"))) (copy-recursively man3 man-target) @@ -420,13 +421,12 @@ required structures.") (delete-file-recursively html)))) (add-after 'install 'remove-miscellany - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; The 'misc' directory contains random undocumented shell and Perl ;; scripts. Remove them to avoid retaining a reference on Perl. - (let ((out (assoc-ref outputs "out"))) - (delete-file-recursively (string-append out "/share/openssl-" - #$(package-version this-package) - "/misc")))))))) + (delete-file-recursively (string-append #$output "/share/openssl-" + #$(package-version this-package) + "/misc"))))))) (native-search-paths (list (search-path-specification (variable "SSL_CERT_DIR") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:59 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:59 +0000 Received: from localhost ([127.0.0.1]:60384 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXn-0005bi-6E for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:59 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX6-0005Wv-Fi for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:18 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135FqE; Sat, 19 Jun 2021 17:05:15 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 19/36] openssl: Move documentation instead of copying and deleting it. Date: Sat, 19 Jun 2021 17:04:41 +0200 Message-Id: <20210619150458.12057-20-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115115; bh=a8Vw/GcJ4T4qCjHX5tisuu0wU0oWUep290kHKRpnv48=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=IaVZrhSgKN3icZHkpUdOCqgTtn8KFQNBLhGSm84F7+V/LG0WJmkSnv43OT/q94GCG 6hjbbuyUj0SQhAjqthAKyaIrS0lBUU4cbAL3eYMNNxrY7vB0+llZGRRNCVLyoFNAnV o2nxNoTXf3iOlxgvcEQC/cFev3eTwCLfe/yYrPjXnGrtB0f/wV005wn1J9FKemLzq7 7xcJ6zZ1h8q+vl3U0GwyfvdS1nKb58HU5/SdoiV5szNlJ1v1orVX48HWn+5PwHO3NB PQnOswRWkNrD2oyNcpeiL7tVJhz43t/dXFfbw9nL06VDltysqQqkymrNHgDrQpqFtO qwA/r5nGnK1hQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) * gnu/packages/tls.scm (openssl)[arguments]<#:phases>{move-extra-documentation}: Use 'rename-file' instead of 'copy-recursively' and 'delete-file-recursively'. --- gnu/packages/tls.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 669d33f8de..4efbb4197f 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -415,10 +415,10 @@ required structures.") (doc #$output:doc) (man-target (string-append doc "/share/man/man3")) (html-target (string-append doc "/share/doc/openssl"))) - (copy-recursively man3 man-target) - (delete-file-recursively man3) - (copy-recursively html html-target) - (delete-file-recursively html)))) + (mkdir-p (dirname man3-target)) + (mkdir-p (dirname html-target)) + (rename-file man3 man-target) + (rename-file html html-target)))) (add-after 'install 'remove-miscellany (lambda _ -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:05:59 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:05:59 +0000 Received: from localhost ([127.0.0.1]:60386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXn-0005bp-EI for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:59 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX6-0005X3-Ne for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:18 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135GqT; Sat, 19 Jun 2021 17:05:16 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 21/36] openssl: Find bin/env when cross-compiling. Date: Sat, 19 Jun 2021 17:04:43 +0200 Message-Id: <20210619150458.12057-22-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115116; bh=GsWDTNxL6QdOZSxzoRUCw21aLkpeIshumeFVrK8r6FE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=M+oUMmkItARtuc7EPGSuN8ErggYXWdmoD3U8pS5z6SGRUn2mmSEtaNwjVWFdEerM9 p+NXRuDoO6QgMEKOw/AcZGBLbd13gyO5wXsRkxjCe14QKXaj1nb7bdw2u/wndcE3lo rrATZ+a4GEtkQVYyT+3HhkX5wXg6RbYEmZsUgl5wlsfUFKGsLKnnCkatp7WsFw4x6U sE9BWz2CUlvA3DJq2rTsvUoVt56My1jTFrYg9VOCVLb7IsjZZ4rAowpnFA1OIPmKtp PiThY2BE/uiRouno+RwcE37R/v+4K/A6DHdqXaIC/L4OtJSU/kryxBeIvENQwcD6IM L7JSJY5FT2a5A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) %build-inputs does not exist when cross-compiling, so find bin/env by another way. * (openssl)[arguments]<#:phases>{configure}: Don't use '%build-inputs', use 'which' instead. --- gnu/packages/tls.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index dc9147c1e1..72a1cd8f0c 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -373,10 +373,10 @@ required structures.") (let* ((out #$output) (lib (string-append out "/lib"))) ;; It's not a shebang so patch-source-shebangs misses it. + ;; Don't use (assoc-ref %build-inputs "coreutils"), as + ;; %build-inputs is not defined when cross-compiling. (substitute* "config" - (("/usr/bin/env") - (string-append (assoc-ref %build-inputs "coreutils") - "/bin/env"))) + (("/usr/bin/env") (which "env"))) (invoke #$@(if (%current-target-system) #~("./Configure") #~("./config")) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:06:00 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:06:00 +0000 Received: from localhost ([127.0.0.1]:60388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXn-0005bx-Nm for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:59 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX6-0005VD-Tn for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:18 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Gqp; Sat, 19 Jun 2021 17:05:16 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 25/36] bash: Make #:configure-flags a G-expression. Date: Sat, 19 Jun 2021 17:04:47 +0200 Message-Id: <20210619150458.12057-26-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115116; bh=1zWLyKNdDiD8e2cuo2aK9D7rNa9KmEnbc2E+HBexX54=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Xzr8cCIrvUYT7YqetK7obTgYyOajXZ73gR4PjQWgHZkypDLxkdwJfp+tuJWI3DNEc fbWp7tHOxAKyZo+5aFngc9v/Ip7WRYyhfLlp9L6UNDH3T8ZVL4iSzOyLT6q+xynVNc KfjMfmbzVNugsw06xP3IrsLMgEJoOYXJtkP1Tm9iBBbUN7aJAGL7rVEiEJJ+Q9Z4iz CCWmJntNN7u+ZJ1K+cCGLaVWc22w/sOSvhflLZQzGnpYwbl5uyWCJEn162M7rzWz2V 2qHVgUifQVKn38GgooB3+Zlh9YILzFPEdoWBGR5zJTwz+m6DqlQHJVClv4w1gampUw R8FypZFBqAR/g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) This allows using this-package-input later. * gnu/packages/bash.scm (bash)[arguments]<#:configure-flags>: Make this a G-expression instead of a raw S-expression. --- gnu/packages/bash.scm | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index 7e98367bbb..b3af873a66 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -109,15 +109,15 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." "-DSSH_SOURCE_BASHRC") " ")) (configure-flags - ``("--with-installed-readline" - ,,(string-append "CPPFLAGS=" cppflags) - ,(string-append - "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "readline") - "/lib" - " -Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib"))) + #~`("--with-installed-readline" + ,#$(string-append "CPPFLAGS=" cppflags) + ,(string-append + "LDFLAGS=-Wl,-rpath -Wl," + (assoc-ref %build-inputs "readline") + "/lib" + " -Wl,-rpath -Wl," + (assoc-ref %build-inputs "ncurses") + "/lib"))) (version "5.1")) (package (name "bash") @@ -143,8 +143,8 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." `(;; When cross-compiling, `configure' incorrectly guesses that job ;; control is missing. #:configure-flags ,(if (%current-target-system) - `(cons* "bash_cv_job_control_missing=no" - ,configure-flags) + #~(cons* "bash_cv_job_control_missing=no" + #$configure-flags) configure-flags) ;; Bash is reportedly not parallel-safe. See, for instance, -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:06:00 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:06:00 +0000 Received: from localhost ([127.0.0.1]:60390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXo-0005c4-0k for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:06:00 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX6-0005X6-SP for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:18 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Gqb; Sat, 19 Jun 2021 17:05:16 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 22/36] openssl: Extract logic for computing CONFIGURE_TARGET_ARCH. Date: Sat, 19 Jun 2021 17:04:44 +0200 Message-Id: <20210619150458.12057-23-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115116; bh=hOXFAKx0OeKrsZHlmI0Ed0p7vPPzTDwO8XFAVwi8EqM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=GzZjdh2wvPDs0p515j5JqIGDelC4tO5pnOF4tq9CkJpeisJIBFdc1X+FZqSsY4LsZ zCmLfeF2+sXbsFC/2N7YetuEw4BRDDffyclOjmIUrIlToEKuklbogMILzPeS8ZErpV KqxjyYy1CRaZHmb2yo9L29NwhatplCnS0o5u1NsDCm5+8cMOzJf8USln6scUd6Cv3I YWtHRMxLbLO0GUPYhwLzrbRTMRVyfFPpHrRUVYACzi7VFM2/60c/CfKLVsKLVzSGl4 Gyhv7FZzfk4d14bPwabtZT+DwCR/e0ay8Ucwi47zvIJxlDFIeCSeFcwzIW67b7CqQt k2U96rCkFG/UQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) By computing this value outside the build code, new targets can be added without causing rebuilds for other targets. * gnu/packages/tls.scm (target->openssl-target): New procedure. (openssl)[arguments]<#:phases>{set-cross-compile}: Use it. --- gnu/packages/tls.scm | 46 ++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 72a1cd8f0c..1ed43f0ebd 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -310,6 +310,31 @@ required structures.") (define-public guile3.0-gnutls (deprecated-package "guile3.0-gnutls" gnutls)) +(define (target->openssl-target target) + "Return the value to set CONFIGURE_TARGET_ARCH to when cross-compiling +OpenSSL for TARGET." + ;; Keep this code outside the build code, + ;; such that new targets can be added + ;; without causing rebuilds for other targets. + (cond ((string-prefix? "i586" target) + "hurd-x86") + ((string-prefix? "i686" target) + "linux-x86") + ((string-prefix? "x86_64" target) + "linux-x86_64") + ((string-prefix? "mips64el" target) + "linux-mips64") + ((string-prefix? "arm" target) + "linux-armv4") + ((string-prefix? "aarch64" target) + "linux-aarch64") + ((string-prefix? "powerpc64le" target) + "linux-ppc64le") + ((string-prefix? "powerpc64" target) + "linux-ppc64") + ((string-prefix? "powerpc" target) + "linux-ppc"))) + (define-public openssl (package (name "openssl") @@ -348,25 +373,8 @@ required structures.") (lambda* (#:key target #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) (setenv "CONFIGURE_TARGET_ARCH" - (cond - ((string-prefix? "i586" target) - "hurd-x86") - ((string-prefix? "i686" target) - "linux-x86") - ((string-prefix? "x86_64" target) - "linux-x86_64") - ((string-prefix? "mips64el" target) - "linux-mips64") - ((string-prefix? "arm" target) - "linux-armv4") - ((string-prefix? "aarch64" target) - "linux-aarch64") - ((string-prefix? "powerpc64le" target) - "linux-ppc64le") - ((string-prefix? "powerpc64" target) - "linux-ppc64") - ((string-prefix? "powerpc" target) - "linux-ppc")))))) + #$(target->openssl-target + (%current-target-system)))))) #~()) (replace 'configure (lambda _ -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:06:00 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:06:00 +0000 Received: from localhost ([127.0.0.1]:60392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXo-0005cB-AR for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:06:00 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX7-0005X8-03 for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:19 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Gqf; Sat, 19 Jun 2021 17:05:16 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 23/36] readline: Make #:configure-flags a G-expression. Date: Sat, 19 Jun 2021 17:04:45 +0200 Message-Id: <20210619150458.12057-24-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115116; bh=neLQDEYrgz43VXqeDX+nDYMKaIL+ubEfobimHGhCItk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=BhJ+VK2rcxo94t85XHf4dvHpgcUx0Vl6UvomVIsbPCx3XUO9/XfMq5JIsWMwF2Ib6 QPHm4f/C1D2PrSCxsTLJe1EfvNVhbnMP0FD9bqRnBpyC/rGuaM+K86kAJwO0QL6xWj gaVTzqSROd6w5/Z0AtLLKDydibL1GDUk+lJymVAqK6qcg8CTSt4g/M3+mXuxLonelk s0RkV5ep5XWjStokPkwwYna3wr24SfH7SAZQqxhdJrgXaUBEhZrl0FI/A5Q334HSPC euMY7aPnR0Sb3FffOluIpqGzT+6t2MUCQWNGKXOu47jVfJw8Nv9keHp7abJcDvL1iz owwMuC95PAqEA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) This allos using ungexp and this-package-input later. * gnu/packages/readline.scm (readline)[arguments]<#:configure-flags>: Make this a G-expression. --- gnu/packages/readline.scm | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm index ced8471887..7823a4e6ad 100644 --- a/gnu/packages/readline.scm +++ b/gnu/packages/readline.scm @@ -31,6 +31,7 @@ #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (ice-9 format)) (define (patch-url version seqno) @@ -78,19 +79,19 @@ (build-system gnu-build-system) (propagated-inputs `(("ncurses" ,ncurses))) (arguments `(#:configure-flags - (list (string-append "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib") + ,#~(list (string-append "LDFLAGS=-Wl,-rpath -Wl," + (assoc-ref %build-inputs "ncurses") + "/lib") - ;; This test does an 'AC_TRY_RUN', which aborts when - ;; cross-compiling, so provide the correct answer. - ,@(if (%current-target-system) - '("bash_cv_wcwidth_broken=no") - '()) - ;; MinGW: ncurses provides the termcap api. - ,@(if (target-mingw?) - '("bash_cv_termcap_lib=ncurses") - '())) + ;; This test does an 'AC_TRY_RUN', which aborts when + ;; cross-compiling, so provide the correct answer. + #$@(if (%current-target-system) + '("bash_cv_wcwidth_broken=no") + '()) + ;; MinGW: ncurses provides the termcap api. + #$@(if (target-mingw?) + '("bash_cv_termcap_lib=ncurses") + '())) ,@(if (target-mingw?) ;; MinGW: termcap in ncurses -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:06:00 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:06:01 +0000 Received: from localhost ([127.0.0.1]:60394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXo-0005cI-K4 for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:06:00 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59260) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX7-0005VK-Ao for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:19 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Hr3; Sat, 19 Jun 2021 17:05:17 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 28/36] fontconfig: Fix build error when cross-compiling. Date: Sat, 19 Jun 2021 17:04:50 +0200 Message-Id: <20210619150458.12057-29-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115117; bh=E3QkiIRS2uR7h5BsXw4b/WY2KbCrmONCKPV2ehUqpiE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=NpkIKXX3u8WLyR5pk7jrrOTcUkgeR9UaKB1wrvWhCq2LxXPTLOlzFDOAd5Vz0jF9N p8rsdKHYcs6LzvYqSBMt2VxZJjLJlA1EOiKo0xSYBPTlB0vEJqQZR09W21NKKdN6ZN AfcJJDLUpfDI7eRdiXxWz5uc9WRh+jh8YbVGRsKDkvH9i3jYPKVFnjnaWqGOaRF+ZS 1w0xSnvs56O4537hiIsY/Mc6uzB0blWWd5ZPAjonv8GIB/nvacHlFMgWY5u9iIHsf1 CsnVmMS6SZDxT06hJy87RcfRnBcWW3lFCHugZUWl5OVtHanTCjpdL9y9H3pHxX8biF 2e/6v46IRFFSg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) %build-inputs does not exist when cross-compiling, so use #$(this-package-input ...) instead. * gnu/packages/fontutils.scm (fontconfig)[arguments]<#:configure-flags>: Use this-package-input instead of %build-inputs. --- gnu/packages/fontutils.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index 234f11129a..b0d40efeae 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -353,8 +353,8 @@ Font Format (WOFF).") "--with-cache-dir=/var/cache/fontconfig" ;; register the default fonts (string-append "--with-default-fonts=" - (assoc-ref %build-inputs "font-dejavu") - "/share/fonts") + #$(file-append (this-package-input "font-dejavu") + "/share/fonts")) ;; Register fonts from user and system profiles. (string-append "--with-add-fonts=" -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:06:01 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:06:01 +0000 Received: from localhost ([127.0.0.1]:60396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXo-0005cQ-Rv for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:06:01 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59640) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX7-0005XE-4x for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:19 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Gqj; Sat, 19 Jun 2021 17:05:16 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 24/36] readline: Fix build error when cross-compiling. Date: Sat, 19 Jun 2021 17:04:46 +0200 Message-Id: <20210619150458.12057-25-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115116; bh=tCRrS3c/vTZ0yk4aMWTAoJzvvWrPMC8M4uHWbX4RMxw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=H2nCx1z2SApq8Te7QGTvZxx7Tdrt9NFDHS4l4XpfTTC6IsN34jAeu/ALXEtku4UPL 4dJ1lL4vGuXQr5orIazDp0FetPRQdnh+MUyM0vKsw9L6+LClqkLYFFu2cnEsWk2o7D cydYEF/jDja3GY1MXyYm8idAaiQxFJGiCB5Q7Au/MqDiV/3ZVsAATO5Dyeyr+2YF6y ZAbidS7fnv4zjAEVNATPn+fadjjdiJMyAb/LGzNYp9scTBbFOKidbVJXfKqtT2saZ7 bK/S695hWMM5mpivik1GfPDMEXTZuE4cT0I9O0CacXSlhTRiCEDN7LpwIDa4VV9DAB pAfEgo+fFlo5w== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) %build-inputs does not exist when cross-compiling, so use this-package-input instead. * gnu/packages/readline.scm (readline)[arguments]<#:configure-flags>: Use this-package-input instead of %build-inputs. --- gnu/packages/readline.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm index 7823a4e6ad..94684702b7 100644 --- a/gnu/packages/readline.scm +++ b/gnu/packages/readline.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2018, 2021 Tobias Geerinckx-Rice ;;; Copyright © 2019, 2020 Marius Bakke +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -79,9 +80,10 @@ (build-system gnu-build-system) (propagated-inputs `(("ncurses" ,ncurses))) (arguments `(#:configure-flags - ,#~(list (string-append "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib") + ,#~(list (string-append + "LDFLAGS=-Wl,-rpath -Wl," + #$(this-package-input "ncurses") + "/lib") ;; This test does an 'AC_TRY_RUN', which aborts when ;; cross-compiling, so provide the correct answer. -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:06:01 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:06:01 +0000 Received: from localhost ([127.0.0.1]:60398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXp-0005cb-5j for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:06:01 -0400 Received: from newton.telenet-ops.be ([195.130.132.45]:60284) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX7-0005XG-Co for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:19 -0400 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by newton.telenet-ops.be (Postfix) with ESMTPS id 4G6fH108yCzMqsJ3 for <49025@debbugs.gnu.org>; Sat, 19 Jun 2021 17:05:17 +0200 (CEST) Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Gr0; Sat, 19 Jun 2021 17:05:16 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 27/36] fontconfig: Make the #:configure-flags argument a G-expression. Date: Sat, 19 Jun 2021 17:04:49 +0200 Message-Id: <20210619150458.12057-28-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115117; bh=eE/ELwt0ayoao9TRVzPRFatyA74xUIrSYWIXnB6jcQM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=r1szgjX8ne/qyYBsaugSo+J9F2ts0gbNNyO3biRNJvxqMB+CG54d35defyZ21zTuf C6q3et4s+tn0VjuCV/q/4XwL4iOKZmKdeRaFizm8MocjKU796cBmhVTwcIrkXDjp9o zKTE1dhmLyri6ODqBEIGiQ/flQinbd/2hXFg4stCxxLqPIhyxbUksh0P5tOIOGROql OJSpSlS/2y/kyfNydSEOiKIJG6uc8swCcj7jlv8MUmycTjB0BhfmFbpZ72mQcbMB65 R6hsAK1D/Z+Fehl3WJwJvr75vLumbhIJNE8A1PbNG9yjpc5IC1FbJjlbP2iOqH1YzK hn4mbkIw7WNpw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) This allows using #$(this-package-input ...) later. * gnu/packages/fontutils.scm (fontconfig)[arguments]<#:configure-flags>: Make this a G-expression instead of a raw S-expression. (fontconfig-with-documentation)[arguments]<#:configure-flags>: Likewise. --- gnu/packages/fontutils.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/fontutils.scm b/gnu/packages/fontutils.scm index dbce5beba8..234f11129a 100644 --- a/gnu/packages/fontutils.scm +++ b/gnu/packages/fontutils.scm @@ -64,6 +64,7 @@ #:use-module (gnu packages xorg) #:use-module (gnu packages tex) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix svn-download) @@ -347,6 +348,7 @@ Font Format (WOFF).") ("python" ,python-minimal))) ;to avoid a cycle through tk (arguments `(#:configure-flags + ,#~ (list "--disable-docs" "--with-cache-dir=/var/cache/fontconfig" ;; register the default fonts @@ -400,7 +402,7 @@ high quality, anti-aliased and subpixel rendered text on a display.") (arguments (substitute-keyword-arguments (package-arguments fontconfig) ((#:configure-flags configure-flags) - `(delete "--disable-docs" ,configure-flags)) + #~(delete "--disable-docs" #$configure-flags)) ((#:phases phases '%standard-phases) `(modify-phases ,phases (add-after 'install 'move-man-sections -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:06:02 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:06:02 +0000 Received: from localhost ([127.0.0.1]:60400 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXp-0005cl-IZ for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:06:01 -0400 Received: from leibniz.telenet-ops.be ([195.130.137.77]:33572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX7-0005XM-GZ for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:20 -0400 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by leibniz.telenet-ops.be (Postfix) with ESMTPS id 4G6fH06FGlzMqnrQ for <49025@debbugs.gnu.org>; Sat, 19 Jun 2021 17:05:16 +0200 (CEST) Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Gqt; Sat, 19 Jun 2021 17:05:16 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 26/36] bash: Fix cross-compilation build error. Date: Sat, 19 Jun 2021 17:04:48 +0200 Message-Id: <20210619150458.12057-27-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115116; bh=Jg15KuLDc9Pd0cjkQKGHl1QMNvmHzgPBIjg4oyLTNo8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sKa08S9eayIAB1RdqqVl0WIC5eDqv97iWZOsU63uEiMOFmOfyGoOkGcYkqvKiC2dG 2cA9Co5SEID6hosKWD93jyhouYpvD5LzxGTBZ542txGPjt/tGm6eY5J/7XauVPb9oL 1yBaF58g5iAL1FHTYNPqiMFwf6nZF9SwAPpfC4UYx21Ae3yrt5NgOpdnK0IeoNmL3e NPgLYu1sfd5WU8LDmW7bojfupeihvw8ru0XoriN46QYLMnopjnSCfEzLS2OL8FnMI4 tkU9p3XDVB+25dZ+hMyDuPTGxLi/+XMiDhHKIJYuOY8Q3FHNP85P8LSLLpg0QuwJ6C KPQk41RFTMVfQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) %build-inputs does not exist when cross-compiling, so use this-package-input instead. * gnu/packages/bash.scm (bash)[arguments]<#:configure-flags>: Use this-package-input instead of %build-inputs. --- gnu/packages/bash.scm | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index b3af873a66..d51ab26bc8 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -103,22 +103,25 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." 1)) (define-public bash - (let* ((cppflags (string-join '("-DDEFAULT_PATH_VALUE='\"/no-such-path\"'" - "-DSTANDARD_UTILS_PATH='\"/no-such-path\"'" - "-DNON_INTERACTIVE_LOGIN_SHELLS" - "-DSSH_SOURCE_BASHRC") - " ")) - (configure-flags - #~`("--with-installed-readline" - ,#$(string-append "CPPFLAGS=" cppflags) - ,(string-append - "LDFLAGS=-Wl,-rpath -Wl," - (assoc-ref %build-inputs "readline") - "/lib" - " -Wl,-rpath -Wl," - (assoc-ref %build-inputs "ncurses") - "/lib"))) - (version "5.1")) + (let ((cppflags (string-join '("-DDEFAULT_PATH_VALUE='\"/no-such-path\"'" + "-DSTANDARD_UTILS_PATH='\"/no-such-path\"'" + "-DNON_INTERACTIVE_LOGIN_SHELLS" + "-DSSH_SOURCE_BASHRC") + " ")) + (version "5.1")) + ;; Delay expansion to inside a lexical environment + ;; where this-package is bound. + (define-syntax configure-flags + (identifier-syntax + #~`("--with-installed-readline" + ,#$(string-append "CPPFLAGS=" cppflags) + ,(string-append + "LDFLAGS=-Wl,-rpath -Wl," + ;; %build-inputs does not exist when cross-compiling, + ;; so use this-package-input instead. + #$(file-append (this-package-input "readline") "/lib") + " -Wl,-rpath -Wl," + #$(file-append (this-package-input "ncurses") "/lib"))))) (package (name "bash") (source (origin -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:06:02 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:06:02 +0000 Received: from localhost ([127.0.0.1]:60402 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXq-0005cw-1L for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:06:02 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX7-0005VG-KX for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:20 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135HrD; Sat, 19 Jun 2021 17:05:17 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 30/36] glib: Verify the cross-compiled python is used in installed scripts. Date: Sat, 19 Jun 2021 17:04:52 +0200 Message-Id: <20210619150458.12057-31-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115117; bh=vz2s9MKdv0JhQupP6/UigdW2ZfxBw8s0Jy77XHPGah0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ThIfRFPVpbW72iuGjfcXuvQCFbCmqdLQBYUp2ULaEMXn2C9VShF/3X8SrresYGgkO LYZF7SB4Riy5zvalGASb80hvX/nzWAFu9vt+yt5RhrOt3UuzW3HrZuO65q9kdNB0Fq S9o6Bx2r9GfVvivmcJ8TZ4NYge+Zgi5D+s0LO6LGjL/ejaFkPc9VS0J3o+tYv1hUgL Jho85dSIaMj8IlGAa0j9AJvBzyl9gJDEyn4NrgBlbxDY9Giuqd/NS0o6cMlGPaplEL GDVMeEk89S1awagbVD5s/egzTtz2VXed2HiBUQkw7PJvGoNUIwwWVCQnnlTtWrtsQt C+mmL/N2sDAiQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) * gnu/packages/glib.scm (glib)[arguments]<#:disallowed-references>: Disallow the native python when cross-compiling. --- gnu/packages/glib.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 4f40488df8..22bd384fa7 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -77,6 +77,8 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix gexp) + #:use-module (srfi srfi-26) #:use-module ((srfi srfi-1) #:hide (zip)) ;; Export variables up-front to allow circular dependency with the 'xorg' @@ -200,7 +202,15 @@ shared NFS home directories.") "static" ;static libraries "bin")) ;executables; depends on Python (arguments - `(#:disallowed-references (,tzdata-for-tests) + `(#:disallowed-references + (,tzdata-for-tests + ;; Verify glib-mkenums, gtester, ... use the cross-compiled + ;; python. + ,@(if (%current-target-system) + (map (cut gexp-input <> #:native? #t) + `(,(this-package-native-input "python") + ,(this-package-native-input "python-wrapper"))) + '())) #:configure-flags '("--default-library=both" "-Dman=true" "-Dselinux=disabled") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:06:02 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:06:03 +0000 Received: from localhost ([127.0.0.1]:60405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXq-0005d8-Fo for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:06:02 -0400 Received: from newton.telenet-ops.be ([195.130.132.45]:60288) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX7-0005Xc-Vn for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:20 -0400 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by newton.telenet-ops.be (Postfix) with ESMTPS id 4G6fH14Py2zMqsJV for <49025@debbugs.gnu.org>; Sat, 19 Jun 2021 17:05:17 +0200 (CEST) Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135HrH; Sat, 19 Jun 2021 17:05:17 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 31/36] glib: Look up "tzdata" in 'native-inputs', not 'inputs'. Date: Sat, 19 Jun 2021 17:04:53 +0200 Message-Id: <20210619150458.12057-32-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115117; bh=4s6okA0SLtxXEfxoNWtCT6YolV4q3Ygrpt5ogdXO6uU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=IQ14UvL/FU4P7BddWkyq+id1SFpYkXnAOVAjGfwncZiN9Cd5jKbPvDAM3rlhyAvjd irtloZlwejMZ703d/4uboEHuW3m6+LaMv5B77SkEiqUbwBX+Q8J4wuGgt3IN745KYb QjhpbRYBhe2USGP8ICRcFd5sxaJbBbLw1aH6h/J1/5bXb5YgNf70S3M9IcrFwUFfC/ 5lDIBbo2LWO2CM/Rn5+4zP1+K0mB9b9kln+NOCupU2pyCgVw7up64xY9DVaZP8Hm/5 AqNsm2zuW5K1p2yin1hc2miW/iUrIe2flw0G7JFUaX8GnS6z2nmlCcrBCM69EuysAd 32hIpbVeYDwTw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) Otherwise, "tzdata" won't be found when cross-compiling and string-append will complain about types. Alternatively, "tzdata" could be moved from 'native-inputs' to 'inputs'. * gnu/packages/glib.scm (glib)[arguments]<#:phases>{pre-check}: Look up "tzdata" in 'native-inputs', not 'inputs'. --- gnu/packages/glib.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 22bd384fa7..d3879879de 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -252,10 +252,11 @@ shared NFS home directories.") (package-version python))))) #t)) (add-before 'check 'pre-check - (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) ;; For tests/gdatetime.c. (setenv "TZDIR" - (string-append (assoc-ref inputs "tzdata") + (string-append (assoc-ref (or native-inputs inputs) + "tzdata") "/share/zoneinfo")) ;; Some tests want write access there. (setenv "HOME" (getcwd)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:06:03 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:06:03 +0000 Received: from localhost ([127.0.0.1]:60407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXq-0005dL-Qv for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:06:03 -0400 Received: from leibniz.telenet-ops.be ([195.130.137.77]:33576) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX8-0005Xh-3R for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:21 -0400 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by leibniz.telenet-ops.be (Postfix) with ESMTPS id 4G6fH15FCbzMqny5 for <49025@debbugs.gnu.org>; Sat, 19 Jun 2021 17:05:17 +0200 (CEST) Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135HrN; Sat, 19 Jun 2021 17:05:17 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 32/36] tk: Make #:configure-flags a G-expression. Date: Sat, 19 Jun 2021 17:04:54 +0200 Message-Id: <20210619150458.12057-33-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115117; bh=5uYwnGhqcyoz8f9UYuhpumozlHAVHIx5CnK53MVgB28=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=cCkIIjUbgrSY8Xdc7hzAhBO8yRArCjV2xmvlfl8n/JlOe8qUtlUymnQxuW3WVvzqL nM9oNqNNPZVrvehYiYR6AvfEZIL4Zu0FusNjYQ4Qt3/sgYeXe7UpA89MhleLTFnwBv Ket9ckhaAXUsiD41BFE/DVXc23IsihF/0idnDM3YdHLtoSdRRm77BaUh3EcA5JMNJ0 znZeWrHH+ZSHs6ZknZ/drb4qTcmo/4Xe0MGtNIqbhpxAjw17LQ5VVY3yl30PJAfgEG 616z/jY2GNgOwQTWgqs6zMz8c2lLkG1UFiYGjtiCmrgg56UbBu4Ex5/6mL6ueurWmE /691fm6a9cnIQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) This allows using #$(this-package-input ...) later. * gnu/packages/tcl.scm (tk)[arguments]<#:configure-flags>: Make this a G-expression instead of an S-expression. --- gnu/packages/tcl.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm index 5fccfa5da9..c87a8187f2 100644 --- a/gnu/packages/tcl.scm +++ b/gnu/packages/tcl.scm @@ -230,15 +230,16 @@ X11 GUIs.") "/lib -lfontconfig"))))))) #:configure-flags + ,#~ (list (string-append "--with-tcl=" (assoc-ref %build-inputs "tcl") "/lib") ;; This is needed when cross-compiling, see: ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719247 - ,@(if (%current-target-system) - '("tcl_cv_strtod_buggy=1" - "ac_cv_func_strtod=yes") - '())) + #$@(if (%current-target-system) + #~("tcl_cv_strtod_buggy=1" + "ac_cv_func_strtod=yes") + #~())) ;; The tests require a running X server, so we just skip them. #:tests? #f)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:06:03 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:06:03 +0000 Received: from localhost ([127.0.0.1]:60410 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXr-0005dU-66 for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:06:03 -0400 Received: from leibniz.telenet-ops.be ([195.130.137.77]:33582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX8-0005Xi-7g for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:21 -0400 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by leibniz.telenet-ops.be (Postfix) with ESMTPS id 4G6fH1683PzMqny7 for <49025@debbugs.gnu.org>; Sat, 19 Jun 2021 17:05:17 +0200 (CEST) Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135HrS; Sat, 19 Jun 2021 17:05:17 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 33/36] tk: Do not use %build-inputs when cross-compiling. Date: Sat, 19 Jun 2021 17:04:55 +0200 Message-Id: <20210619150458.12057-34-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115117; bh=zt7BAM2kxTcKP2NYK6l7VYfWxdJEaUVC9x+20Op9hjE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=tnwL8PW7jtnxZROUzja+DuvitURIHZkbxo9IJqPJLm+oviQQw3ihAbx9KT7lF0awG b911qGpcjtOd+wueM7eviItSSwKn6NjXWDi1GsrIbCW+KhAEqkUKrt60mfi8qkew13 sICe8lrK0rkMiXen6iEB/HRiSAuooAzzO0pLXdsYHLWeyoaak91OOltK3AHore0YxE pjTmJpc7MqSk6Ltb6xEgvsze29p9ea1dBp7XsWA8Se/wSx9mDxRQbnIAkFctn8TIP0 Mp8H+eV595uNEPf9r/B5W6mxDyaD581de/GYqVUDXOm3W4UpJBG9jwjz7s5IvqAdzz 5zWWze65JezwQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) %build-inputs does not exists when cross-compiling, so use #$(this-package-input ...) instead. * gnu/packages/tcl.scm (tk)[arguments]<#:configure-flags>: Use 'this-package-input' instead of '%build-inputs' when cross-compiling. --- gnu/packages/tcl.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm index c87a8187f2..91ba8bbb3f 100644 --- a/gnu/packages/tcl.scm +++ b/gnu/packages/tcl.scm @@ -29,6 +29,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system perl) @@ -232,7 +233,9 @@ X11 GUIs.") #:configure-flags ,#~ (list (string-append "--with-tcl=" - (assoc-ref %build-inputs "tcl") + #$(if (%current-target-system) + (this-package-input "tcl") + #~(assoc-ref %build-inputs "tcl")) "/lib") ;; This is needed when cross-compiling, see: ;; https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=719247 -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:06:07 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:06:07 +0000 Received: from localhost ([127.0.0.1]:60412 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXr-0005de-He for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:06:07 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59208) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX7-0005VF-GW for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:23 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Hr7; Sat, 19 Jun 2021 17:05:17 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 29/36] glib: Use a correct python in scripts when cross-compiling. Date: Sat, 19 Jun 2021 17:04:51 +0200 Message-Id: <20210619150458.12057-30-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115117; bh=3cyOrfR2njr5LDfDqyg6yZROWN56V/sayz4aRoA46Cw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=LbCc6iLPcuqyn4LvBa2Iozi4To54V+VBW8p7rFZ1mblB6KxiEg+WWbliMFNbfjL44 /gyWhRryVlC6WaD1Hhe0TOaUZ0Q4/pwagZ0RSNz+brR4XN6i5hKwGCWrNvG71N/PTO a1AC7vZFgqqKAlB8Z1JEvqB5klDCRb5K9D3Gb1v2oWfdtiSOWhucDazKt7yH+CGY73 +nAKdLuEQdewJ1orD30Zxmv0EuYl6mekez9qn0CrKs6wXvFFEFZ2KSKOSXJNzPHOpu uPjqfHzolQGbhwPrz7fBSmlx9I6j2vbtPTZ6uL5eW1uNrWNl+4gbS9/86dgJ1BRHSD zOIHJyKD+CwGA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) During the build, a native python should be used as these scripts will be invoked during the build, but when installed, they should be a python for the system we're compiling for. * gnu/packages/glib.scm (glib)[arguments]<#:phases>{patch-python-references}: Look up "python" in 'native-inputs', not 'inputs'. (glib)[inputs]{python,python-wrapper,bash-minimal}: New inputs. --- gnu/packages/glib.scm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index f0be2ddaa4..4f40488df8 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2020 Florian Pelz ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020 Arthur Margerit +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -223,14 +224,19 @@ shared NFS home directories.") #t)) ;; Python references are not being patched in patch-phase of build, ;; despite using python-wrapper as input. So we patch them manually. + ;; + ;; These python scripts are both used during build and installed, + ;; so at first, use a python from 'native-inputs', not 'inputs'. When + ;; cross-compiling, the 'patch-shebangs' phase will replace + ;; the native python with a python from 'inputs'. (add-after 'unpack 'patch-python-references - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs #:allow-other-keys) (substitute* '("gio/gdbus-2.0/codegen/gdbus-codegen.in" "glib/gtester-report.in" "gobject/glib-genmarshal.in" "gobject/glib-mkenums.in") (("@PYTHON@") - (string-append (assoc-ref inputs "python") + (string-append (assoc-ref (or native-inputs inputs) "python") "/bin/python" ,(version-major+minor (package-version python))))) @@ -293,6 +299,13 @@ shared NFS home directories.") ("xsltproc" ,libxslt))) (inputs `(("bash-completion" ,bash-completion) + ;; "python", "python-wrapper" and "bash-minimal" + ;; are for the 'patch-shebangs' phase, to make + ;; sure the installed scripts end up with a correct shebang + ;; when cross-compiling. + ("python" ,python) + ("python-wrapper" ,python-wrapper) + ("bash-minimal" ,(canonical-package bash-minimal)) ("dbus" ,dbus) ("libelf" ,libelf))) (propagated-inputs -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:06:11 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:06:11 +0000 Received: from localhost ([127.0.0.1]:60423 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXv-0005en-AI for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:06:11 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59572) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX8-0005Wo-AW for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:25 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Jra; Sat, 19 Jun 2021 17:05:18 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 35/36] cross-base: Fix cross-compiler for i686-linux-gnu. Date: Sat, 19 Jun 2021 17:04:57 +0200 Message-Id: <20210619150458.12057-36-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115118; bh=9fPKxbDGsBGp3i29YCYtxFWs2CsPI2hNipZcOfdyXYU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=M8zcFcbECkIFno2R6il1bCZ6JpSkw9SRmsq5BylO9EVyqfUzKFTeeXHJZuCueDhYn 7aoZLD9wbn9KOV3+wS0B7X7erVJSwEU3CjZ1/RQ+pByox2LHxQkd7zvCBdSUKIO8Nr Wk3ZROXKLDM6zYsE8MoSRnEOueHhElSJnc3Wbyz9I6BLsWCmfV+Bo7oUCGyjCc6XC3 Zt2MlIdEO6GOFJn7lc/O3pICKWH6fHEFkytjOXG2t+lulxUWcDgo4Y+UAXHVKNc6ox s1kT//1+B9lTnVbt74Cyp8BGZlKoFfspwMUGiNfyjpXcdrh+pccHW0LWSJwGn9gtDq h82Nh8pccoosA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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 (-) GCC doesn't find libgcc_s.so anymore and looks in the wrong location. Fix this (well, more a work-around really). * gnu/packages/cross-base.scm (cross-gcc-arguments)<#:configure-flags>: Add --with-toolexecdir, such that libstdc++ ends up in the right place. Add --with-slibdir such that libgcc_s.so end up in the right place. (cross-gcc-arguments)<#:phases>{move-shared-libraries}: New phase, moving libraries in the correct place. Delete .la files, libasan.so and libusan.so to prevent circular references. Likewise, fix a reference in libstdc++.so.VERSION-gdb.py. --- gnu/packages/cross-base.scm | 63 +++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 926b00ccdf..b037edcc24 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2019, 2020, 2021 Marius Bakke ;;; Copyright © 2019 Carl Dong ;;; Copyright © 2020 Mathieu Othacehe +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,6 +34,7 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (srfi srfi-1) @@ -169,9 +171,26 @@ base compiler and using LIBC (which may be either a libc package or #f.)" )) ;; Install cross-built libraries such as libgcc_s.so in - ;; the "lib" output. + ;; the "lib" output. At least for version 8.4.0, GCC + ;; will put libstdc++ in ${toolexecdir}/lib instead. + ;; (A bug?) So set --with-toolexecdir as well. + ,@(if libc - `((string-append "--with-toolexeclibdir=" + `((string-append "--with-toolexecdir=" + (assoc-ref %outputs "lib")) + (string-append "--with-toolexeclibdir=" + (assoc-ref %outputs "lib") + "/" ,target "/lib")) + '()) + ;; At least for GCC 8.0, libgcc_s.so and libstdc++.so + ;; are not installed in the location specified in + ;; --with-toolexeclibdir so GCC will not find it + ;; when cross-compiling, say, GNU Hello. + ;; + ;; Work-around by specifying slibdir. This is not + ;; sufficient, see move-shared-libraries below. + ,@(if (and libc (version>=? (package-version xgcc) "8.0")) + `((string-append "--with-slibdir=" (assoc-ref %outputs "lib") "/" ,target "/lib")) '()) @@ -193,7 +212,45 @@ base compiler and using LIBC (which may be either a libc package or #f.)" ,flags)) flags)) ((#:phases phases) - `(cross-gcc-build-phases ,target ,phases)))))) + (if (and libc (version>=? (package-version xgcc) "8.0")) + #~(modify-phases (cross-gcc-build-phases #$target #$phases) + (add-after 'install 'move-shared-libraries + (lambda _ + (let* ((slib (format #f "~a/~a/lib/" #$output:lib #$target)) + (badlib (format #f "~a/~a/lib/" #$output #$target)) + (libs (map basename (find-files badlib #:fail-on-error? #t)))) + (for-each + (lambda (lib) + (let ((from (string-append badlib lib)) + (to (string-append slib lib))) + (when (file-exists? to) + (error "~a was found twice, refusing to overwrite!" + lib)) + ;; The debugging script libstdc++.so.VERSION-gdb.py has + ;; reference to #$output. Correct it. + (when (string-suffix? "-gdb.py" lib) + (substitute* from + (("libdir = '(.*)'") + (string-append "libdir = '" slib "'"))) + (system* "cat" from)) + ;; The .la files have references to BADLIB, + ;; leading to cyclic references between + ;; the outputs of the package. Remove them + ;; and hope noone notices. + ;; + ;; Likewise, libasan.so.* and libubsan.so.* + ;; have references to #$output. + (if (or (string-suffix? ".la" lib) + (string-prefix? "libasan.so" lib) + (string-prefix? "libubsan.so" lib)) + (delete-file from) + (rename-file from to)))) + libs) + ;; If you have "cyclic references" problems, + ;; uncomment this and use --keep-failed to figure + ;; things out. + (copy-recursively #$output:lib "out-test"))))) + #~(cross-gcc-build-phases #$target #$phases))))))) (define (cross-gcc-patches xgcc target) "Return GCC patches needed for XGCC and TARGET." -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:06:13 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:06:13 +0000 Received: from localhost ([127.0.0.1]:60436 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucXz-0005gC-P3 for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:06:12 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:59590) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX8-0005Wv-FU for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:25 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135Jrh; Sat, 19 Jun 2021 17:05:18 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 36/36] meson: Support cross-compilation. Date: Sat, 19 Jun 2021 17:04:58 +0200 Message-Id: <20210619150458.12057-37-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115118; bh=BiiiHXrcoR1o+MAtefy24iRFe0Zu5Sfgbx0xXcyG2u4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=utLGZxaz5+K6MDWOMaYq884uLXRDm2LDFfzu6z9E9DXhwcGGDqWJQivmgsPtjxCNC OmMABueV/CkoAgfsx+7ubNGP531KDZhA8nLZ7XGsgjcbfyG5RC7gZTuJcJVDLjZC7l dwqRUCCXm+kjeLTlDUebMiysTCh82HIOpAW4rN4lVNqpV0iU5QaGzjLlSr+XLxX5aI 0wiSF9hxEVIRZYPQQGUHBOrAsuH4AU0nv7m39HvS/DT3BRzfusrrLVKzJ/wOM8l1e7 WLWhPbXQ+MDMO+/TuIIEAuw67lmARW4kZeaga3Bb1hwS1Wa0qDMLb/DN9G6AIqNCd9 5PgTk9EFcJZiw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) For cross-compilation, meson needs to be passed a ‘cross file’ with information on the architecture, CPU type, endianness and operating system, and the name of the cross-compiler binaries. The new module (guix build meson-configuration) has some utilities for writing these cross files, used by 'make-cross-file' in a G-exp. The values for the cross file are generated by 'make-machine-alist' and 'make-binaries-alist'. 'make-machine-alist' and 'make-binaries-alist' live on the host side, such that new architectures and operating systems can be added without causing rebuilds for old architectures. Currently, only GNU/Hurd, GNU/Linux, MinGW, x86-32 and x86-64 are supported by 'make-machine-alist'. For other architectures, someone needs to figure out what to use as ‘CPU type’ first. Only i686-linux-gnu has been tested. This has been tested with: $ ./pre-inst-env guix build glib --target=i686-linux-gnu on a x86_64-linux system. ‘If it compiles, it should work.’ * guix/build/meson-configuration.scm (configuration-port): New parameter. (write-section-header): New procedure. (write-assignment): New procedure. (write-assignments): New procedure. * guix/build-system/meson.scm (target-hurd?): New predicate. (make-machine-alist): New procedure. (make-binaries-alist): New procedure. (make-cross-file): New procedure. (meson-cross-build): New procedure. (lower)[build-inputs]: Add standard cross packages when cross-compiling. Do not include regular 'inputs' when cross-compiling. (lower)[host-inputs]: Include 'inputs' when cross-compiling. (lower)[target-inputs]: Add cross packages when cross-compiling. (lower)[build]: Call 'meson-cross-build' instead of 'cross-build' when cross-compiling. (lower)[target]: Set it. (lower)[private-keywords]: Do not remove #:target when cross-compiling. --- Makefile.am | 1 + guix/build-system/meson.scm | 197 ++++++++++++++++++++++++++--- guix/build/meson-configuration.scm | 71 +++++++++++ 3 files changed, 250 insertions(+), 19 deletions(-) create mode 100644 guix/build/meson-configuration.scm diff --git a/Makefile.am b/Makefile.am index f06b294f28..b9e77fd0b7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -234,6 +234,7 @@ MODULES = \ guix/build/emacs-utils.scm \ guix/build/java-utils.scm \ guix/build/lisp-utils.scm \ + guix/build/meson-configuration.scm \ guix/build/maven/java.scm \ guix/build/maven/plugin.scm \ guix/build/maven/pom.scm \ diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm index 5adc0f92c8..1f763af2aa 100644 --- a/guix/build-system/meson.scm +++ b/guix/build-system/meson.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017 Peter Mikkelsen ;;; Copyright © 2018, 2019 Marius Bakke ;;; Copyright © 2021 Ludovic Courtès +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,7 +31,8 @@ #:use-module (guix packages) #:use-module (ice-9 match) #:export (%meson-build-system-modules - meson-build-system)) + meson-build-system + make-cross-file)) ;; Commentary: ;; @@ -40,6 +42,62 @@ ;; ;; Code: +(define (target-hurd? triplet) + (and (string-suffix? "-gnu" triplet) + (not (string-contains triplet "linux")))) + +(define (make-machine-alist triplet) + "Make an association list describing what should go into +the ‘host_machine’ section of the cross file when cross-compiling +for TRIPLET." + `((system . ,(cond ((target-hurd? triplet) "gnu") + ((target-linux? triplet) "linux") + ((target-mingw? triplet) "windows") + (#t (error "meson: unknown operating system")))) + (cpu_family . ,(cond ((target-x86-32? triplet) "x86") + ((target-x86-64? triplet) "x86_64") + ((target-arm32? triplet) "arm") + ((target-aarch64? triplet) "aarch64") + ((target-powerpc? triplet) + (if (target-64bit? triplet) + "ppc64" + "ppc")) + (#t (error "meson: unknown architecture")))) + (cpu . ,(cond ((target-x86-32? triplet) ; i386, ..., i686 + (substring triplet 0 4)) + ((target-x86-64? triplet) "x86_64") + (#t (error "meson: unknown CPU")))) + (endian . ,(cond ((string-prefix? "powerpc64le-" triplet) "little") + ((string-prefix? "mips64el-" triplet) "little") + ((target-x86-32? triplet) "little") + ((target-x86-64? triplet) "little") + (#t (error "meson: unknown architecture")))))) + +(define (make-binaries-alist triplet) + "Make an associatoin list describing what should go into +the ‘binaries’ section of the cross file when cross-compiling for +TRIPLET." + `((c . ,(cc-for-target triplet)) + (cpp . ,(cxx-for-target triplet)) + (pkgconfig . ,(pkg-config-for-target triplet)) + (objcopy . ,(string-append triplet "-objcopy")) + (ar . ,(string-append triplet "-ar")) + (ld . ,(string-append triplet "-ld")) + (strip . ,(string-append triplet "-strip")))) + +(define (make-cross-file triplet) + (computed-file "cross-file" + (with-imported-modules '((guix build meson-configuration)) + #~(begin + (use-modules (guix build meson-configuration)) + (call-with-output-file #$output + (lambda (f) + (parameterize ((configuration-port f)) + (write-section-header "host_machine") + (write-assignments '#$(make-machine-alist triplet)) + (write-section-header "binaries") + (write-assignments '#$(make-binaries-alist triplet))))))))) + (define %meson-build-system-modules ;; Build-side modules imported by default. `((guix build meson-build-system) @@ -68,24 +126,34 @@ #:rest arguments) "Return a bag for NAME." (define private-keywords - `(#:meson #:ninja #:inputs #:native-inputs #:outputs #:target)) - - (and (not target) ;; TODO: add support for cross-compilation. - (bag - (name name) - (system system) - (build-inputs `(("meson" ,meson) - ("ninja" ,ninja) - ,@native-inputs - ,@inputs - ;; Keep the standard inputs of 'gnu-build-system'. - ,@(standard-packages))) - (host-inputs (if source - `(("source" ,source)) - '())) - (outputs outputs) - (build meson-build) - (arguments (strip-keyword-arguments private-keywords arguments))))) + `(#:meson #:ninja #:inputs #:native-inputs #:outputs + ,@(if target + '() + '(#:target)))) + + (bag + (name name) + (system system) (target target) + (build-inputs `(("meson" ,meson) + ("ninja" ,ninja) + ,@native-inputs + ,@(if target '() inputs) + ;; Keep the standard inputs of 'gnu-build-system'. + ,@(if target + (standard-cross-packages target 'host) + '()) + ,@(standard-packages))) + (host-inputs `(,@(if source + `(("source" ,source)) + '()) + ,@(if target inputs '()))) + ;; Keep the standard inputs of 'gnu-buid-system'. + (target-inputs (if target + (standard-cross-packages target 'target) + '())) + (outputs outputs) + (build (if target meson-cross-build meson-build)) + (arguments (strip-keyword-arguments private-keywords arguments)))) (define* (meson-build name inputs #:key @@ -161,6 +229,97 @@ has a 'meson.build' file." #:disallowed-references disallowed-references #:guile-for-build guile))) +(define* (meson-cross-build name + #:key + target + build-inputs host-inputs target-inputs + guile source + (outputs '("out")) + (configure-flags ''()) + (search-paths '()) + (native-search-paths '()) + + (build-type "debugoptimized") + (tests? #f) + (test-target "test") + (glib-or-gtk? #f) + (parallel-build? #t) + (parallel-tests? #f) + (validate-runpath? #t) + (patch-shebangs? #t) + (strip-binaries? #t) + (strip-flags ''("--strip-debug")) + (strip-directories ''("lib" "lib64" "libexec" + "bin" "sbin")) + (elf-directories ''("lib" "lib64" "libexec" + "bin" "sbin")) + (phases '%standard-phases) + (system (%current-system)) + (imported-modules %meson-build-system-modules) + (modules '((guix build meson-build-system) + (guix build utils))) + allowed-references + disallowed-references) + "Cross-build SOURCE for TARGET using MESON, and with INPUTS, assuming that +SOURCE has a 'meson.build' file." + (define cross-file + (make-cross-file target)) + (define inputs + (if (null? target-inputs) + (input-tuples->gexp host-inputs) + #~(append #$(input-tuples->gexp host-inputs) + #+(input-tuples->gexp target-inputs)))) + (define builder + (with-imported-modules imported-modules + #~(begin + (use-modules #$@(sexp->gexp modules)) + + (define build-phases + #$(let ((phases (if (pair? phases) (sexp->gexp phases) phases))) + (if glib-or-gtk? + phases + #~(modify-phases #$phases + (delete 'glib-or-gtk-compile-schemas) + (delete 'glib-or-gtk-wrap))))) + + ;; Do not use 'with-build-variables', as there should be + ;; no reason to use %build-inputs and friends. + (meson-build #:source #+source + #:system #$system + #:outputs #$(outputs->gexp outputs) + #:inputs #$inputs + #:native-inputs #+(input-tuples->gexp build-inputs) + #:search-paths '#$(sexp->gexp + (map search-path-specification->sexp + search-paths)) + #:native-search-paths '#$(sexp->gexp + (map search-path-specification->sexp + native-search-paths)) + #:phases build-phases + #:configure-flags `("--cross-file" #+cross-file + ,@#$(sexp->gexp configure-flags)) + #:build-type #$build-type + #:tests? #$tests? + #:test-target #$test-target + #:parallel-build? #$parallel-build? + #:parallel-tests? #$parallel-tests? + #:validate-runpath? #$validate-runpath? + #:patch-shebangs? #$patch-shebangs? + #:strip-binaries? #$strip-binaries? + #:strip-flags #$(sexp->gexp strip-flags) + #:strip-directories #$(sexp->gexp strip-directories) + #:elf-directories #$(sexp->gexp elf-directories))))) + + (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) + system #:graft? #f))) + (gexp->derivation name builder + #:system system + #:target target + #:substitutable? substitutable? + #:allowed-references allowed-references + #:disallowed-references disallowed-references + #:guile-for-build guile))) + (define meson-build-system (build-system (name 'meson) diff --git a/guix/build/meson-configuration.scm b/guix/build/meson-configuration.scm new file mode 100644 index 0000000000..81b4eaa7e1 --- /dev/null +++ b/guix/build/meson-configuration.scm @@ -0,0 +1,71 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Maxime Devos +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix build meson-configuration) + #:use-module (ice-9 match) + #:export (write-section-header write-assignment + write-assignments make-machine-alist + configuration-port)) + +;; Commentary: +;; +;; Utilities for generating a ‘Cross build definition file’ for +;; the Meson build system. Configuration values are currently +;; never escaped. In practice this is unlikely to be a problem +;; in the build environment. +;; +;; Code: + +(define configuration-port + (fluid->parameter (make-unbound-fluid))) + +(define (write-section-header section-name) + "Write a section header for section named SECTION-NAME +to the configuration port." + (format (configuration-port) "[~a]~%" section-name)) + +(define (write-assignment key value) + "Write an assignment of VALUE to KEY to the configuration +port. VALUE must be a string (without any special characters +such as quotes), a boolean or an integer. Lists are currently +not supported" + (define port (configuration-port)) + (match value + ((? string?) + (format port "~a = '~a'~%" key value)) + ((? integer?) + (format port "~a = ~a~%" key value)) + (#f + (format port "~a = true~%" key)) + (#t + (format port "~a = false~%" key)))) + +(define* (write-assignments alist) + "Write the assignments in ALIST, an association list, +to the configuration port." + (for-each (match-lambda + ((key . value) + (write-assignment key value))) + alist)) + +(define* (make-machine-alist #:key system cpu-family cpu endian) + "Make an association list for the [host_machine] section." + `((system . ,system) + (cpu-family . ,cpu-family) + (cpu . ,cpu) + (endian . ,endian))) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 19 11:06:13 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jun 2021 15:06:13 +0000 Received: from localhost ([127.0.0.1]:60439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucY1-0005gV-0h for submit@debbugs.gnu.org; Sat, 19 Jun 2021 11:06:13 -0400 Received: from newton.telenet-ops.be ([195.130.132.45]:60294) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lucX8-0005Xr-Ez for 49025@debbugs.gnu.org; Sat, 19 Jun 2021 11:05:31 -0400 Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) by newton.telenet-ops.be (Postfix) with ESMTPS id 4G6fH205PpzMqsJd for <49025@debbugs.gnu.org>; Sat, 19 Jun 2021 17:05:18 +0200 (CEST) Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id K3552500S0mfAB40135HrV; Sat, 19 Jun 2021 17:05:17 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v4 core-updates 34/36] libelf: Use the cross-compiler when cross-compiling. Date: Sat, 19 Jun 2021 17:04:56 +0200 Message-Id: <20210619150458.12057-35-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1624115118; bh=RWokKCzoehfrSlcLNti6dqTDx97owvOxCcB16lv8MSw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=AVUlWDEVfakDilOV9svovNxfI6Cz432e8fRsO+WNXO2uPFjXI6v0VfYjoWFCUTDe9 5QE6U7p/3hRLGSbs0+fDZOS0MLW9PTQwgP9jimUV470V75ktd1BWB40HHyg5VMt3bS xVpqyt940EmhegmPI2Th0cHrT2UVRfltjo5e9qE54N6K7aVFIbQp52lqIkjRgTUQ4A a8hhiOo/5rckf9ae3+bmgG9go9qmBILEAlEyO1pz3LhhF+pCp9Lm8ovu99vkZr2UQm fIBqbQsnv9Um1hp535lUi8Dnb6gtGEEGpuxO2advS+KTmuJQVGmkffASl4InoSBmMo TKT9WuO/AjDPQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org, Maxime Devos 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.7 (-) * gnu/packages/elf.scm (libelf)[arguments]<#:phases>{delete-configure}: Regenerate the configure script when cross-compiling. (libelf)[arguments]<#:phases>{configure}: Do not replace when cross-compiling. (libelf)[native-inputs]: Add autoconf when cross-compiling. --- gnu/packages/elf.scm | 48 +++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index 0309dd95b5..66c2334e5c 100644 --- a/gnu/packages/elf.scm +++ b/gnu/packages/elf.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2020 Mark Wielaard ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2021 Leo Le Bouter +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -32,6 +33,7 @@ #:use-module (guix build-system gnu) #:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+)) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages compression) #:use-module (gnu packages documentation) #:use-module (gnu packages gcc) @@ -205,22 +207,36 @@ static analysis of the ELF binaries at hand.") (arguments `(#:phases (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - ;; This old `configure' script doesn't support - ;; variables passed as arguments. - (let ((out (assoc-ref outputs "out"))) - (setenv "CONFIG_SHELL" (which "bash")) - (invoke "./configure" - (string-append "--prefix=" out) - ,@(if (string=? "powerpc64le-linux" - (%current-system)) - '("--host=powerpc64le-unknown-linux-gnu") - '()) - ,@(if (string=? "aarch64-linux" - (%current-system)) - '("--host=aarch64-unknown-linux-gnu") - '())))))))) + ,(if (%current-target-system) + ;; This old 'configure' script doesn't + ;; support cross-compilation well. E.g., it fails + ;; to find the cross-compiler. + `(add-before 'bootstrap 'delete-configure + (lambda _ + (delete-file "configure"))) + `(replace 'configure + ;; This old `configure' script doesn't support + ;; variables passed as arguments. TODO: would + ;; simply regenerating 'configure' work + ;; well enough, even if compiling natively + ;; on powerpc or aarch64? + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (setenv "CONFIG_SHELL" (which "bash")) + (invoke "./configure" + (string-append "--prefix=" out) + ,@(if (string=? "powerpc64le-linux" + (%current-system)) + '("--host=powerpc64le-unknown-linux-gnu") + '()) + ,@(if (string=? "aarch64-linux" + (%current-system)) + '("--host=aarch64-unknown-linux-gnu") + '()))))))))) + (native-inputs + (if (%current-target-system) + `(("autoconf" ,autoconf)) + '())) (home-page (string-append "https://web.archive.org/web/20181111033959/" "http://www.mr511.de/software/english.html")) (synopsis "ELF object file access library") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 03 11:48:43 2021 Received: (at 49025) by debbugs.gnu.org; 3 Jul 2021 15:48:43 +0000 Received: from localhost ([127.0.0.1]:39695 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzhsd-0002YC-AK for submit@debbugs.gnu.org; Sat, 03 Jul 2021 11:48:43 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:35710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzhsa-0002Y2-E3 for 49025@debbugs.gnu.org; Sat, 03 Jul 2021 11:48:30 -0400 Received: from butterfly.local ([188.189.167.54]) by andre.telenet-ops.be with bizsmtp id QfoS250021AlBsU01foSoz; Sat, 03 Jul 2021 17:48:26 +0200 Message-ID: <74b98d853cc36f38089c59a9591bba9609664d58.camel@telenet.be> Subject: Re: [PATCH v4 core-updates 22/36] openssl: Extract logic for computing CONFIGURE_TARGET_ARCH. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Sat, 03 Jul 2021 17:47:43 +0200 In-Reply-To: <20210619150458.12057-23-maximedevos@telenet.be> References: <20210619150458.12057-1-maximedevos@telenet.be> <20210619150458.12057-23-maximedevos@telenet.be> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-hkJRGDqkblotxZ26ZTlY" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1625327306; bh=/GgQSkImIv97m/8qXvp6ukBA3Va7lUnVVRScnPnhMUw=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=PBG45t+g2OuPHkAIDJhw+lH4tF5G0B78OLnS9SC63iry8ETVGndxalG71o9TLcAxw f/zUnQlSz1tFo9UxdeCFi0Ff9qt+tFjhxDiPAOUPpKqRnSA2ODuwAs1vryiRxMWPpY aNfD3IkXOYXD18iRinRMbKjI9h6OAJrm3ZShbPR1cucmn//lW90pNbiGhgRoPvY1br NvW8bmvute5OLd1vp3bXbG6yH4Lm+169kqpR8BnoXmkfvB7rL70XuBpuuigHdZFZVX 6fOnccMiRtjc3UWhAc+0fuC2e/EQug+1UOBXFraAC99L6ScRNcqkD0I4/8cBGotfjs QOgA9mdrO33KQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: othacehe@gnu.org 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 (-) --=-hkJRGDqkblotxZ26ZTlY Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Maxime Devos schreef op za 19-06-2021 om 17:04 [+0200]: > By computing this value outside the build code, new targets > can be added without causing rebuilds for other targets. >=20 > [...] > +(define (target->openssl-target target) > + "Return the value to set CONFIGURE_TARGET_ARCH to when cross-compiling > +OpenSSL for TARGET." > + ;; Keep this code outside the build code, > + ;; such that new targets can be added > + ;; without causing rebuilds for other targets. > + (cond ((string-prefix? "i586" target) > + "hurd-x86") For example, this should really be (and (hurd-target? target) (target-x86?)) (or was it x86-32?), such that i686-pc-gnu would be recognised as a hurd-x86 target, aarch64-pc-gnu isn't (ok the Hurd doesn't support aarch64), and i586-linux-gnu would be recognised as GNU/Linux, not GNU/Hurd? > + ((string-prefix? "i686" target) > + "linux-x86") [...] Similar reasoning as above. This can be fixed later though (without going through any rebuilds for supported triplets). Greetings, Maxime. --=-hkJRGDqkblotxZ26ZTlY 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+4iGRcl7gUCYOCGnxccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sBSAPsHsCXgKntITO6DaijPqFMqsU4L qvkVjdBr6v3nXmhlTQEA6igJfeNo31fhPCI2kCcBKeowkFmsTUX+E3aq6cGUAws= =9i5s -----END PGP SIGNATURE----- --=-hkJRGDqkblotxZ26ZTlY-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jul 08 09:07:42 2021 Received: (at 49025) by debbugs.gnu.org; 8 Jul 2021 13:07:42 +0000 Received: from localhost ([127.0.0.1]:54659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1Tkk-0000Ah-3Y for submit@debbugs.gnu.org; Thu, 08 Jul 2021 09:07:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1Tkg-0000AT-OX for 49025@debbugs.gnu.org; Thu, 08 Jul 2021 09:07:41 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36888) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1Tka-0008Ls-W3; Thu, 08 Jul 2021 09:07:33 -0400 Received: from [2a01:cb18:832e:5f00:3563:417e:2a38:86d8] (port=43492 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1Tka-0002D8-Kk; Thu, 08 Jul 2021 09:07:32 -0400 From: Mathieu Othacehe To: Maxime Devos Subject: Re: bug#49025: [PATCH core-updates 00/37] Support cross-compilation with meson References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210619150458.12057-1-maximedevos@telenet.be> Date: Thu, 08 Jul 2021 15:07:31 +0200 In-Reply-To: <20210619150458.12057-1-maximedevos@telenet.be> (Maxime Devos's message of "Sat, 19 Jun 2021 17:04:22 +0200") Message-ID: <87k0m1vtrg.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49025 Cc: 49025@debbugs.gnu.org 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 (---) Hello Maxime, > This is the same as v1 (v2 and v3 are the same as v1 but the sending > was messed up), but with merge conflicts resolved. Also, one > patch of v1 is already on core-updates, so it is dropped here. It seems that some patches of this series are a bit outdated since: - %build-inputs have been re-introduced when cross-compiling with 8a4830231871c578c80523e973ecd85f1f596ba6. - Cross-compilation with GCC is in a much better shape since Ludo fix avalanche on core-updates. Do you think you could send an updated series? Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:47:57 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:47:57 +0000 Received: from localhost ([127.0.0.1]:34001 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwC-0006xs-OD for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:47:57 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2Xw7-0006xg-MK for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:47:55 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01nnpot; Sun, 11 Jul 2021 13:47:50 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 00/20] Support cross-compilation with Meson Date: Sun, 11 Jul 2021 13:47:03 +0200 Message-Id: <20210711114723.27568-1-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004070; bh=dz6LuoAjVF1DERjNEUGTe2Mk1xt7JdshQ2yr/WU4oag=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=pZHVxGrTY4GKw4DreImkNah/whDXaLmALwDuBU2Vh3h9gl6M0KWgBC18rmCybpV7R rtTs7c0psYsEgll2loSVp6U2NAhWVuJmmJcEvEFhnycHoMkNxzLRBK0LWgzNPYNiv7 RKNoosLDfeJ40BWzgYIsDuo+GIl25fDgVhSlvLa/ENRqdA2RlJLWXYZpeU75IPkf54 8kMSkxjZBy+scJAQQnO8CBjICluruw4B3xvKWAq81MaB12REshFUMzQjt7uyceB03p Oy57ZERcmHhe78dHnGAqnQziBsFpNe5yRyK5Q6FXBs82oJHFatPMILfKc2+2b83QdM VYSbxUsE5om6A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) The following changes were made since the v4: * As %build-inputs has been re-introduced when cross-compiling, I have removed the patches replacing (assoc-ref %build-inputs ...) with G-exp machinery. (Packages: net-base, libgcrypt, wrap-python3, openssl, readline, fontconfig, bash) * The cross-compilation fixes for libelf were simplified by always regenerating the 'configure' script and updating 'config.guess' and 'config.sub'. * I modified 'make-machine-alist' such that it recognises the 'aarch64' architecture. Meson also wants a 'CPU type', so I choosed 'armv8-a'. Not sure if that's always correct, but ‘1.2 GNU Distribution’ notes: ‘Packages are currently available on the following platforms: [...] aarch64-linux: little-endian 64 ARMv8-A processors, [..]’ so it should be good for supported targets in Guix at least. * I removed the usage of 'canonical-package' in the inputs of 'glib'. Apparently, canonical packages are not supposed to appear in the reference graph (). Maxime Devos (20): utils: Define target-linux? predicate. utils: Define a target-x86-32? and target-x86-64? predicate. packages: Define this-package-input and this-package-native-input. net-base: Don't cross-compile. tzdata: Don't bother with cross-compiling. libgpg-error: Remove trailing #f from phases. libgpg-error: Prevent silent miscompilation some systems. libgpg-error: Fix cross-compilation error. python: Fix reference to input when cross-compiling. openssl: Remove trailing #t from phases. openssl: Make the #:phases argument a G-expression. openssl: Use G-exp machinery for referring to outputs. openssl: Move documentation instead of copying and deleting it. openssl: Move all man pages to separate output, not only man3. openssl: Extract logic for computing CONFIGURE_TARGET_ARCH. glib: Use a correct python in scripts when cross-compiling. glib: Verify the cross-compiled python is used in installed scripts. glib: Look up "tzdata" in 'native-inputs', not 'inputs'. libelf: Update configure script and config.guess and config.sub. meson: Support cross-compilation. Makefile.am | 1 + gnu/packages/admin.scm | 5 + gnu/packages/base.scm | 9 ++ gnu/packages/elf.scm | 44 ++++--- gnu/packages/glib.scm | 34 ++++- gnu/packages/gnupg.scm | 48 ++++--- gnu/packages/python.scm | 5 +- gnu/packages/tls.scm | 136 +++++++++---------- guix/build-system/meson.scm | 201 ++++++++++++++++++++++++++--- guix/build/meson-configuration.scm | 71 ++++++++++ guix/packages.scm | 29 +++++ guix/utils.scm | 26 ++++ tests/packages.scm | 34 +++++ tests/utils.scm | 40 ++++++ 14 files changed, 561 insertions(+), 122 deletions(-) create mode 100644 guix/build/meson-configuration.scm -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:04 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:05 +0000 Received: from localhost ([127.0.0.1]:34022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwK-0006z6-2t for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:04 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwH-0006y4-HA for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:02 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no0r2; Sun, 11 Jul 2021 13:48:00 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 02/20] utils: Define a target-x86-32? and target-x86-64? predicate. Date: Sun, 11 Jul 2021 13:47:05 +0200 Message-Id: <20210711114723.27568-3-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004080; bh=lf5YV93HuGoFIHD1h6x01QuYB2H0sCsCvf+MhMqf3Ic=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OEYLruNOj0JR9cguKaPzvCYBvZ6fMewVwuBF/wVADMAClkMJNhO2iSFJ3Oi4gIl8Z T+oaxcBG3p5w+eTgXKUj8b/F3sUj2xL8690ZdhOiDu+5+BsHGxiVCGXZ2DHTWYcLsF XnEE0FdqrYiM1h1DkD7bJrS/qrpIjZ1I6417FW57S5lo3Lfp7cBYHUbyqKBmkhiNk/ lTUvbqjIJN67OXesIsVdLzRmRKO0evnvLa8WF4gMysnec/SvQXOo9+lqqpc6Qsi3XU ASj/7ejFgKNtZ8K5g1OjdmMBWDY4ZtS/LVC9u2e/QYlP0P2MD77beSexBvCRBuDf2g ZpJQVpfP9vGhw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) * guix/utils.scm (target-x86-32?, target-x86-64?): New predicates. * tests/utils.scm ("target-x86-32?", "target-x86-64?"): New tests. --- guix/utils.scm | 20 ++++++++++++++++++++ tests/utils.scm | 23 +++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index 4ff2602e23..2256ea2ca6 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -84,6 +84,8 @@ package-name->name+version target-linux? target-mingw? + target-x86-32? + target-x86-64? target-arm32? target-aarch64? target-arm? @@ -553,6 +555,24 @@ a character other than '@'." (and target (string-suffix? "-mingw32" target))) +(define* (target-x86-32? #:optional (target (or (%current-target-system) + (%current-system)))) + "Is the architecture of TARGET a variant of Intel's 32-bit architecture +(IA32)?" + ;; Intel also has a 16-bit architecture in the iN86 series, i286 + ;; (see, e.g. https://en.wikipedia.org/wiki/Intel/808286) so this + ;; procedure is not named target-x86?. + (or (string-prefix? "i386-" target) + (string-prefix? "i486-" target) + (string-prefix? "i586-" target) + (string-prefix? "i686-" target))) + +(define* (target-x86-64? #:optional (target (or (%current-target-system) + (%current-system)))) + "Is the architecture of TARGET a variant of Intel/AMD's 64-bit +architecture (x86_64)?" + (string-prefix? "x86_64-" target)) + (define* (target-arm32? #:optional (target (or (%current-target-system) (%current-system)))) (string-prefix? "arm" target)) diff --git a/tests/utils.scm b/tests/utils.scm index 80a0e669a4..92439b5587 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -306,6 +306,29 @@ skip these tests." '("i686-linux-gnu" "i686-pc-gnu" "i686-w64-mingw32"))) +(test-equal "target-x86-32?" + '(#f #f #f #t #t #t #t #f) + ;; These are (according to Wikipedia) two RISC architectures + ;; by Intel and presumably not compatible with the x86-32 series. + (map target-x86-32? + '("i860-gnu" "i960-gnu" + ;; This is a 16-bit architecture + "i286-gnu" + ;; These are part of the x86-32 series. + "i386-gnu" "i486-gnu" "i586-gnu" "i686-gnu" + ;; Maybe this one will exist some day, but not yet. + "i786-gnu"))) + +(test-equal "target-x86-64?" + '(#t #f #f #f) + (map target-x86-64? + `("x86_64-linux-gnu" "i386-linux-gnu" + ;; Just because it includes "64" doesn't make it 64-bit. + "aarch64-linux-gnu" + ;; Note that (expt 2 109) in decimal notation starts with 64. + ;; However, it isn't 32-bit. + ,(format #f "x86_~a-linux-gnu" (expt 2 109))))) + (test-end) (false-if-exception (delete-file temp-file)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:11 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:11 +0000 Received: from localhost ([127.0.0.1]:34028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwK-0006zN-RP for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:11 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwG-0006xg-Q4 for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:02 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no0qv; Sun, 11 Jul 2021 13:48:00 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 01/20] utils: Define target-linux? predicate. Date: Sun, 11 Jul 2021 13:47:04 +0200 Message-Id: <20210711114723.27568-2-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004080; bh=KuxsCFQnj4ZbArXRFEqUpWBp+xjAPFA4gW0yO+6p0Uk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Jj7lYcNn1kDwmugZC6ybH1uLrzaQ5JNVDst8WsVEFIXv3aBZO/lCGpeE/2Bjq1TY/ WS5JnRyJkDiYl+MCg1Vs5myGcSzmL2t0OLm8mp0OsSBjJpL82NkVraVdD25pwYJCto d4WK9Jz338H2S8bkUqHM2cMEQJwHoXelmbk/4YlbIApYrEljBJGDq/iEAqNSkm939y yATiNp/+BplA4DUt/yWTyFJqCODBra2nSLgRZD9BEmkJikQUOSmO3JKOrQF1lcG4Rm nrJGYVihweC+J+SwkAqV15hPa9kWMptWnv232ev0xUFzFWyx5/2kN6eU302WEZ6M2B NiyAbQgMQELow== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) * guix/utils.scm (target-linux?): New predicate. * tests/utils.scm ("target-linux?"): Test it. ("target-mingw?"): Also test ‘target-mingw?’. --- guix/utils.scm | 6 ++++++ tests/utils.scm | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index 19990ceb8a..4ff2602e23 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2020 Maxim Cournoyer ;;; Copyright © 2021 Simon Tournier ;;; Copyright © 2021 Chris Marusich +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -81,6 +82,7 @@ %current-system %current-target-system package-name->name+version + target-linux? target-mingw? target-arm32? target-aarch64? @@ -543,6 +545,10 @@ a character other than '@'." (idx (values (substring spec 0 idx) (substring spec (1+ idx)))))) +(define* (target-linux? #:optional (target (or (%current-target-system) + (%current-system)))) + (string-contains target "linux")) + (define* (target-mingw? #:optional (target (%current-target-system))) (and target (string-suffix? "-mingw32" target))) diff --git a/tests/utils.scm b/tests/utils.scm index 7fcbb25552..80a0e669a4 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2016 Mathieu Lirzin ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -289,6 +290,22 @@ skip these tests." (string-closest "hello" '("kikoo" "helo" "hihihi" "halo")) (string-closest "hello" '("aaaaa" "12345" "hellohello" "h")))) +(test-equal "target-linux?" + '(#t #f #f #t) + (map (compose ->bool target-linux?) + '("i686-linux-gnu" "i686-w64-mingw32" + ;; Checking that "gnu" is present is not sufficient, + ;; as GNU/Hurd exists. + "i686-pc-gnu" + ;; Some targets have a suffix. + "arm-linux-gnueabihf"))) + +(test-equal "target-mingw?" + '(#f #f #t) + (map (compose ->bool target-mingw?) + '("i686-linux-gnu" "i686-pc-gnu" + "i686-w64-mingw32"))) + (test-end) (false-if-exception (delete-file temp-file)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:12 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:12 +0000 Received: from localhost ([127.0.0.1]:34048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwR-00070O-Kx for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:12 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwH-0006y5-U1 for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:02 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no0r9; Sun, 11 Jul 2021 13:48:01 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 03/20] packages: Define this-package-input and this-package-native-input. Date: Sun, 11 Jul 2021 13:47:06 +0200 Message-Id: <20210711114723.27568-4-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004081; bh=+F3V0IHIUMToVYJ2+Q+SGOqXx5CD1I8U9LvkAPCAvXY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FDowmsgA55Tjl5zgh+vaig9kgxjtJIcN3xGFoo41K2rYknEvLeFTW9GBimVeSCKWS tegTmR9R1W1mw52Oh3rgkjVnFYeofWi7CirRa7ueFDsGuN6QMDkY9gezjcnJlYkl4f PPuYsAqXik97+9O7yFB81horckZ1MmCK/Dw+/pNAsj4tE3Ths/Qwr9+POYTyU1buCy Eu7kFI79YjFozj2TasLrIKKETzMBpQLeNRGcs99uWl0bhytBvesAEhK8GAlrbMxSDT GYdVTkZakRMloPP+c8sbhWyvv/7m/LKh2lM9fYiX8ESE6dfHKQ1ikHQ1IhabOQcq6C RC9RXLQD6Owbg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) These macros are intended to be used in build phases. More precisely, (assoc-ref %build-inputs "input") can be replaced by #$(this-package-input "input") or #+(this-package-native-input "native-input") as appropriate. * guix/packages.scm (package-input, package-native-input): New (unexported) procedures. (this-package-input, this-package-native-input): New macros. --- guix/packages.scm | 29 +++++++++++++++++++++++++++++ tests/packages.scm | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/guix/packages.scm b/guix/packages.scm index 3ba61b42c9..56300e6b61 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -108,6 +108,9 @@ deprecated-package package-field-location + this-package-input + this-package-native-input + package-direct-sources package-transitive-sources package-direct-inputs @@ -513,6 +516,32 @@ object." #f))) (_ #f))) +(define (package-input package name) + "Return the package input NAME of PACKAGE--i.e., an input +from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not +considered. If this input does not exist, return #f instead." + (and=> (or (assoc-ref (package-inputs package) name) + (assoc-ref (package-propagated-inputs package) name)) + car)) + +(define (package-native-input package name) + "Return the native package input NAME of PACKAGE--i.e., an input +from the ‘native-inputs’ field. If this native input does not exist, +return #f instead." + (and=> (assoc-ref (package-native-inputs package) name) + car)) + +(define-syntax-rule (this-package-input name) + "Return the input NAME of the package being defined--i.e., an input +from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not +considered. If this input does not exist, return #f instead." + (package-input this-package name)) + +(define-syntax-rule (this-package-native-input name) + "Return the native package input NAME of the package being defined--i.e., +an input from the ‘native-inputs’ field. If this native input does not +exist, return #f instead." + (package-native-input this-package name)) ;; Error conditions. diff --git a/tests/packages.scm b/tests/packages.scm index 47fc34d3ce..9814015a05 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -1866,6 +1867,39 @@ (package-location (specification->package "guile@2")) (specification->location "guile@2")) +(test-eq "this-package-input, exists" + hello + (package-arguments + (dummy-package "a" + (inputs `(("hello" ,hello))) + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-input, exists in propagated-inputs" + hello + (package-arguments + (dummy-package "a" + (propagated-inputs `(("hello" ,hello))) + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-input, does not exist" + #f + (package-arguments + (dummy-package "a" + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-native-input, exists" + hello + (package-arguments + (dummy-package "a" + (native-inputs `(("hello" ,hello))) + (arguments (this-package-native-input "hello"))))) + +(test-eq "this-package-native-input, does not exists" + #f + (package-arguments + (dummy-package "a" + (arguments (this-package-native-input "hello"))))) + (test-end "packages") ;;; Local Variables: -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:12 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:12 +0000 Received: from localhost ([127.0.0.1]:34050 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwS-00070X-5n for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:12 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwI-0006yC-9P for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:03 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no1rE; Sun, 11 Jul 2021 13:48:01 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 04/20] net-base: Don't cross-compile. Date: Sun, 11 Jul 2021 13:47:07 +0200 Message-Id: <20210711114723.27568-5-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004081; bh=dXo/CT5ws9YCjb4KyPL/cL4A6QUuDtlcTxOVUdW0BV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=GeaQknRVy7huMHYXUhVMK+MO0Vxjl3BdkzkTFrko1S+DZB0EJAUXRGcz47ZaDHsXc xWIty8m/W/L7CdFkUDUa/pCDQgXFQfGzk1bzkeTM+stP1I+q28RnhR9WrGcc6bueMD vBeX8p8Vo6o7eVZqS9huXeu9VXXx2jDEf5+LRLn60slFLZxns4a4uN2jkSIQP2JpXF 1602FpUUII87iPsBex4U2Zx6lR1to7NfHzp6RCcCQI5+RPus0zP+XORPrQGnmvfPup Vrji6p7Oe1rHGjQ5x/6EKQ7jrRGdmsXBz1cBg2e9FJjoGquyFj7JRN89qzjJhx48WP OA36m5ikvqMKg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) net-base is pure data, so cross-compiling is pointless. * gnu/packages/admin.scm (net-base)[arguments]<#:target>: Set to #f. (net-base)[arguments]<#:allowed-references>: Disallow all references. --- gnu/packages/admin.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index aab62331a3..394575ffec 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -937,6 +937,11 @@ to allow automatic login and starting any app.") (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) + ;; This package consists solely of architecture-independent + ;; tables. Cross-compilation is pointless! Make sure we'll + ;; always get the same derivation. + #:target #f + #:allowed-references () #:builder (begin (use-modules (guix build utils) (srfi srfi-26)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:12 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:13 +0000 Received: from localhost ([127.0.0.1]:34052 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwS-00070e-Gb for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:12 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwI-0006y4-Lw for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:03 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no2rW; Sun, 11 Jul 2021 13:48:02 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 06/20] libgpg-error: Remove trailing #f from phases. Date: Sun, 11 Jul 2021 13:47:09 +0200 Message-Id: <20210711114723.27568-7-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004082; bh=rN441zyK8WHq8KGxpb4NN+FKMHbVY0resArbEcsKgRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KjQyXuctqyI13BwD7hPL9ZX4852AhoO7zwQ+33dVF7X33FzYZBAJQX7dP7erRMwl/ TlM/CPx265Lx833iYWczUNw4JUw0tpUgnRT1PDqKf0PPXd4A4o3+7Gc0fKJ4AqLuFo npZ9uIHNRMW/7siWXZnHxsZG2UM8mY2p2B2SBBDY1uACI+YXlEBgsb5BAwGDiWTikM jZEh4l/X3/7toLTpPMl0tQFLpwe5zdm1r6DUkRutOEJ3fuhKXvWKZniPIlClEVRGMT dBqCObUZIaa7ubSEcf9DnCFTqnTXYASAwvO1QQF8/i4e6i0OouLd8OF48EsA60YKfp zylMWvIiKVozw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) These aren't required anymore. * gnu/packages/gnupg.scm (libgpgerror)[arguments]{cross-symlinks}: Remove trailing #f. --- gnu/packages/gnupg.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index a6ec75765c..5c0d03927e 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -114,8 +114,7 @@ (string-append x "-unknown-linux-gnu"))))) (symlink (string-append "lock-obj-pub." triplet ".h") - "src/syscfg/lock-obj-pub.linux-gnu.h")) - #t)))) + "src/syscfg/lock-obj-pub.linux-gnu.h")))))) '())) (native-inputs `(("gettext" ,gettext-minimal))) (home-page "https://gnupg.org") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:13 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:13 +0000 Received: from localhost ([127.0.0.1]:34054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwS-00070l-Sp for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:13 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwI-0006yM-Kg for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:03 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no1rL; Sun, 11 Jul 2021 13:48:01 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 05/20] tzdata: Don't bother with cross-compiling. Date: Sun, 11 Jul 2021 13:47:08 +0200 Message-Id: <20210711114723.27568-6-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004081; bh=Cmu09yDer4DaeEBMYUMihlI6CWPn3E1bzKVUj0Wn+SU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gIYKK847T5SKgGEOPgOtT3XeFpHbqyTp74Ef8t4QtsaA6dlfIsBi43QLtRAV1pIgh ckEthmMV20Mw8Bkf40JYr5UlzcRy4gO32y8g/SPLDsleI7rpSTg2dPepsLcLm+GSg7 Nmracu0ntp2FJPSPxjx2Wv+QK58qUqJzOAtBA2fn52iMzmTjNS9qgdUfuRlhxfg4of Sa2P+wKMU2/P7JPy96JGn3+b5Kz1zOd8v36PUlaJ1eTcsV2skPXJ7X4E7C77rZZqBw LAuQIW3zh9jZVk8i933h2iBHhpiDJfhNV5mTgtU/mgJqmL+QVKkz0R9nruj/bptlNP HpWkfgH3vfjRA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) The time zone database is architecture-independent, so trying to cross-compile it is pointless! * gnu/packages/base.scm (tzdata)[arguments]<#:target>: Set to #f. (tzdata)[allowed-references]: Only include the "out" output itself, to make sure no (architecture-dependent) binaries are installed. --- gnu/packages/base.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 565d2ccab8..88e4ec09a6 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2020 Vitaliy Shatrov ;;; Copyright © 2020 Chris Marusich ;;; Copyright © 2021 Leo Le Bouter +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -1257,6 +1258,14 @@ command.") (build-system gnu-build-system) (arguments `(#:tests? #f + ;; This consists purely of (architecture-independent) data, + ;; so ‘cross-compilation’ is pointless here! + ;; (The binaries zic, dump, and tzselect are deleted in the post-install + ;; phase.) + #:target #f + ;; share/zoneinfo/posix is a symlink to share/zoneinfo, + ;; so include the package itself in #:allowed-references. + #:allowed-references ("out") #:make-flags (let ((out (assoc-ref %outputs "out")) (tmp (getenv "TMPDIR"))) (list (string-append "TOPDIR=" out) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:13 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:13 +0000 Received: from localhost ([127.0.0.1]:34056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwT-00070t-9l for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:13 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwJ-0006xg-21 for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:04 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no2rb; Sun, 11 Jul 2021 13:48:02 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 07/20] libgpg-error: Prevent silent miscompilation some systems. Date: Sun, 11 Jul 2021 13:47:10 +0200 Message-Id: <20210711114723.27568-8-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004082; bh=QFau1FaeK/5b1bWqy9BVr+tMxwUOU/Qw1BH0pUCw/qc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=by92CKWc6W/OvtNN3hWBc3PEzqoNOZ/EtQ7PnA/FNDLY1yVV0po9meJa7vLp1wdnG hMi2czE89AbUlLXE5/zb2rtqu23B4YHJVsfc1AO6YtLZh+uTVrA6qgFxOXV08QruER H3Cj1zY9n3geDD3OapbAXHifKDGgEmr53ti/DJ1Au5TB8JOxAztEOjhb9lz/N5UXSb 2Z60ihz1cqf/ZILGbyr9k6ezaTOFFQlVfaKqTk6mZ4XxWHkhVX/RT511yk+axrPa/O +50DTcaZtJ/PkiZi8ECH7PuMzHd+eaTa5S6oicTFI1x/vEIRX/E2XG+lcQo0wF3JQ+ BHks6iPUzwW4A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) * gnu/packages/gpg.scm (libgpgerror)[arguments]<#:phases>{cross-symlinks}: Only link to src/syscfg/lock-obj-pub.linux-gnu.h if the package is being compiled for a Linux target. Do not link either if the architecture is unknown, as the headers vary with the architecture. --- gnu/packages/gnupg.scm | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 5c0d03927e..1a7c682ad6 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2018 Björn Höfling ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Fredrik Salomonsson +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -77,6 +78,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system perl) #:use-module (guix build-system python) + #:use-module (ice-9 match) #:use-module (srfi srfi-1)) (define-public libgpg-error @@ -94,27 +96,37 @@ (build-system gnu-build-system) (arguments (if (%current-target-system) - `(#:modules ((ice-9 match) - (guix build gnu-build-system) + `(#:modules ((guix build gnu-build-system) (guix build utils)) #:phases (modify-phases %standard-phases ;; When cross-compiling, some platform specific properties cannot ;; be detected. Create a symlink to the appropriate platform - ;; file. See Cross-Compiling section at: + ;; file if required. Note that these platform files depend on + ;; both the operating system and architecture! + ;; + ;; See Cross-Compiling section at: ;; https://github.com/gpg/libgpg-error/blob/master/README (add-after 'unpack 'cross-symlinks - (lambda* (#:key target inputs #:allow-other-keys) - (let ((triplet - (match (string-take target - (string-index target #\-)) - ("armhf" "arm-unknown-linux-gnueabi") - ("mips64el" "mips-unknown-linux-gnu") - (x - (string-append x "-unknown-linux-gnu"))))) - (symlink - (string-append "lock-obj-pub." triplet ".h") - "src/syscfg/lock-obj-pub.linux-gnu.h")))))) + (lambda _ + (define (link triplet source) + (symlink (string-append "lock-obj-pub." triplet ".h") + (string-append "src/syscfg/lock-obj-pub." + source ".h"))) + ,(let* ((target (%current-target-system)) + (architecture + (string-take target (string-index target #\-)))) + (cond ((target-linux? target) + (match architecture + ("armhf" + `(link "arm-unknown-linux-gnueabi" "linux-gnu")) + ("mips64el" + `(link "mips-unknown-linux-gnu" "linux-gnu")) + ;; Don't always link to the "linux-gnu" + ;; configuration, as this is not correct for + ;; all architectures. + (_ #t))) + (#t #t))))))) '())) (native-inputs `(("gettext" ,gettext-minimal))) (home-page "https://gnupg.org") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:14 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:14 +0000 Received: from localhost ([127.0.0.1]:34058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwT-000710-QF for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:14 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwJ-0006y5-EX for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:04 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no2rg; Sun, 11 Jul 2021 13:48:03 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 08/20] libgpg-error: Fix cross-compilation error. Date: Sun, 11 Jul 2021 13:47:11 +0200 Message-Id: <20210711114723.27568-9-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004083; bh=GTJXiJu9i4qQ52TOPO4K/hcLzGRUNQA7Cm4Az8dv4LM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=K35tjD110iCpP0pad8s/ZeHNmiJGu9OIdIri9fnxi06JvRD0Wg1wg15CvdVISHgl7 KbWiUcBYn0rBAc8hjKx7taL+RdSqgl0jPn9i9/W+VeNkTgbmpdSTIj9RwjFDw26hwo Ut1oh6zNtZRXSdZlW+XVYqNFWDStsk0fMnf5kYKhW4Qhog8YKmpqDdGNeVPbPlf1P7 baIgMDbFbT6u93xV7ZqCoS9L8gEWwyYsvIMVyXLeLMsKOwxM+kzla1CovdiEPbMjWm lwkINdDq/mOg+rA21/K0KSjmXb8veIC2YWjmH/4q7WTE1n7CwfPARV0adz6MImZLUF U5S+7JGRYyDMg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) TODO: inform upstream about the cross-compilation error. * gnu/packages/gnupg.scm (libgpg-error)[arguments]{fix-gen-lock-obj.sh}: Prevent generated header files from being sprinkled with ‘\c’. --- gnu/packages/gnupg.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 1a7c682ad6..bb6fa4678b 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -100,6 +100,13 @@ (guix build utils)) #:phases (modify-phases %standard-phases + ;; If this is left out, some generated header + ;; files will be sprinkled with ‘\c’, which + ;; the compiler won't like. + (add-after 'unpack 'fix-gen-lock-obj.sh + (lambda _ + (substitute* "src/gen-lock-obj.sh" + (("if test -n `echo -n`") "if ! test -n `echo -n`")))) ;; When cross-compiling, some platform specific properties cannot ;; be detected. Create a symlink to the appropriate platform ;; file if required. Note that these platform files depend on -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:15 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:15 +0000 Received: from localhost ([127.0.0.1]:34060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwU-000717-3T for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:14 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwJ-0006yC-Qz for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:04 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no3rp; Sun, 11 Jul 2021 13:48:03 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 09/20] python: Fix reference to input when cross-compiling. Date: Sun, 11 Jul 2021 13:47:12 +0200 Message-Id: <20210711114723.27568-10-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004083; bh=tfhxpmot2txmcMbR0eEYan/RUbd5LXwGOg8MLYaAdXw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gqEKyVhgyrlmtRtl0P+50nPXXCG7+jsiXFtSMN2D0mR7m4a0Ngc+6ZKv+nhHiQSax 0ymcXqxTLAu05dpXJgTYLgpkHO3YQvdjTrEX7x3f84xuxhxz5NUsO9q0G7v2f2zK9r D4Y3svqi5zkOEEH7+efesL7P1pzd+nQQLK073qFJ5luOFgdF6xWOO+5yg1duxk61Tg vjRfwnNNBogiK0YEd0rYThLXXuBXjPyxpTbH6fopkXPujen9hwfAh63thVf6FTo242 111Kt053HAu11lao/Mcd3hU3HrzXX+AlPOS2raXqBbijlI89MZKillOYnJT3N1feZ9 jcd7l+f0NaPkQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) "sitecustomize.py" is a native input, so look it up in 'native-inputs', not 'inputs'. * gnu/packages/python.scm (customize-site): Look up "sizecustomize.py" in 'native-inputs', not 'inputs'. --- gnu/packages/python.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 227c612a68..ef47e79632 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -110,13 +110,14 @@ (define* (customize-site version) "Generate a install-sitecustomize.py phase, using VERSION." - `(lambda* (#:key inputs outputs #:allow-other-keys) + `(lambda* (#:key native-inputs inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (site-packages (string-append out "/lib/python" ,(version-major+minor version) "/site-packages")) - (sitecustomize.py (assoc-ref inputs "sitecustomize.py")) + (sitecustomize.py (assoc-ref (or native-inputs inputs) + "sitecustomize.py")) (dest (string-append site-packages "/sitecustomize.py"))) (mkdir-p site-packages) (copy-file sitecustomize.py dest) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:15 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:15 +0000 Received: from localhost ([127.0.0.1]:34062 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwV-00071F-1M for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:15 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwK-0006y4-6i for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:04 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no3ru; Sun, 11 Jul 2021 13:48:03 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 10/20] openssl: Remove trailing #t from phases. Date: Sun, 11 Jul 2021 13:47:13 +0200 Message-Id: <20210711114723.27568-11-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004083; bh=j/A6t2tDNHqcA+3FK2plLU7eEVpICq+dbE6XR1ZiAr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=XtXS+MIbv12W9PDkNU/GaWOv82Nq1YR0fMfQmgI0pr1J9mCrvwCGmRtZFVpeVDFmc uuwGJXCHl/qA89bFTbqGqKgAiFOiSYhwrbK4CuklMp67nw/GFx27Yt6ACOuMZz16Yy s9NvbFvT4Ebeejdqi4wMyTPCMoQNMkhcF8ieexdXSVZJsb1tzzhCX1oWpbP1iWQOpj anYEDgAMPq0UGi+XdO/a5tQqL6+6VM80VHgiQgfYu8wXtoLfQIVzzS+o6KSkVGK/I0 Y4mWFJXRlzOF+XuNDP5NRbANsDDwlW4WpO0j6aliwfAIiysyCs4ACkbQDyRvqKWvgH ftJeysFvbbJ5A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Delete trailing #t. --- gnu/packages/tls.scm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 297e16dd70..8a8fcb59fd 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -364,8 +364,7 @@ required structures.") ((string-prefix? "powerpc64" target) "linux-ppc64") ((string-prefix? "powerpc" target) - "linux-ppc"))) - #t))) + "linux-ppc")))))) '()) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) @@ -404,8 +403,7 @@ required structures.") (for-each (lambda (file) (install-file file slib) (delete-file file)) - (find-files lib "\\.a$")) - #t))) + (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation (lambda* (#:key outputs #:allow-other-keys) ;; Move man3 pages and full HTML documentation to "doc". @@ -418,8 +416,7 @@ required structures.") (copy-recursively man3 man-target) (delete-file-recursively man3) (copy-recursively html html-target) - (delete-file-recursively html) - #t))) + (delete-file-recursively html)))) (add-after 'install 'remove-miscellany (lambda* (#:key outputs #:allow-other-keys) @@ -428,8 +425,7 @@ required structures.") (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" ,(package-version this-package) - "/misc")) - #t)))))) + "/misc")))))))) (native-search-paths (list (search-path-specification (variable "SSL_CERT_DIR") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:15 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:15 +0000 Received: from localhost ([127.0.0.1]:34064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwV-00071N-B0 for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:15 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwK-0006yM-IO for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:05 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no3s6; Sun, 11 Jul 2021 13:48:04 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 11/20] openssl: Make the #:phases argument a G-expression. Date: Sun, 11 Jul 2021 13:47:14 +0200 Message-Id: <20210711114723.27568-12-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004084; bh=JHdidYibbmla5GyzrkyF1oyuXoOo0MlYIgVGOuNjBkE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=AxtG/gz5gqXUz21c/HVBQlxaNRdshWm1jhnVDKdEa0/2CHIfJcVl8xsVZxtMT0/wR sCo25n8j1HKHJPA8ilPOHO3GzFox8ddV1uminI889naq+I7i48A0TVC6QUIxkdXkfz m3brdINxDXfyAiMP8a8P9FHWDrn+RoFKCpxBKME8igx2cgvdOPCfEPAfXoVOU0KXGA 1Ec7axiaqlsChsHTcuGTogwhnRxtrum3dscWR2B3hfWalT4Y+5sqLY+u7x69cmwa52 qzqUB23QpqACWKkj0+T8BFvf7ebIQXBOEbbtO6/vAJIT181p4OiY7/2B4BeNVdEBeP /3mKcUQak39zA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) This allows using this-package-native-input later. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Make this a G-expression. (openssl-1.0)[arguments]<#:phases>: Likewise. --- gnu/packages/tls.scm | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 8a8fcb59fd..0024709a96 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -40,6 +40,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system perl) @@ -339,9 +340,10 @@ required structures.") ;; so we explicitly disallow it here. #:disallowed-references ,(list (canonical-package perl)) #:phases + ,#~ (modify-phases %standard-phases - ,@(if (%current-target-system) - '((add-before + #$@(if (%current-target-system) + #~((add-before 'configure 'set-cross-compile (lambda* (#:key target outputs #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) @@ -365,7 +367,7 @@ required structures.") "linux-ppc64") ((string-prefix? "powerpc" target) "linux-ppc")))))) - '()) + #~()) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -375,9 +377,9 @@ required structures.") (("/usr/bin/env") (string-append (assoc-ref %build-inputs "coreutils") "/bin/env"))) - (invoke ,@(if (%current-target-system) - '("./Configure") - '("./config")) + (invoke #$@(if (%current-target-system) + #~("./Configure") + #~("./config")) "shared" ;build shared libraries "--libdir=lib" @@ -386,13 +388,13 @@ required structures.") ;; conventional. (string-append "--openssldir=" out "/share/openssl-" - ,(package-version this-package)) + #$(package-version this-package)) (string-append "--prefix=" out) (string-append "-Wl,-rpath," lib) - ,@(if (%current-target-system) - '((getenv "CONFIGURE_TARGET_ARCH")) - '()))))) + #$@(if (%current-target-system) + #~((getenv "CONFIGURE_TARGET_ARCH")) + #~()))))) (add-after 'install 'move-static-libraries (lambda* (#:key outputs #:allow-other-keys) ;; Move static libraries to the "static" output. @@ -424,7 +426,7 @@ required structures.") ;; scripts. Remove them to avoid retaining a reference on Perl. (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" - ,(package-version this-package) + #$(package-version this-package) "/misc")))))))) (native-search-paths (list (search-path-specification @@ -469,7 +471,7 @@ required structures.") ;; Parallel build is not supported in 1.0.x. ((#:parallel-build? _ #f) #f) ((#:phases phases) - `(modify-phases ,phases + #~(modify-phases #$phases (add-before 'patch-source-shebangs 'patch-tests (lambda* (#:key inputs native-inputs #:allow-other-keys) (let ((bash (assoc-ref (or native-inputs inputs) "bash"))) @@ -492,9 +494,9 @@ required structures.") ;; Override this phase because OpenSSL 1.0 does not understand -rpath. (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) - (invoke ,@(if (%current-target-system) - '("./Configure") - '("./config")) + (invoke #$@(if (%current-target-system) + #~("./Configure") + #~("./config")) "shared" ;build shared libraries "--libdir=lib" @@ -502,12 +504,12 @@ required structures.") ;; PREFIX/ssl. Change that to something more ;; conventional. (string-append "--openssldir=" out - "/share/openssl-" ,version) + "/share/openssl-" #$version) (string-append "--prefix=" out) - ,@(if (%current-target-system) - '((getenv "CONFIGURE_TARGET_ARCH")) - '()))))) + #$@(if (%current-target-system) + '((getenv "CONFIGURE_TARGET_ARCH")) + '()))))) (delete 'move-extra-documentation) (add-after 'install 'move-man3-pages (lambda* (#:key outputs #:allow-other-keys) @@ -532,7 +534,7 @@ required structures.") ;; scripts. Remove them to avoid retaining a reference on Perl. (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" - ,version "/misc")) + #$version "/misc")) #t))))))))) (define-public libressl -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:16 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:16 +0000 Received: from localhost ([127.0.0.1]:34066 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwV-00071U-OR for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:15 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwL-0006y5-9s for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:05 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no4sF; Sun, 11 Jul 2021 13:48:04 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 13/20] openssl: Move documentation instead of copying and deleting it. Date: Sun, 11 Jul 2021 13:47:16 +0200 Message-Id: <20210711114723.27568-14-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004085; bh=7hdPjzxNLQ83Vv9FIbPnqNpMd0gcoxSAu51LPUrnFVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=aLfvH5fISF8dy17J5FgHVT/3HRTTwdu+LW1DxFpJRxzvVtlZbzLaICo8YJjkT59lu sq6nmNt4MPo2PeumsWUdG01LBMPNnjyXGGmGjRI2/lPWdibmKqWOqsdEqbuD6gbQ72 i0GIK6b8w/bo+nW7XB2ec6IgEKmPXUjhT4ws7MrSWJbxZKha2TYJLDkqhv6gCD37lt 5mjiOgL+rq7tQbNslvHe68M+HtI/EdSwvlBjtUw4aelTdCaRKo2LflcRozstJ/VsOb tbVs9iP6YMpHePxarPQePHQSgKVCylQVSZxT2fxwMn6wdTi2QtvW/4WcSdDUCFi/mJ VmWMZmG3s6mOQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) * gnu/packages/tls.scm (openssl)[arguments]<#:phases>{move-extra-documentation}: Use 'rename-file' instead of 'copy-recursively' and 'delete-file-recursively'. --- gnu/packages/tls.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index fd4a8b07b2..fcecc6ba41 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -416,10 +416,10 @@ required structures.") (doc #$output:doc) (man-target (string-append doc "/share/man/man3")) (html-target (string-append doc "/share/doc/openssl"))) - (copy-recursively man3 man-target) - (delete-file-recursively man3) - (copy-recursively html html-target) - (delete-file-recursively html)))) + (mkdir-p (dirname man3-target)) + (mkdir-p (dirname html-target)) + (rename-file man3 man-target) + (rename-file html html-target)))) (add-after 'install 'remove-miscellany (lambda _ -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:16 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:16 +0000 Received: from localhost ([127.0.0.1]:34068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwW-00071b-0a for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:16 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwL-0006yC-M9 for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:05 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no5sJ; Sun, 11 Jul 2021 13:48:05 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 14/20] openssl: Move all man pages to separate output, not only man3. Date: Sun, 11 Jul 2021 13:47:17 +0200 Message-Id: <20210711114723.27568-15-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004085; bh=JIGYb8218IvtqiEioBC7F/bNr95fECSLQRHNxnN79pc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ieoICplQehvrMTWu1wPMbtdudwgW0hngI+4BfRBmxylQ1FKqFJRZWo9dAmcMP069o qoDh3hGcN71Sue/elLeOOJj4FolfsIdDCqYIVtnuiQzjCX9FSgHWUYXhGRn5j7PXl0 OOAt2PkPsU3VMJCuvoBaphoUfi4I4nGdXZvv08YFNc1GstMaSOBBkhSQXFydza4q1c lEjv1uhDe5RwRUdEP1H7/ZOQ9ah0R1CtWdBBQspVsWu1qJf+5g5a4f1W6C9HL1s6Ya fkjhR9Q3UaYKFBkHsnC+catVoSjTutsGci38cxA5Rnj3KEaJFQN5oUh74jAYs+cGO/ xQbMhnAk6zKjw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) There does not seem to be any reason to only move man3 pages. So, move all man pages to a separate output for documentation. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>{move-extra-documentation}: Move all man pages, not only man3. --- gnu/packages/tls.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index fcecc6ba41..6cebc1d6ed 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -409,16 +409,16 @@ required structures.") (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation (lambda _ - ;; Move man3 pages and full HTML documentation to "doc". + ;; Move man pages and full HTML documentation to "doc". (let* ((out #$output) - (man3 (string-append out "/share/man/man3")) - (html (string-append out "/share/doc/openssl")) + (man (string-append out "/share/man")) + (html (string-append out "/share/doc/openssl")) (doc #$output:doc) - (man-target (string-append doc "/share/man/man3")) + (man-target (string-append doc "/share/man")) (html-target (string-append doc "/share/doc/openssl"))) - (mkdir-p (dirname man3-target)) + (mkdir-p (dirname man-target)) (mkdir-p (dirname html-target)) - (rename-file man3 man-target) + (rename-file man man-target) (rename-file html html-target)))) (add-after 'install 'remove-miscellany -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:16 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:16 +0000 Received: from localhost ([127.0.0.1]:34070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwW-00071j-AD for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:16 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwM-0006y4-2B for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:06 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no5sP; Sun, 11 Jul 2021 13:48:05 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 15/20] openssl: Extract logic for computing CONFIGURE_TARGET_ARCH. Date: Sun, 11 Jul 2021 13:47:18 +0200 Message-Id: <20210711114723.27568-16-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004085; bh=59zKgKpvwivXNlDrsEtd2QfN4mS/pBxN1trlqWAIkiA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=oeIcvvqICV7FNzjBPxYad1JxQdzU5TOF5Alfc2EV8NpSxReD6TKXvKJusGLmiL8Ql QRaBLIqfhRd+2rBVFHIdxYzeUSgNyDnWqjGqzF1tphLmSJd1AwdAG1CPNUogWYER+9 bOfRD4nJNxc71OoWAHMMPGBmk3VyZVNtaerkQuVoTqrAoieubGrFV0NW2DbyrhFQaE g2w47ZRc94qzoJSqSQMG2AaUVcr6dwlgKjkcaZn7eFtOHRIHoNhrSY9YY9jB3cPOPs nWmkqdriyuq5uKpozqnEL1yHknPSOyWjkIVmADXqnnqlpxdh8VEW7r/vrweFc/9/IG 9pXbun5YEJOUQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) By computing this value outside the build code, new targets can be added without causing rebuilds for other targets. * gnu/packages/tls.scm (target->openssl-target): New procedure. (openssl)[arguments]<#:phases>{set-cross-compile}: Use it. --- gnu/packages/tls.scm | 46 ++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 6cebc1d6ed..8c7bba0b6e 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -311,6 +311,31 @@ required structures.") (define-public guile3.0-gnutls (deprecated-package "guile3.0-gnutls" gnutls)) +(define (target->openssl-target target) + "Return the value to set CONFIGURE_TARGET_ARCH to when cross-compiling +OpenSSL for TARGET." + ;; Keep this code outside the build code, + ;; such that new targets can be added + ;; without causing rebuilds for other targets. + (cond ((string-prefix? "i586" target) + "hurd-x86") + ((string-prefix? "i686" target) + "linux-x86") + ((string-prefix? "x86_64" target) + "linux-x86_64") + ((string-prefix? "mips64el" target) + "linux-mips64") + ((string-prefix? "arm" target) + "linux-armv4") + ((string-prefix? "aarch64" target) + "linux-aarch64") + ((string-prefix? "powerpc64le" target) + "linux-ppc64le") + ((string-prefix? "powerpc64" target) + "linux-ppc64") + ((string-prefix? "powerpc" target) + "linux-ppc"))) + (define-public openssl (package (name "openssl") @@ -349,25 +374,8 @@ required structures.") (lambda* (#:key target #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) (setenv "CONFIGURE_TARGET_ARCH" - (cond - ((string-prefix? "i586" target) - "hurd-x86") - ((string-prefix? "i686" target) - "linux-x86") - ((string-prefix? "x86_64" target) - "linux-x86_64") - ((string-prefix? "mips64el" target) - "linux-mips64") - ((string-prefix? "arm" target) - "linux-armv4") - ((string-prefix? "aarch64" target) - "linux-aarch64") - ((string-prefix? "powerpc64le" target) - "linux-ppc64le") - ((string-prefix? "powerpc64" target) - "linux-ppc64") - ((string-prefix? "powerpc" target) - "linux-ppc")))))) + #$(target->openssl-target + (%current-target-system)))))) #~()) (replace 'configure (lambda _ -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:17 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:17 +0000 Received: from localhost ([127.0.0.1]:34072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwW-00071r-LU for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:16 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwM-0006y5-QW for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:07 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no6sd; Sun, 11 Jul 2021 13:48:06 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 17/20] glib: Verify the cross-compiled python is used in installed scripts. Date: Sun, 11 Jul 2021 13:47:20 +0200 Message-Id: <20210711114723.27568-18-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004086; bh=EdavLGCsmRKElVg3FWy+Yzt6MfN1A72DGpe66SV+JdI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=mR5I4F7/won+Ilqy6aNN5UnRIj7puBRbmdBxZ/2AfIz8raoEHZhaPyvewk5ehti0L fn4FF+N6PxWG9DRA6rYuzcGaGp7xByiv0ecZbQ8/JmfdTGD2N0EqduH25vKCWUfBWz myLIcrFhpUWTq6Ctg+4IA/s1DmXIRkfCT4R1cvllE/cAeFSCrRNh38oJP2W5FXg7yC i/bL5NP0tUsUj7DjMicYFMDJYZxDsEjK5P4ZRgI4GFQp3EcCx0qBvWAZtOeHijq1b9 K4Ad9Uihcsh7MgsI+phZLVvv1h3BrlEPG5jxqHEm2szzxKNqzOJ1qgbm8jUry/J5Jb hSQL3H4QOnMNw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) * gnu/packages/glib.scm (glib)[arguments]<#:disallowed-references>: Disallow the native python when cross-compiling. --- gnu/packages/glib.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 99f5c5d450..e4ebed7e2c 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -77,6 +77,8 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix gexp) + #:use-module (srfi srfi-26) #:use-module ((srfi srfi-1) #:hide (zip)) ;; Export variables up-front to allow circular dependency with the 'xorg' @@ -200,7 +202,15 @@ shared NFS home directories.") "static" ;static libraries "bin")) ;executables; depends on Python (arguments - `(#:disallowed-references (,tzdata-for-tests) + `(#:disallowed-references + (,tzdata-for-tests + ;; Verify glib-mkenums, gtester, ... use the cross-compiled + ;; python. + ,@(if (%current-target-system) + (map (cut gexp-input <> #:native? #t) + `(,(this-package-native-input "python") + ,(this-package-native-input "python-wrapper"))) + '())) #:configure-flags '("--default-library=both" "-Dman=true" "-Dselinux=disabled") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:22 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:22 +0000 Received: from localhost ([127.0.0.1]:34074 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwX-00071y-0C for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:22 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwM-0006yM-Eo for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:07 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no5sU; Sun, 11 Jul 2021 13:48:06 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 16/20] glib: Use a correct python in scripts when cross-compiling. Date: Sun, 11 Jul 2021 13:47:19 +0200 Message-Id: <20210711114723.27568-17-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004086; bh=6hXOZRlH/MbFutLfGerdJWqLFB8VU+FCKvMl68udIcU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=RlAsHSlmUjLAHnMlkEhP/NKa5+r/UG/+3oA3ipaIEZU5xwFnUI6yku8w8KOG6xdrO eVpDyXgyKeQxPuZdGGNIIZYMcf9GimRCpKBxUKNH5mr/zc1TyGUSepwHmrJBdJHa/h w+3Z5bSZsWP+mOVG0pf0pjKlvRPkySiNBm83gz/4ZurhB+4YphmxdZyLQNTuIp4Vl4 gjRfIElHQHVYlElKWj8xeSgHSo8Wkn0ltHBbzfsUBtVkLVgvyYVO4110yY0vYY9ym9 H3kB2dlBhREtOJu9EUN/v6TPkwKkz3b4XSzKk/VNYX1sWjOumtCdL/LJaMzajNQ1YQ DA4oX0TSsjI2g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) During the build, a native python should be used as these scripts will be invoked during the build, but when installed, they should be a python for the system we're compiling for. * gnu/packages/glib.scm (glib)[arguments]<#:phases>{patch-python-references}: Look up "python" in 'native-inputs', not 'inputs'. (glib)[inputs]{python,python-wrapper,bash-minimal}: New inputs. --- gnu/packages/glib.scm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index f0be2ddaa4..99f5c5d450 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2020 Florian Pelz ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020 Arthur Margerit +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -223,14 +224,19 @@ shared NFS home directories.") #t)) ;; Python references are not being patched in patch-phase of build, ;; despite using python-wrapper as input. So we patch them manually. + ;; + ;; These python scripts are both used during build and installed, + ;; so at first, use a python from 'native-inputs', not 'inputs'. When + ;; cross-compiling, the 'patch-shebangs' phase will replace + ;; the native python with a python from 'inputs'. (add-after 'unpack 'patch-python-references - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs #:allow-other-keys) (substitute* '("gio/gdbus-2.0/codegen/gdbus-codegen.in" "glib/gtester-report.in" "gobject/glib-genmarshal.in" "gobject/glib-mkenums.in") (("@PYTHON@") - (string-append (assoc-ref inputs "python") + (string-append (assoc-ref (or native-inputs inputs) "python") "/bin/python" ,(version-major+minor (package-version python))))) @@ -293,6 +299,13 @@ shared NFS home directories.") ("xsltproc" ,libxslt))) (inputs `(("bash-completion" ,bash-completion) + ;; "python", "python-wrapper" and "bash-minimal" + ;; are for the 'patch-shebangs' phase, to make + ;; sure the installed scripts end up with a correct shebang + ;; when cross-compiling. + ("python" ,python) + ("python-wrapper" ,python-wrapper) + ("bash-minimal" ,bash-minimal) ("dbus" ,dbus) ("libelf" ,libelf))) (propagated-inputs -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:22 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:22 +0000 Received: from localhost ([127.0.0.1]:34076 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2Xwc-00072F-5Q for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:22 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38514) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwN-0006yC-5b for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:07 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no6sl; Sun, 11 Jul 2021 13:48:06 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 18/20] glib: Look up "tzdata" in 'native-inputs', not 'inputs'. Date: Sun, 11 Jul 2021 13:47:21 +0200 Message-Id: <20210711114723.27568-19-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004086; bh=ZjEmLqo+AcCFyVjjjxBD6t1exf9WfOPlDV6wnmCi6Pw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OH6qhYFT3+sb/XAbCSDFdMSSjDHxKjlavCAq5Z7cD31zsfMo4wAbq4gELYOQZGF/l xkE3hlKdRrIT80oqB40r127iNGX46KyFN5tL0CKqelSNHcx7ZBWu5AIquL+cWWZ3w9 LOXk9bv+ZBJFIc+gNLV7UpY7xOGUtEU/meFRS26YsCWQ04Bxy9mPgYRaeKKxVvmQ18 VuO6Yuaq5TFilyPcjG3L+wtJu7mXUW0zm//EUM6hVSvXLc0159Ws3UaOB/7bR44ttU ScupWTFsJbth+JiUB7cDZU9CykgBla0QoausmQ+5YfS/OnbIRkD+MAIPI93mCBZE2O 5WmErV3SHqmeg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) Otherwise, "tzdata" won't be found when cross-compiling and string-append will complain about types. Alternatively, "tzdata" could be moved from 'native-inputs' to 'inputs'. * gnu/packages/glib.scm (glib)[arguments]<#:phases>{pre-check}: Look up "tzdata" in 'native-inputs', not 'inputs'. --- gnu/packages/glib.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index e4ebed7e2c..01683df8c5 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -252,10 +252,11 @@ shared NFS home directories.") (package-version python))))) #t)) (add-before 'check 'pre-check - (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) ;; For tests/gdatetime.c. (setenv "TZDIR" - (string-append (assoc-ref inputs "tzdata") + (string-append (assoc-ref (or native-inputs inputs) + "tzdata") "/share/zoneinfo")) ;; Some tests want write access there. (setenv "HOME" (getcwd)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:23 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:23 +0000 Received: from localhost ([127.0.0.1]:34078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2Xwc-00072M-Gh for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:23 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwN-0006y4-I1 for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:08 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no6sp; Sun, 11 Jul 2021 13:48:07 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 19/20] libelf: Update configure script and config.guess and config.sub. Date: Sun, 11 Jul 2021 13:47:22 +0200 Message-Id: <20210711114723.27568-20-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004087; bh=PmFSgOK+NW3vsdrropSeKY9k4clOeil1DsdklQk68os=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=JGjd3BbyspEvzgwufOwHaPl3n4HMvAUrqolL4tT0BJbWE0KwuWC9U6xgaQHB+9atp MLqqLj8K8clE9ScTf0XuRbxejto7IQ/I9s9OOxYtw7X+omaDHXHM8kEF+ccH9vxUd9 nuGOQi9IvkLNZeXeyW5yDuL3K+TYqLi4q6YPU3Dsq8w7u/KKyWQkXCiyaitRmoVFEi EFf5aAsCN2mCRzdC20noNeK5XR69tAK7ZIR1RGGkWZgDRAAUFCZ/Z3JaMaM+dKoGkQ 1fgKJckZbi51yKGwjAZQfzKCiqv5w7zyFkEfBsYuEmFkhtOt8SSKT1vhkrDlEOCeJm 9nKYuT1kAMVaw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) The current configure script is too old to find the cross-compiler and support variables passed as arguments. Also, config.guess and config.sub are too old to recognise powerpc64 and aarch64. Solve this by regenerating the 'configure' script and replacing 'config.guess' and 'config.sub'. * gnu/packages/elf.scm (libelf)[arguments]<#:phases>{configure}: Remove phase. (libelf)[arguments]<#:phases>{delete-configure}: Regenerate the configure script and replace 'config.guess' and 'config.sub'. --- gnu/packages/elf.scm | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index 0309dd95b5..2bc1d00048 100644 --- a/gnu/packages/elf.scm +++ b/gnu/packages/elf.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2020 Mark Wielaard ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2021 Leo Le Bouter +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -32,6 +33,7 @@ #:use-module (guix build-system gnu) #:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+)) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages compression) #:use-module (gnu packages documentation) #:use-module (gnu packages gcc) @@ -205,22 +207,32 @@ static analysis of the ELF binaries at hand.") (arguments `(#:phases (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - ;; This old `configure' script doesn't support - ;; variables passed as arguments. - (let ((out (assoc-ref outputs "out"))) - (setenv "CONFIG_SHELL" (which "bash")) - (invoke "./configure" - (string-append "--prefix=" out) - ,@(if (string=? "powerpc64le-linux" - (%current-system)) - '("--host=powerpc64le-unknown-linux-gnu") - '()) - ,@(if (string=? "aarch64-linux" - (%current-system)) - '("--host=aarch64-unknown-linux-gnu") - '())))))))) + ;; This old 'configure' script doesn't support cross-compilation + ;; well. I.e., it fails to find the cross-compiler. Also, + ;; the old `configure' script doesn't support variables passed as + ;; arguments. A third problem is that config.sub is too old to + ;; recognise aarch64 and powerpc64le. + ;; + ;; Solve this by regenerating the configure script and letting + ;; autoreconf update 'config.sub'. While 'config.sub' is updated + ;; anyway, update 'config.guess' as well. + (add-before 'bootstrap 'delete-configure + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (delete-file "configure") + (delete-file "config.sub") + (delete-file "config.guess") + (for-each (lambda (file) + (install-file + (string-append + (assoc-ref (or native-inputs inputs) "automake") + "/share/automake-" + ,(version-major+minor (package-version automake)) + "/" file) ".")) + '("config.sub" "config.guess"))))))) + (native-inputs + `(("autoconf" ,autoconf) + ;; For up-to-date 'config.guess' and 'config.sub' + ("automake" ,automake))) (home-page (string-append "https://web.archive.org/web/20181111033959/" "http://www.mr511.de/software/english.html")) (synopsis "ELF object file access library") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:30 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:30 +0000 Received: from localhost ([127.0.0.1]:34080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2Xwj-00072f-Kp for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:30 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38508) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwO-0006y5-4T for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:09 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no7sv; Sun, 11 Jul 2021 13:48:07 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 20/20] meson: Support cross-compilation. Date: Sun, 11 Jul 2021 13:47:23 +0200 Message-Id: <20210711114723.27568-21-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004087; bh=3tBa9V1leanhbYl9v7RAQpnEDEHIN0Ae8OnikCyvaIs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sjBZQCSOkdupABjMJFxEJ4VFPuo2HiLruwqmheqvDn1WbKIZ5MqaKtLr+TOJxI6A9 D9kSQJmKh2+lrI6J97V1or4o9vgO+REpW2MX8C/mCTq6ME/IhPCUBwj7ba5J0q7oXX o5FdTXH0Kun/59ByB6Z1iBUoTBJHTpu8S224Pt+g6CVgi5wuE/f0w/VGolk3mUTM6t 3efTW0evyR0/j4XYsoOxc5PiBcjmxB8NeUhLiJmLL15JsJcypgmHtlVQZETU93pfW1 BgYGSCymG3f5f4lBnO04+ryeFzKAKdHTfQV3yHZJwsznfdBrdOQLCU3ghcjq97gnMm UqODby9XTJ0aw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) For cross-compilation, meson needs to be passed a ‘cross file’ with information on the architecture, CPU type, endianness and operating system, and the name of the cross-compiler binaries. The new module (guix build meson-configuration) has some utilities for writing these cross files, used by 'make-cross-file' in a G-exp. The values for the cross file are generated by 'make-machine-alist' and 'make-binaries-alist'. 'make-machine-alist' and 'make-binaries-alist' live on the host side, such that new architectures and operating systems can be added without causing rebuilds for old architectures. Currently, only GNU/Hurd, GNU/Linux, MinGW, x86-32 and x86-64 are supported by 'make-machine-alist'. For other architectures, someone needs to figure out what to use as ‘CPU type’ first. Only i686-linux-gnu and aarch64-linux-gnu have been tested. The first target is only tested in a previous version of this patch series. This has been tested with: $ ./pre-inst-env guix build glib --target=aarch64-linux-gnu on a x86_64-linux system. ‘If it compiles, it should work.’ * guix/build/meson-configuration.scm (configuration-port): New parameter. (write-section-header): New procedure. (write-assignment): New procedure. (write-assignments): New procedure. * guix/build-system/meson.scm (target-hurd?): New predicate. (make-machine-alist): New procedure. (make-binaries-alist): New procedure. (make-cross-file): New procedure. (meson-cross-build): New procedure. (lower)[build-inputs]: Add standard cross packages when cross-compiling. Do not include regular 'inputs' when cross-compiling. (lower)[host-inputs]: Include 'inputs' when cross-compiling. (lower)[target-inputs]: Add cross packages when cross-compiling. (lower)[build]: Call 'meson-cross-build' instead of 'cross-build' when cross-compiling. (lower)[target]: Set it. (lower)[private-keywords]: Do not remove #:target when cross-compiling. --- Makefile.am | 1 + guix/build-system/meson.scm | 201 ++++++++++++++++++++++++++--- guix/build/meson-configuration.scm | 71 ++++++++++ 3 files changed, 254 insertions(+), 19 deletions(-) create mode 100644 guix/build/meson-configuration.scm diff --git a/Makefile.am b/Makefile.am index 05f013e3c2..6c17ab8492 100644 --- a/Makefile.am +++ b/Makefile.am @@ -234,6 +234,7 @@ MODULES = \ guix/build/emacs-utils.scm \ guix/build/java-utils.scm \ guix/build/lisp-utils.scm \ + guix/build/meson-configuration.scm \ guix/build/maven/java.scm \ guix/build/maven/plugin.scm \ guix/build/maven/pom.scm \ diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm index 5adc0f92c8..55311f85f0 100644 --- a/guix/build-system/meson.scm +++ b/guix/build-system/meson.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017 Peter Mikkelsen ;;; Copyright © 2018, 2019 Marius Bakke ;;; Copyright © 2021 Ludovic Courtès +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,7 +31,8 @@ #:use-module (guix packages) #:use-module (ice-9 match) #:export (%meson-build-system-modules - meson-build-system)) + meson-build-system + make-cross-file)) ;; Commentary: ;; @@ -40,6 +42,66 @@ ;; ;; Code: +(define (target-hurd? triplet) + (and (string-suffix? "-gnu" triplet) + (not (string-contains triplet "linux")))) + +(define (make-machine-alist triplet) + "Make an association list describing what should go into +the ‘host_machine’ section of the cross file when cross-compiling +for TRIPLET." + `((system . ,(cond ((target-hurd? triplet) "gnu") + ((target-linux? triplet) "linux") + ((target-mingw? triplet) "windows") + (#t (error "meson: unknown operating system")))) + (cpu_family . ,(cond ((target-x86-32? triplet) "x86") + ((target-x86-64? triplet) "x86_64") + ((target-arm32? triplet) "arm") + ((target-aarch64? triplet) "aarch64") + ((target-powerpc? triplet) + (if (target-64bit? triplet) + "ppc64" + "ppc")) + (#t (error "meson: unknown architecture")))) + (cpu . ,(cond ((target-x86-32? triplet) ; i386, ..., i686 + (substring triplet 0 4)) + ((target-x86-64? triplet) "x86_64") + ((target-aarch64? triplet) "armv8-a") + (#t (error "meson: unknown CPU")))) + (endian . ,(cond ((string-prefix? "powerpc64le-" triplet) "little") + ((string-prefix? "mips64el-" triplet) "little") + ((target-x86-32? triplet) "little") + ((target-x86-64? triplet) "little") + ;; At least in Guix. Aarch64 has a big-endian + ;; mode as well. + ((target-aarch64? triplet) "little") + (#t (error "meson: unknown architecture")))))) + +(define (make-binaries-alist triplet) + "Make an associatoin list describing what should go into +the ‘binaries’ section of the cross file when cross-compiling for +TRIPLET." + `((c . ,(cc-for-target triplet)) + (cpp . ,(cxx-for-target triplet)) + (pkgconfig . ,(pkg-config-for-target triplet)) + (objcopy . ,(string-append triplet "-objcopy")) + (ar . ,(string-append triplet "-ar")) + (ld . ,(string-append triplet "-ld")) + (strip . ,(string-append triplet "-strip")))) + +(define (make-cross-file triplet) + (computed-file "cross-file" + (with-imported-modules '((guix build meson-configuration)) + #~(begin + (use-modules (guix build meson-configuration)) + (call-with-output-file #$output + (lambda (f) + (parameterize ((configuration-port f)) + (write-section-header "host_machine") + (write-assignments '#$(make-machine-alist triplet)) + (write-section-header "binaries") + (write-assignments '#$(make-binaries-alist triplet))))))))) + (define %meson-build-system-modules ;; Build-side modules imported by default. `((guix build meson-build-system) @@ -68,24 +130,34 @@ #:rest arguments) "Return a bag for NAME." (define private-keywords - `(#:meson #:ninja #:inputs #:native-inputs #:outputs #:target)) - - (and (not target) ;; TODO: add support for cross-compilation. - (bag - (name name) - (system system) - (build-inputs `(("meson" ,meson) - ("ninja" ,ninja) - ,@native-inputs - ,@inputs - ;; Keep the standard inputs of 'gnu-build-system'. - ,@(standard-packages))) - (host-inputs (if source - `(("source" ,source)) - '())) - (outputs outputs) - (build meson-build) - (arguments (strip-keyword-arguments private-keywords arguments))))) + `(#:meson #:ninja #:inputs #:native-inputs #:outputs + ,@(if target + '() + '(#:target)))) + + (bag + (name name) + (system system) (target target) + (build-inputs `(("meson" ,meson) + ("ninja" ,ninja) + ,@native-inputs + ,@(if target '() inputs) + ;; Keep the standard inputs of 'gnu-build-system'. + ,@(if target + (standard-cross-packages target 'host) + '()) + ,@(standard-packages))) + (host-inputs `(,@(if source + `(("source" ,source)) + '()) + ,@(if target inputs '()))) + ;; Keep the standard inputs of 'gnu-buid-system'. + (target-inputs (if target + (standard-cross-packages target 'target) + '())) + (outputs outputs) + (build (if target meson-cross-build meson-build)) + (arguments (strip-keyword-arguments private-keywords arguments)))) (define* (meson-build name inputs #:key @@ -161,6 +233,97 @@ has a 'meson.build' file." #:disallowed-references disallowed-references #:guile-for-build guile))) +(define* (meson-cross-build name + #:key + target + build-inputs host-inputs target-inputs + guile source + (outputs '("out")) + (configure-flags ''()) + (search-paths '()) + (native-search-paths '()) + + (build-type "debugoptimized") + (tests? #f) + (test-target "test") + (glib-or-gtk? #f) + (parallel-build? #t) + (parallel-tests? #f) + (validate-runpath? #t) + (patch-shebangs? #t) + (strip-binaries? #t) + (strip-flags ''("--strip-debug")) + (strip-directories ''("lib" "lib64" "libexec" + "bin" "sbin")) + (elf-directories ''("lib" "lib64" "libexec" + "bin" "sbin")) + (phases '%standard-phases) + (system (%current-system)) + (imported-modules %meson-build-system-modules) + (modules '((guix build meson-build-system) + (guix build utils))) + allowed-references + disallowed-references) + "Cross-build SOURCE for TARGET using MESON, and with INPUTS, assuming that +SOURCE has a 'meson.build' file." + (define cross-file + (make-cross-file target)) + (define inputs + (if (null? target-inputs) + (input-tuples->gexp host-inputs) + #~(append #$(input-tuples->gexp host-inputs) + #+(input-tuples->gexp target-inputs)))) + (define builder + (with-imported-modules imported-modules + #~(begin + (use-modules #$@(sexp->gexp modules)) + + (define build-phases + #$(let ((phases (if (pair? phases) (sexp->gexp phases) phases))) + (if glib-or-gtk? + phases + #~(modify-phases #$phases + (delete 'glib-or-gtk-compile-schemas) + (delete 'glib-or-gtk-wrap))))) + + ;; Do not use 'with-build-variables', as there should be + ;; no reason to use %build-inputs and friends. + (meson-build #:source #+source + #:system #$system + #:outputs #$(outputs->gexp outputs) + #:inputs #$inputs + #:native-inputs #+(input-tuples->gexp build-inputs) + #:search-paths '#$(sexp->gexp + (map search-path-specification->sexp + search-paths)) + #:native-search-paths '#$(sexp->gexp + (map search-path-specification->sexp + native-search-paths)) + #:phases build-phases + #:configure-flags `("--cross-file" #+cross-file + ,@#$(sexp->gexp configure-flags)) + #:build-type #$build-type + #:tests? #$tests? + #:test-target #$test-target + #:parallel-build? #$parallel-build? + #:parallel-tests? #$parallel-tests? + #:validate-runpath? #$validate-runpath? + #:patch-shebangs? #$patch-shebangs? + #:strip-binaries? #$strip-binaries? + #:strip-flags #$(sexp->gexp strip-flags) + #:strip-directories #$(sexp->gexp strip-directories) + #:elf-directories #$(sexp->gexp elf-directories))))) + + (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) + system #:graft? #f))) + (gexp->derivation name builder + #:system system + #:target target + #:substitutable? substitutable? + #:allowed-references allowed-references + #:disallowed-references disallowed-references + #:guile-for-build guile))) + (define meson-build-system (build-system (name 'meson) diff --git a/guix/build/meson-configuration.scm b/guix/build/meson-configuration.scm new file mode 100644 index 0000000000..81b4eaa7e1 --- /dev/null +++ b/guix/build/meson-configuration.scm @@ -0,0 +1,71 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Maxime Devos +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix build meson-configuration) + #:use-module (ice-9 match) + #:export (write-section-header write-assignment + write-assignments make-machine-alist + configuration-port)) + +;; Commentary: +;; +;; Utilities for generating a ‘Cross build definition file’ for +;; the Meson build system. Configuration values are currently +;; never escaped. In practice this is unlikely to be a problem +;; in the build environment. +;; +;; Code: + +(define configuration-port + (fluid->parameter (make-unbound-fluid))) + +(define (write-section-header section-name) + "Write a section header for section named SECTION-NAME +to the configuration port." + (format (configuration-port) "[~a]~%" section-name)) + +(define (write-assignment key value) + "Write an assignment of VALUE to KEY to the configuration +port. VALUE must be a string (without any special characters +such as quotes), a boolean or an integer. Lists are currently +not supported" + (define port (configuration-port)) + (match value + ((? string?) + (format port "~a = '~a'~%" key value)) + ((? integer?) + (format port "~a = ~a~%" key value)) + (#f + (format port "~a = true~%" key)) + (#t + (format port "~a = false~%" key)))) + +(define* (write-assignments alist) + "Write the assignments in ALIST, an association list, +to the configuration port." + (for-each (match-lambda + ((key . value) + (write-assignment key value))) + alist)) + +(define* (make-machine-alist #:key system cpu-family cpu endian) + "Make an association list for the [host_machine] section." + `((system . ,system) + (cpu-family . ,cpu-family) + (cpu . ,cpu) + (endian . ,endian))) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 11 07:48:31 2021 Received: (at 49025) by debbugs.gnu.org; 11 Jul 2021 11:48:31 +0000 Received: from localhost ([127.0.0.1]:34082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2Xwk-00072i-Iz for submit@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:31 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:38290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2XwK-0006xg-Uw for 49025@debbugs.gnu.org; Sun, 11 Jul 2021 07:48:20 -0400 Received: from localhost.localdomain ([213.119.242.127]) by xavier.telenet-ops.be with bizsmtp id Tnno2500V2ldwth01no4sB; Sun, 11 Jul 2021 13:48:04 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v5 12/20] openssl: Use G-exp machinery for referring to outputs. Date: Sun, 11 Jul 2021 13:47:15 +0200 Message-Id: <20210711114723.27568-13-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210711114723.27568-1-maximedevos@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626004084; bh=3B3QDGP7dkXVyEAZJY8WCsdDeSjbBRGSdZVIeTRN4/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=iG4P4l8jHJS2IATGZtakvZPgCTM8MfCuGJzIcB784VHIU+YjOeVt+jKimD8YhwxK1 Zini3P0Q7uStU8kzdVMSK1ay8B3rwk0Al6cY+p1SHoqyLLoiDa/qEa2zrBXSOnxfOT 2nJyGpIHYu1VumoHqf+Ul312hzEpC+KyvzoaCjpXL71+HWZRGRWD3WVpE/6R784k6L dzc35W8yf+GSRHpBLHfI2AXtmuShhSsgLH0kwh3mSCruuySOf5uHuMM9QNhOOYxo1L 5mvwnnLXB4LiLIAZrBmb42b4rOxnNJpJgE72GlmzzLs6bvme1b00xGhQAXlzCRhk27 HtfoLpbXo1RXg== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 49025 Cc: Maxime Devos 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.7 (-) This doesn't fix anything broken, just for simplifying the code a little while we're rebuilding the world anyway. IMHO this makes the code a little more readable. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Don't refer to the association list 'outputs', use #$output, #$output:doc and #$output:static instead. --- gnu/packages/tls.scm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 0024709a96..fd4a8b07b2 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2020, 2021 Maxim Cournoyer ;;; Copyright © 2021 Solene Rapenne ;;; Copyright © 2021 Brice Waegeneire +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -345,7 +346,7 @@ required structures.") #$@(if (%current-target-system) #~((add-before 'configure 'set-cross-compile - (lambda* (#:key target outputs #:allow-other-keys) + (lambda* (#:key target #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) (setenv "CONFIGURE_TARGET_ARCH" (cond @@ -369,8 +370,8 @@ required structures.") "linux-ppc")))))) #~()) (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) + (lambda _ + (let* ((out #$output) (lib (string-append out "/lib"))) ;; It's not a shebang so patch-source-shebangs misses it. (substitute* "config" @@ -396,23 +397,23 @@ required structures.") #~((getenv "CONFIGURE_TARGET_ARCH")) #~()))))) (add-after 'install 'move-static-libraries - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; Move static libraries to the "static" output. - (let* ((out (assoc-ref outputs "out")) + (let* ((out #$output) (lib (string-append out "/lib")) - (static (assoc-ref outputs "static")) + (static #$output:static) (slib (string-append static "/lib"))) (for-each (lambda (file) (install-file file slib) (delete-file file)) (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; Move man3 pages and full HTML documentation to "doc". - (let* ((out (assoc-ref outputs "out")) + (let* ((out #$output) (man3 (string-append out "/share/man/man3")) (html (string-append out "/share/doc/openssl")) - (doc (assoc-ref outputs "doc")) + (doc #$output:doc) (man-target (string-append doc "/share/man/man3")) (html-target (string-append doc "/share/doc/openssl"))) (copy-recursively man3 man-target) @@ -421,13 +422,12 @@ required structures.") (delete-file-recursively html)))) (add-after 'install 'remove-miscellany - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; The 'misc' directory contains random undocumented shell and Perl ;; scripts. Remove them to avoid retaining a reference on Perl. - (let ((out (assoc-ref outputs "out"))) - (delete-file-recursively (string-append out "/share/openssl-" - #$(package-version this-package) - "/misc")))))))) + (delete-file-recursively (string-append #$output "/share/openssl-" + #$(package-version this-package) + "/misc"))))))) (native-search-paths (list (search-path-specification (variable "SSL_CERT_DIR") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 12 08:35:53 2021 Received: (at 49025) by debbugs.gnu.org; 12 Jul 2021 12:35:53 +0000 Received: from localhost ([127.0.0.1]:36723 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2vA9-0001Ue-51 for submit@debbugs.gnu.org; Mon, 12 Jul 2021 08:35:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2vA7-0001UQ-Rv for 49025@debbugs.gnu.org; Mon, 12 Jul 2021 08:35:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49498) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2vA1-0003Fj-NC; Mon, 12 Jul 2021 08:35:45 -0400 Received: from [2a01:cb18:832e:5f00:3563:417e:2a38:86d8] (port=50208 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2v9z-000385-VD; Mon, 12 Jul 2021 08:35:45 -0400 From: Mathieu Othacehe To: Maxime Devos Subject: Re: [bug#49025] [PATCH v5 01/20] utils: Define target-linux? predicate. References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> <20210711114723.27568-2-maximedevos@telenet.be> Date: Mon, 12 Jul 2021 14:35:41 +0200 In-Reply-To: <20210711114723.27568-2-maximedevos@telenet.be> (Maxime Devos's message of "Sun, 11 Jul 2021 13:47:04 +0200") Message-ID: <87y2abhfqa.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49025 Cc: 49025@debbugs.gnu.org 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 (---) Hey, > +(define* (target-linux? #:optional (target (or (%current-target-system) > + (%current-system)))) You can add a docstring here, something like: "Is the operating system of TARGET Linux?" > + (string-contains target "linux")) You should use the "->bool" procedure to return a boolean here. > (define* (target-mingw? #:optional (target (%current-target-system))) You can add a docstring, something like: "Is the operating system of TARGET Windows 32 bits?" > + (map (compose ->bool target-linux?) target-linux? should return a boolean > +(test-equal "target-mingw?" > + '(#f #f #t) > + (map (compose ->bool target-mingw?) You can write: --8<---------------cut here---------------start------------->8--- (map target-mingw? '("i686-linux-gnu" "i686-pc-gnu" "i686-w64-mingw32"))) --8<---------------cut here---------------end--------------->8--- here. Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 12 08:42:14 2021 Received: (at 49025) by debbugs.gnu.org; 12 Jul 2021 12:42:14 +0000 Received: from localhost ([127.0.0.1]:36731 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2vGH-0001gA-R7 for submit@debbugs.gnu.org; Mon, 12 Jul 2021 08:42:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45056) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m2vGG-0001fv-H1 for 49025@debbugs.gnu.org; Mon, 12 Jul 2021 08:42:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49908) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2vGB-0005aK-7t; Mon, 12 Jul 2021 08:42:07 -0400 Received: from [2a01:cb18:832e:5f00:3563:417e:2a38:86d8] (port=50216 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2vG9-00029j-8p; Mon, 12 Jul 2021 08:42:07 -0400 From: Mathieu Othacehe To: Maxime Devos Subject: Re: [bug#49025] [PATCH v5 20/20] meson: Support cross-compilation. References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> <20210711114723.27568-21-maximedevos@telenet.be> Date: Mon, 12 Jul 2021 14:42:03 +0200 In-Reply-To: <20210711114723.27568-21-maximedevos@telenet.be> (Maxime Devos's message of "Sun, 11 Jul 2021 13:47:23 +0200") Message-ID: <87tukzhffo.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49025 Cc: 49025@debbugs.gnu.org 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 (---) Hey, > This has been tested with: > > $ ./pre-inst-env guix build glib --target=3Daarch64-linux-gnu > > on a x86_64-linux system. =E2=80=98If it compiles, it should work.=E2=80= =99 Nice you added aarch64 support :). > +(define (target-hurd? triplet) > + (and (string-suffix? "-gnu" triplet) > + (not (string-contains triplet "linux")))) Maybe it should go in the (guix utils) module. > + (cpu . ,(cond ((target-x86-32? triplet) ; i386, ..., i686 > + (substring triplet 0 4)) > + ((target-x86-64? triplet) "x86_64") > + ((target-aarch64? triplet) "armv8-a") We could add: --8<---------------cut here---------------start------------->8--- ((target-arm32? triplet) "armv7") --8<---------------cut here---------------end--------------->8--- for arm32 support. > + (call-with-output-file #$output > + (lambda (f) > + (parameterize ((configuration-port f)) Why don't you pass the port parameter to the build side procedures like so: --8<---------------cut here---------------start------------->8--- (call-with-output-file #$output (lambda (port) (write-section-header port "host_machine") ... --8<---------------cut here---------------end--------------->8--- > +(define* (make-machine-alist #:key system cpu-family cpu endian) > + "Make an association list for the [host_machine] section." > + `((system . ,system) > + (cpu-family . ,cpu-family) > + (cpu . ,cpu) > + (endian . ,endian))) This one is unused, right? Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 13 09:47:03 2021 Received: (at 49025) by debbugs.gnu.org; 13 Jul 2021 13:47:03 +0000 Received: from localhost ([127.0.0.1]:39867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3IkZ-0007b7-Kl for submit@debbugs.gnu.org; Tue, 13 Jul 2021 09:47:03 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:36114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3IkX-0007af-BO for 49025@debbugs.gnu.org; Tue, 13 Jul 2021 09:47:02 -0400 Received: from butterfly.local ([5.23.188.225]) by michel.telenet-ops.be with bizsmtp id Udmy2500a4sDL4M06dmzdr; Tue, 13 Jul 2021 15:46:59 +0200 Message-ID: <8bff8c5fe05c3fe26dcf1a748881f733c32ff2b9.camel@telenet.be> Subject: Re: [bug#49025] [PATCH v5 01/20] utils: Define target-linux? predicate. From: Maxime Devos To: Mathieu Othacehe In-Reply-To: <87y2abhfqa.fsf@gnu.org> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> <20210711114723.27568-2-maximedevos@telenet.be> <87y2abhfqa.fsf@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-erWrTpJ4+X2QMDnYhBns" Date: Tue, 13 Jul 2021 15:33:26 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.34.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626184019; bh=Ata7zrpGa4V8oldYluXztdOHiAu/buFbl3JzgAJ1SR8=; h=Subject:From:To:Cc:In-Reply-To:References:Date; b=R6HRIz9tvDMxJdVuKgKIjsQcZeDQqT6MK+PCZ7poiJnz1TCDrTlCKhJ/9YEJo/3xZ BLDAF6w5gkL/3Q6DwhdWGlF9/+GFjnWhMHQubPOSBwTkaUpdGNDVdRZSk6PdL62DHU HNw1pUfazhbrWdhfjvgMo7cizb9ZBfvWBIejeVpDsL8v5+yb0pFlKxsf8+AK30BHu0 c8oHRnU2oKo9QYvCR28Qn7QCj3YT7w+Lj03x+I4EpNzuXh1wA0DnHk1uWkALDqGI1+ KqBB5WTTxJoHp8dGMw225FBC2vAoyYaDzf7KQZtLzhUpmXAiyIlqZLX9M/RiPm3ewh Miqf1GjZH3Y5Q== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: 49025@debbugs.gnu.org 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.7 (-) --=-erWrTpJ4+X2QMDnYhBns Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mathieu Othacehe schreef op ma 12-07-2021 om 14:35 [+0200]: > Hey, >=20 > > +(define* (target-linux? #:optional (target (or (%current-target-system= ) > > + (%current-system)))) >=20 > You can add a docstring here, something like: >=20 > "Is the operating system of TARGET Linux?" The Linux kernel by itself doesn't make an operating system, as the kernel doesn't have a package manager, display manager, basic text editors, application to configure network connections ..., so I made this=20 "Does the operating system of TARGET use the Linux kernel?" > > + (string-contains target "linux")) >=20 > You should use the "->bool" procedure to return a boolean here. Done in v5. > > (define* (target-mingw? #:optional (target (%current-target-system))) >=20 > You can add a docstring, something like: >=20 > "Is the operating system of TARGET Windows 32 bits?" Done in v5, but I dropped the '32-bits' and added a comment: ;; The "-32" doesn't mean TARGET is 32-bit, as "x86_64-w64-mingw32" ;; is a valid triplet (see the (gnu ci) module) and 'w64' and 'x86_6= 4' ;; are 64-bit. I wouldn't know what the "32" in "mingw32" refers to. > > + (map (compose ->bool target-linux?) >=20 > target-linux? should return a boolean >=20 > > +(test-equal "target-mingw?" > > + '(#f #f #t) > > + (map (compose ->bool target-mingw?) >=20 > You can write: >=20 > --8<---------------cut here---------------start------------->8--- > (map target-mingw? > '("i686-linux-gnu" "i686-pc-gnu" "i686-w64-mingw32"))) > --8<---------------cut here---------------end--------------->8--- >=20 > here. Done in v5. I'll send the v5 once everything is tested again and commits have been properly rebased. Greetings, Maxime. --=-erWrTpJ4+X2QMDnYhBns Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYO2WIBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7gvoAP9RuTiN755YbvX2lNBbyAHCrZnF 3FAOglpSV6keRf5bowD/a89HQMt0koKvaeBHSypW+zuUvpWmeDEnchser7WyAgQ= =iMQa -----END PGP SIGNATURE----- --=-erWrTpJ4+X2QMDnYhBns-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 13 09:47:10 2021 Received: (at 49025) by debbugs.gnu.org; 13 Jul 2021 13:47:10 +0000 Received: from localhost ([127.0.0.1]:39871 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3Ikf-0007bQ-T6 for submit@debbugs.gnu.org; Tue, 13 Jul 2021 09:47:10 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:36114) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3Ike-0007af-AO for 49025@debbugs.gnu.org; Tue, 13 Jul 2021 09:47:08 -0400 Received: from butterfly.local ([5.23.188.225]) by michel.telenet-ops.be with bizsmtp id Udn72500E4sDL4M06dn7eq; Tue, 13 Jul 2021 15:47:07 +0200 Message-ID: Subject: Re: [bug#49025] [PATCH v5 20/20] meson: Support cross-compilation. From: Maxime Devos To: Mathieu Othacehe In-Reply-To: <87tukzhffo.fsf@gnu.org> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> <20210711114723.27568-21-maximedevos@telenet.be> <87tukzhffo.fsf@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-ZQJ76Roook6Oh6fqDYgW" Date: Tue, 13 Jul 2021 15:36:14 +0200 MIME-Version: 1.0 User-Agent: Evolution 3.34.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626184028; bh=ozO6148uPefjuAo5a4OrNSwve5Woj1LTmFQ1IOmwYcA=; h=Subject:From:To:Cc:In-Reply-To:References:Date; b=ijKO0wURzh5KMGjRKmwVLAy2tD0zy4UZX9PbMPX4eeXi4B4xZUSNA6F9bi2XL9YGM zmKKBiPAXE+7TtvoJO628i7F12jvbqAql0fBfHT7I55jsAC/BcZKCyQ6kwoQ63DG2w lZ+CcpRwBjGQ/FltlatxMilj6y6vqa7fQ7TWOm0Z+koy6jxZ+0K8UfCJHWzoBf7UO2 ad+QEa6GdTdXKajuwRrH3YBjJxKCtC3xlTwdYVTSZKDR8+6kbuldVaV4jofyi3iueA 1AX51i+C/s7dq1qjLJUxDGXZTBNt0UYKVMlohBGfvmPFtQndmzSayZkTPdc+K97qeR ZFevSVWv2K3Ig== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: 49025@debbugs.gnu.org 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.7 (-) --=-ZQJ76Roook6Oh6fqDYgW Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mathieu Othacehe schreef op ma 12-07-2021 om 14:42 [+0200]: > Hey, >=20 > > This has been tested with: > >=20 > > $ ./pre-inst-env guix build glib --target=3Daarch64-linux-gnu > >=20 > > on a x86_64-linux system. =E2=80=98If it compiles, it should work.=E2= =80=99 >=20 > Nice you added aarch64 support :). >=20 > > +(define (target-hurd? triplet) > > + (and (string-suffix? "-gnu" triplet) > > + (not (string-contains triplet "linux")))) >=20 > Maybe it should go in the (guix utils) module. I placed it there, and adjusted (gnu packages hurd) and other modules to use it instead of hurd-triplet?. >=20 > > + (cpu . ,(cond ((target-x86-32? triplet) ; i386, ..., i686 > > + (substring triplet 0 4)) > > + ((target-x86-64? triplet) "x86_64") > > + ((target-aarch64? triplet) "armv8-a") >=20 > We could add: >=20 > --8<---------------cut here---------------start------------->8--- > ((target-arm32? triplet) "armv7") > --8<---------------cut here---------------end--------------->8--- >=20 > for arm32 support. Added in the v5! I assume arm32 is little-endian in Guix. > > + (call-with-output-file #$output > > + (lambda (f) > > + (parameterize ((configuration-port f)) >=20 > Why don't you pass the port parameter to the build side procedures like > so: >=20 > --8<---------------cut here---------------start------------->8--- > (call-with-output-file #$output > (lambda (port) > (write-section-header port "host_machine") > ... > --8<---------------cut here---------------end--------------->8--- No reason in particular. I'll eliminate the 'configuration-port' parameter in the v5. > > +(define* (make-machine-alist #:key system cpu-family cpu endian) > > + "Make an association list for the [host_machine] section." > > + `((system . ,system) > > + (cpu-family . ,cpu-family) > > + (cpu . ,cpu) > > + (endian . ,endian))) >=20 > This one is unused, right? Yes. I'll remove it in the v5. I'll send the v5 once it is tested (with --target=3Darmhf-linux-gnu). Greetings, Maxime. --=-ZQJ76Roook6Oh6fqDYgW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYO2WzRccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uurAP9NeIPAKHfwN/X9PAsXnOafD1D5 d/Q5CyDP1hokr7TQKQEA0OGWLjq3GIhnoq9iugeFq5Hslz7l6eOxux3gGmHU7Qk= =glaM -----END PGP SIGNATURE----- --=-ZQJ76Roook6Oh6fqDYgW-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 06:46:30 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 10:46:30 +0000 Received: from localhost ([127.0.0.1]:43071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cPN-0006vt-SJ for submit@debbugs.gnu.org; Wed, 14 Jul 2021 06:46:29 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:49610) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cPL-0006vk-KX for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 06:46:28 -0400 Received: from butterfly.local ([188.188.219.228]) by xavier.telenet-ops.be with bizsmtp id UymR250094wFxCU01ymRMw; Wed, 14 Jul 2021 12:46:26 +0200 Message-ID: <173aa50635e4dffd4f1a7c8160660a64566d437d.camel@telenet.be> Subject: Re: [bug#49025] [PATCH v5 01/20] utils: Define target-linux? predicate. From: Maxime Devos To: Mathieu Othacehe Date: Wed, 14 Jul 2021 12:46:24 +0200 In-Reply-To: <8bff8c5fe05c3fe26dcf1a748881f733c32ff2b9.camel@telenet.be> References: <419215938396207999184dafa43afaed6d7a0715.camel@telenet.be> <20210711114723.27568-1-maximedevos@telenet.be> <20210711114723.27568-2-maximedevos@telenet.be> <87y2abhfqa.fsf@gnu.org> <8bff8c5fe05c3fe26dcf1a748881f733c32ff2b9.camel@telenet.be> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-3zxGledp5UX6/MoBmsI3" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626259586; bh=Eou5/eJsAoAhhu4NY20xxpEkU7PC/2iKEg805va//c8=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=J9y5J9kofNMMPSvw846Gv31GeeT/mWgPlnJJYHsYMFdyAIrXHovCJ1xr4TlFBO3PM /Zt9Yt5NUS3SNXk9M4syD+pUiueUTmUc9BtKOCOJ3uVZ5LgERIiwm/01/bajGFUWNP y+Fe5fRTR9z8sR+tdob4xGRuhNCxb7KHCePyEzfw54ewgq4ltp68kkKc5L7yOJyrAq pM+DHOI/6fy9fCrEuY2iODxlyeCi8P/JDTGZRkkdesVWHIsOQ3wH24SMf5ep1GVXu2 obswJkkwrrwXwTn+5T4YwQW4jWaVLmrJB/0vc4wubIlbsR2NFl8b8NfpFf38wvV77d NMvEl2XovIPFg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: 49025@debbugs.gnu.org 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.7 (-) --=-3zxGledp5UX6/MoBmsI3 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Maxime Devos schreef op di 13-07-2021 om 15:33 [+0200]: > Done in v5. I meant v6 here. --=-3zxGledp5UX6/MoBmsI3 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+4iGRcl7gUCYO7AgBccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tosAQC0WZnl+tRxRZMfU7aZmFBlrLh2 xZCS9v+PDMm6G64KDwEAk5J0I/NzabpITVj+4tN6ePc4pnBN3YRnI0SjiIpVSQQ= =lPzG -----END PGP SIGNATURE----- --=-3zxGledp5UX6/MoBmsI3-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:22 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:22 +0000 Received: from localhost ([127.0.0.1]:43107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpN-0001K6-Mc for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:22 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpL-0001Jd-JX for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:20 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDJEh; Wed, 14 Jul 2021 13:13:18 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 01/22] utils: Define 'target-linux?' predicate. Date: Wed, 14 Jul 2021 13:12:46 +0200 Message-Id: <20210714111307.19324-2-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261198; bh=kcy0rH3VMbH+9vfeePVlkWsyyE303P2KPNipuvBft4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QR6UW1jP2g7Wpq2iRdit9RqVkWSLQwpguiBWZ0h0rM35DaWtt9wFoF643bGFxCUAt N7NQY4ZGCVawrppYbsSuSquaO6kR4kutc7iPhCGUVRsAlDCC7D5xbYNV2VkJ57ur3P FmnzMAP+qna6ad2tHEnLmlob9BQmff7l5AJLr8lQkEVJemg1hgV8Kiy4vcDbJqVDz1 JNmUhdo/gDVgskwjx16xSmaJaA725wUe4pLmW2VW9PI4KGnuIR+EJoKZmwpcLdUocO lNCp/Zv4owMBwfiRPrNlVLB5ksYKS/B1pxa0w4SCc/NPxsBtZ8ACl/tVL8r7ihYxRY ZvT+ZDn6pUlRw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) * guix/utils.scm (target-linux?): New predicate. * tests/utils.scm ("target-linux?"): Test it. ("target-mingw?"): Also test ‘target-mingw?’. --- guix/utils.scm | 7 +++++++ tests/utils.scm | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index 19990ceb8a..58bbff2b36 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -11,6 +11,7 @@ ;;; Copyright © 2020 Maxim Cournoyer ;;; Copyright © 2021 Simon Tournier ;;; Copyright © 2021 Chris Marusich +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -81,6 +82,7 @@ %current-system %current-target-system package-name->name+version + target-linux? target-mingw? target-arm32? target-aarch64? @@ -543,6 +545,11 @@ a character other than '@'." (idx (values (substring spec 0 idx) (substring spec (1+ idx)))))) +(define* (target-linux? #:optional (target (or (%current-target-system) + (%current-system)))) + "Does the operating system of TARGET use the Linux kernel?" + (->bool (string-contains target "linux"))) + (define* (target-mingw? #:optional (target (%current-target-system))) (and target (string-suffix? "-mingw32" target))) diff --git a/tests/utils.scm b/tests/utils.scm index 7fcbb25552..e170070907 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2016 Mathieu Lirzin ;;; Copyright © 2021 Simon Tournier +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -289,6 +290,22 @@ skip these tests." (string-closest "hello" '("kikoo" "helo" "hihihi" "halo")) (string-closest "hello" '("aaaaa" "12345" "hellohello" "h")))) +(test-equal "target-linux?" + '(#t #f #f #t) + (map target-linux? + '("i686-linux-gnu" "i686-w64-mingw32" + ;; Checking that "gnu" is present is not sufficient, + ;; as GNU/Hurd exists. + "i686-pc-gnu" + ;; Some targets have a suffix. + "arm-linux-gnueabihf"))) + +(test-equal "target-mingw?" + '(#f #f #t) + (map target-mingw? + '("i686-linux-gnu" "i686-pc-gnu" + "i686-w64-mingw32"))) + (test-end) (false-if-exception (delete-file temp-file)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:22 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:22 +0000 Received: from localhost ([127.0.0.1]:43113 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpO-0001KJ-9E for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:22 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpM-0001Jg-3P for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:20 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDKF3; Wed, 14 Jul 2021 13:13:19 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 03/22] utils: Give 'target-mingw?' a docstring. Date: Wed, 14 Jul 2021 13:12:48 +0200 Message-Id: <20210714111307.19324-4-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261199; bh=Tby/ZJEbSUjvONbCsBFyhb6ZIpzeFGqPgW78ySgCesc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Dqv5xoz3XQlaXm6oXgPDw00tjZgYOALKhGBFxMxq3VdFLxdHj1+ibGfuJRDRtI3gh NrKN+iz1+leK3GweTsvo8d0iEFJ/9wu0e7/LmnRVtLQGtDtegK5+uxu/mKa+dKEYuc t6c/12y3m2sagvlanyk+IpePpsgeLj7KZGLTKcy68hI6+Cvf926CqPb/++TP5czKUr oVTOfcoAhy2OeWV37bewhpZkKUXrMHB+ws86IGoep/6alhlD/v3YZ+zKHLdqzz3x8h Kz0IEwjjpuimENIuOScFRYXETNiexFZ0c6vF2IBMUSzFdXAIDRsz0RekmtYah2NfJr fIlSb57Kfwd7w== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) target-hurd? and target-linux? have docstrings, but target-mingw? doesn't. * guix/utils.scm (target-mingw?): Add a docstring. Reported-By: Mathieu Othacehe --- guix/utils.scm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index 5657a9d025..005c9b2c5f 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -558,7 +558,11 @@ a character other than '@'." (not (string-contains target "linux")))) (define* (target-mingw? #:optional (target (%current-target-system))) + "Is the operating system of TARGET Windows?" (and target + ;; The "-32" doesn't mean TARGET is 32-bit, as "x86_64-w64-mingw32" + ;; is a valid triplet (see the (gnu ci) module) and 'w64' and 'x86_64' + ;; are 64-bit. (string-suffix? "-mingw32" target))) (define* (target-arm32? #:optional (target (or (%current-target-system) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:23 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:23 +0000 Received: from localhost ([127.0.0.1]:43117 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpO-0001KW-Lq for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:23 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpL-0001Jc-JK for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:21 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDHEW; Wed, 14 Jul 2021 13:13:18 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 00/22] Support cross-compilation with meson Date: Wed, 14 Jul 2021 13:12:45 +0200 Message-Id: <20210714111307.19324-1-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261198; bh=q4b0dgmyY5kQfPcLnGOq/U1SXqMu5FBziUq0EX6qhyA=; h=From:To:Cc:Subject:Date; b=rnqIH37YElbqMgPhdhQlJICStghKa23IN8jMI/21lYh24U7yIa4Y6U7R4IfEEoZw7 o7EIZ/hrX/f+db8QxjFXmo60nKfPI/Xmn0laerHzzMch/uxBqoF4GFrAAKTHUUaeUS eGIy1jMOTaCd96MUsPYfuNN0FXrNuLWi1r1dGPrOHU5Iqdnk6kIscPzxanU7jqfIYK qYxNcCIP7aZhY2pnSCUZUzR/Q3IvfnHtWihYka1ikMxx73eWJLs6S7Q0289e2elpRC +GJhjjzc6hGrs8gEfwxMpwFGSHzlyzzQ+oKt+Y8I/nFxv4U6QLtyDvj/jPkseE2FP1 LSSKtMYiUKaCA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) The following changes were made since the v5: * The 'configuration-port' parameter has been eliminated * #:target and #:build is set in meson-cross-build, such that 'TARGET-strip' is used instead of 'strip' * #:dynamic-linker-cache? is set to to #f in meson-cross-build, as in gnu-cross-build * 'make-machine-alist' now supports 'arm-linux-gnueabihf'. * 'make-machine-alist' now has a generic fallback fake ‘CPU type’. Apparently, meson doesn't care what the value is and most software doesn't. Now powerpc64le-linux-gnu is supported (tested with qemu) and also mips64le is supported (untested). All supported cross targets should now be supported by meson. * the new target-...? proedures always return booleans * added some docstrings * target-hurd? is moved to (guix utils) Maxime Devos (22): utils: Define 'target-linux?' predicate. utils: Define 'target-hurd?' predicate. utils: Give 'target-mingw?' a docstring. utils: Define a target-x86-32? and target-x86-64? predicate. packages: Define this-package-input and this-package-native-input. net-base: Don't cross-compile. tzdata: Don't bother with cross-compiling. libgpg-error: Remove trailing #f from phases. libgpg-error: Prevent silent miscompilation some systems. libgpg-error: Fix cross-compilation error. python: Fix reference to input when cross-compiling. openssl: Remove trailing #t from phases. openssl: Make the #:phases argument a G-expression. openssl: Use G-exp machinery for referring to outputs. openssl: Move documentation instead of copying and deleting it. openssl: Move all man pages to separate output, not only man3. openssl: Extract logic for computing CONFIGURE_TARGET_ARCH. glib: Use a correct python in scripts when cross-compiling. glib: Verify the cross-compiled python is used in installed scripts. glib: Look up "tzdata" in 'native-inputs', not 'inputs'. libelf: Update configure script and config.guess and config.sub. build-system/meson: Support cross-compilation. Makefile.am | 1 + gnu/packages/admin.scm | 5 + gnu/packages/base.scm | 9 ++ gnu/packages/bdw-gc.scm | 4 +- gnu/packages/cross-base.scm | 6 +- gnu/packages/elf.scm | 44 +++--- gnu/packages/glib.scm | 34 ++++- gnu/packages/gnupg.scm | 48 ++++--- gnu/packages/hurd.scm | 10 +- gnu/packages/make-bootstrap.scm | 2 +- gnu/packages/python.scm | 5 +- gnu/packages/tls.scm | 136 ++++++++++--------- guix/build-system/meson.scm | 209 ++++++++++++++++++++++++++--- guix/build/meson-configuration.scm | 56 ++++++++ guix/packages.scm | 29 ++++ guix/utils.scm | 38 ++++++ tests/packages.scm | 34 +++++ tests/utils.scm | 40 ++++++ 18 files changed, 575 insertions(+), 135 deletions(-) create mode 100644 guix/build/meson-configuration.scm -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:23 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:23 +0000 Received: from localhost ([127.0.0.1]:43121 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpP-0001Kn-6c for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:23 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpM-0001Jh-T5 for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:21 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDKF7; Wed, 14 Jul 2021 13:13:20 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 04/22] utils: Define a target-x86-32? and target-x86-64? predicate. Date: Wed, 14 Jul 2021 13:12:49 +0200 Message-Id: <20210714111307.19324-5-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261200; bh=OIms9GN91JWFARSqoF1x61fg2Ti+lI2SIzA1pJi1i6I=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=EuJjhN6GsjCXqOr5xNNJ+qbO5gc7ZmCoHWJvS+iIoSZ/g5qtQhQXoWSxfJMsX0/7F yGKDnxa3BaWJU0ziqiNeYkyxJDEdkVw2eq7qnnLI/30SA2lc/I5Pv9hYhpdjrn0JMv cKaAPOfAqF/rLPsLPlWYCrD91lXsPAKUKS1UfIJtSJ7FgQuADzR2/b64SaTOPJcIdL dtOpcBVRz6GA1r6oLSyCATqW5JWjoB3Xu9zFwclAAZnGR/jGu3Ww82NgkW5gM2V3tD lV36hcr/OF8ml178W9eFjcrBSD+Jik/up5speJ9IeWlb4FP9HMOkCoAaEkNoFM9Jkl axetQqCBiuapQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) * guix/utils.scm (target-x86-32?, target-x86-64?): New predicates. * tests/utils.scm ("target-x86-32?", "target-x86-64?"): New tests. --- guix/utils.scm | 20 ++++++++++++++++++++ tests/utils.scm | 23 +++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/guix/utils.scm b/guix/utils.scm index 005c9b2c5f..0596f81b8a 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -85,6 +85,8 @@ target-linux? target-hurd? target-mingw? + target-x86-32? + target-x86-64? target-arm32? target-aarch64? target-arm? @@ -565,6 +567,24 @@ a character other than '@'." ;; are 64-bit. (string-suffix? "-mingw32" target))) +(define* (target-x86-32? #:optional (target (or (%current-target-system) + (%current-system)))) + "Is the architecture of TARGET a variant of Intel's 32-bit architecture +(IA32)?" + ;; Intel also has a 16-bit architecture in the iN86 series, i286 + ;; (see, e.g. https://en.wikipedia.org/wiki/Intel/808286) so this + ;; procedure is not named target-x86?. + (or (string-prefix? "i386-" target) + (string-prefix? "i486-" target) + (string-prefix? "i586-" target) + (string-prefix? "i686-" target))) + +(define* (target-x86-64? #:optional (target (or (%current-target-system) + (%current-system)))) + "Is the architecture of TARGET a variant of Intel/AMD's 64-bit +architecture (x86_64)?" + (string-prefix? "x86_64-" target)) + (define* (target-arm32? #:optional (target (or (%current-target-system) (%current-system)))) (string-prefix? "arm" target)) diff --git a/tests/utils.scm b/tests/utils.scm index e170070907..648e91f242 100644 --- a/tests/utils.scm +++ b/tests/utils.scm @@ -306,6 +306,29 @@ skip these tests." '("i686-linux-gnu" "i686-pc-gnu" "i686-w64-mingw32"))) +(test-equal "target-x86-32?" + '(#f #f #f #t #t #t #t #f) + ;; These are (according to Wikipedia) two RISC architectures + ;; by Intel and presumably not compatible with the x86-32 series. + (map target-x86-32? + '("i860-gnu" "i960-gnu" + ;; This is a 16-bit architecture + "i286-gnu" + ;; These are part of the x86-32 series. + "i386-gnu" "i486-gnu" "i586-gnu" "i686-gnu" + ;; Maybe this one will exist some day, but not yet. + "i786-gnu"))) + +(test-equal "target-x86-64?" + '(#t #f #f #f) + (map target-x86-64? + `("x86_64-linux-gnu" "i386-linux-gnu" + ;; Just because it includes "64" doesn't make it 64-bit. + "aarch64-linux-gnu" + ;; Note that (expt 2 109) in decimal notation starts with 64. + ;; However, it isn't 32-bit. + ,(format #f "x86_~a-linux-gnu" (expt 2 109))))) + (test-end) (false-if-exception (delete-file temp-file)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:24 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:24 +0000 Received: from localhost ([127.0.0.1]:43125 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpP-0001Ku-Ml for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:24 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpL-0001Je-KL for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:21 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDJEs; Wed, 14 Jul 2021 13:13:19 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 02/22] utils: Define 'target-hurd?' predicate. Date: Wed, 14 Jul 2021 13:12:47 +0200 Message-Id: <20210714111307.19324-3-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261199; bh=RPB2Fq+qwogIoKSxRZMQuB8cGMzdD3KornK1JVJPU0w=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=F0C0nUh67P8lATVm9qJKperEKHXc3U7ciWAfTWmSTwREhi8zG8qqVx+wKpo8r6JHp OubrfTVLEMnb4cfu+a361uyOQxonIzOo9wsQfOObLsaPTZuZv9n3A+5dYOZqkyumaJ 9HcBFA0OZD8zJJez3BgHB887mvWLtXubkFFpL6iJhRStd4Gp1qduaRLkgJJksZ3Gxr JvtuonS1en5XIr2kO2t/55NWP1eV/nIdLFbwhb7NymbRnRDIvD/Zo0qXj38NbENaAV wnGu82sFEqA5uVj2m1TzGBZmsIBc/W1CB/eN6tyCy84njJX1DC11QxwSt6ByD7ZIHf mkZZ1rVyccxuA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) It behaves similarily to the other target-...? procedures. The usage of hurd-triplet? / target-hurd? in libgc appears incorrect to me, as (%current-system) is normally never false. * gnu/packages/hurd.scm (hurd-triplet?): Move to ... * guix/util.scm (target-hurd?): ... here, let its argument default to (%current-target-system) or (%current-system), and write a docstring. * gnu/packages/hurd.scm (hurd-target?, hurd-system?): Use target-hurd? instead of hurd-triplet?. * gnu/packages/bdw-gc.scm (libgc): Likewise. * gnu/packages/cross-base.scm (cross-libc)[arguments]<#:configure-flags>: Likewise. (cross-libc)[arguments]<#:phases>: Likewise. (cross-libc)[arguments]<#:native-inputs>: Likewise. * gnu/packages/make-boostrap.scm (%glibc-stripped)[inputs]: Likewise. --- gnu/packages/bdw-gc.scm | 4 ++-- gnu/packages/cross-base.scm | 6 +++--- gnu/packages/hurd.scm | 10 +++------- gnu/packages/make-bootstrap.scm | 2 +- guix/utils.scm | 7 +++++++ 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm index 0d82889bac..5ced11bb64 100644 --- a/gnu/packages/bdw-gc.scm +++ b/gnu/packages/bdw-gc.scm @@ -56,8 +56,8 @@ ;; to configure script. See bug report and discussion: ;; ;; - ,@(if (hurd-triplet? (or (%current-system) - (%current-target-system))) + ,@(if (target-hurd? (or (%current-system) + (%current-target-system))) '("--disable-gcj-support") '())))) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index ced226ef34..78cbf871ac 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -505,7 +505,7 @@ and the cross tool chain." ,@(package-arguments libc)) ((#:configure-flags flags) `(cons ,(string-append "--host=" target) - ,(if (hurd-triplet? target) + ,(if (target-hurd? target) `(cons "--disable-werror" ,flags) flags))) ((#:phases phases) @@ -519,7 +519,7 @@ and the cross tool chain." (setenv "CROSS_LIBRARY_PATH" (string-append kernel "/lib")) ; for Hurd's libihash #t))) - ,@(if (hurd-triplet? target) + ,@(if (target-hurd? target) '((add-after 'install 'augment-libc.so (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out"))) @@ -536,7 +536,7 @@ and the cross tool chain." (native-inputs `(("cross-gcc" ,xgcc) ("cross-binutils" ,xbinutils) - ,@(if (hurd-triplet? target) + ,@(if (target-hurd? target) `(("cross-mig" ,@(assoc-ref (package-native-inputs xheaders) "cross-mig"))) diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm index 59a7b55943..222ddbce65 100644 --- a/gnu/packages/hurd.scm +++ b/gnu/packages/hurd.scm @@ -51,20 +51,16 @@ hurd-target? hurd-triplet?)) -(define (hurd-triplet? triplet) - (and (string-suffix? "-gnu" triplet) - (not (string-contains triplet "linux")))) - (define (hurd-target?) "Return true if the cross-compilation target or the current system is GNU/Hurd." - (or (and=> (%current-target-system) hurd-triplet?) + (or (and=> (%current-target-system) target-hurd?) (and (not (%current-target-system)) - (and=> (%current-system) hurd-triplet?)))) + (and=> (%current-system) target-hurd?)))) (define (hurd-system?) "Return true if the current system is the Hurd." - (and=> (%current-system) hurd-triplet?)) + (and=> (%current-system) target-hurd?)) (define (hurd-source-url version) (string-append "mirror://gnu/hurd/hurd-" diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 265884020e..5c306c145d 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -439,7 +439,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (assoc-ref %build-inputs "kernel-headers"))))) (inputs `(("kernel-headers" ,(if (or (and (%current-target-system) - (hurd-triplet? (%current-target-system))) + (target-hurd? (%current-target-system))) (string-suffix? "-hurd" (%current-system))) gnumach-headers linux-libre-headers)) diff --git a/guix/utils.scm b/guix/utils.scm index 58bbff2b36..5657a9d025 100644 --- a/guix/utils.scm +++ b/guix/utils.scm @@ -83,6 +83,7 @@ %current-target-system package-name->name+version target-linux? + target-hurd? target-mingw? target-arm32? target-aarch64? @@ -550,6 +551,12 @@ a character other than '@'." "Does the operating system of TARGET use the Linux kernel?" (->bool (string-contains target "linux"))) +(define* (target-hurd? #:optional (target (or (%current-target-system) + (%current-system)))) + "Does TARGET represent the GNU(/Hurd) system?" + (and (string-suffix? "-gnu" target) + (not (string-contains target "linux")))) + (define* (target-mingw? #:optional (target (%current-target-system))) (and target (string-suffix? "-mingw32" target))) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:31 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:32 +0000 Received: from localhost ([127.0.0.1]:43151 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpX-0001MM-Kf for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:31 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpN-0001Jg-JP for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:21 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDLFM; Wed, 14 Jul 2021 13:13:21 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 06/22] net-base: Don't cross-compile. Date: Wed, 14 Jul 2021 13:12:51 +0200 Message-Id: <20210714111307.19324-7-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261201; bh=dXo/CT5ws9YCjb4KyPL/cL4A6QUuDtlcTxOVUdW0BV8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=LR5k+ubsN5kgy2wDlM6jVhmAw9jlFvVOVq7vvHZvI1Y7MXZhUulGLW8Icbbr+qRdb 5cgmhMw31yX+v0fK1EHSzg4i1lPydvSzGC0WjYH075baGDfibIx3/h5PJHRnff3+z7 R+xKlSoUWY0sZvcseazPS3mG9yP/Sn36zD75FNCvnzMBs9nR5bILHgs41DBSwlxOHB uQTC+p9GTHi2quenyc54Qkhx57P5hOKCEBVovEuQTeYK8naJ1YDl02qWsoSXnBZQaj vO5gbvCwhCFnzq+z4CfJxl0uyQUMC75dvRcU4vE9oyMOwrwWxJc9klipudMlZOXjvJ diyK84L+JWN5g== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) net-base is pure data, so cross-compiling is pointless. * gnu/packages/admin.scm (net-base)[arguments]<#:target>: Set to #f. (net-base)[arguments]<#:allowed-references>: Disallow all references. --- gnu/packages/admin.scm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index aab62331a3..394575ffec 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -937,6 +937,11 @@ to allow automatic login and starting any app.") (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) + ;; This package consists solely of architecture-independent + ;; tables. Cross-compilation is pointless! Make sure we'll + ;; always get the same derivation. + #:target #f + #:allowed-references () #:builder (begin (use-modules (guix build utils) (srfi srfi-26)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:32 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:32 +0000 Received: from localhost ([127.0.0.1]:43153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpX-0001MP-Rf for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:32 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpN-0001Jd-40 for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:22 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDLFF; Wed, 14 Jul 2021 13:13:20 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 05/22] packages: Define this-package-input and this-package-native-input. Date: Wed, 14 Jul 2021 13:12:50 +0200 Message-Id: <20210714111307.19324-6-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261200; bh=+F3V0IHIUMToVYJ2+Q+SGOqXx5CD1I8U9LvkAPCAvXY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=dsPGDGLoXMmy4Yohg9W3e6U45H+ViXHbNFzaPx+Vyn1Sv1FPaEh3GV50MeR9vH0VS fMk4rKEz2MzCQZRRytZ6hG61RYdRbaU9ZQSl6HWlTdwsNwVMrwI+DvZz6J+hNEDxSG PjkFsdYK2pn0gWXZP9EmW/r2MghANQtEGG/JBqEH3FNYMUuWtbTSMBDWGbAhJBYnJ4 2JnHddtkwXyHdl0uue5kI90dmXLH3V6FAbPnMIiV6MpbOokLhI1kKfWq8fgyWcmOl5 3aKz2aCBn3PfYFrjvE/TFZ2eQnfN6fdUd6L6myEgrosfVHffRCxDna3LMizsA/yO1c YhCD/II1gHnfQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) These macros are intended to be used in build phases. More precisely, (assoc-ref %build-inputs "input") can be replaced by #$(this-package-input "input") or #+(this-package-native-input "native-input") as appropriate. * guix/packages.scm (package-input, package-native-input): New (unexported) procedures. (this-package-input, this-package-native-input): New macros. --- guix/packages.scm | 29 +++++++++++++++++++++++++++++ tests/packages.scm | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/guix/packages.scm b/guix/packages.scm index 3ba61b42c9..56300e6b61 100644 --- a/guix/packages.scm +++ b/guix/packages.scm @@ -108,6 +108,9 @@ deprecated-package package-field-location + this-package-input + this-package-native-input + package-direct-sources package-transitive-sources package-direct-inputs @@ -513,6 +516,32 @@ object." #f))) (_ #f))) +(define (package-input package name) + "Return the package input NAME of PACKAGE--i.e., an input +from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not +considered. If this input does not exist, return #f instead." + (and=> (or (assoc-ref (package-inputs package) name) + (assoc-ref (package-propagated-inputs package) name)) + car)) + +(define (package-native-input package name) + "Return the native package input NAME of PACKAGE--i.e., an input +from the ‘native-inputs’ field. If this native input does not exist, +return #f instead." + (and=> (assoc-ref (package-native-inputs package) name) + car)) + +(define-syntax-rule (this-package-input name) + "Return the input NAME of the package being defined--i.e., an input +from the ‘inputs’ or ‘propagated-inputs’ field. Native inputs are not +considered. If this input does not exist, return #f instead." + (package-input this-package name)) + +(define-syntax-rule (this-package-native-input name) + "Return the native package input NAME of the package being defined--i.e., +an input from the ‘native-inputs’ field. If this native input does not +exist, return #f instead." + (package-native-input this-package name)) ;; Error conditions. diff --git a/tests/packages.scm b/tests/packages.scm index 47fc34d3ce..9814015a05 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès ;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -1866,6 +1867,39 @@ (package-location (specification->package "guile@2")) (specification->location "guile@2")) +(test-eq "this-package-input, exists" + hello + (package-arguments + (dummy-package "a" + (inputs `(("hello" ,hello))) + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-input, exists in propagated-inputs" + hello + (package-arguments + (dummy-package "a" + (propagated-inputs `(("hello" ,hello))) + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-input, does not exist" + #f + (package-arguments + (dummy-package "a" + (arguments (this-package-input "hello"))))) + +(test-eq "this-package-native-input, exists" + hello + (package-arguments + (dummy-package "a" + (native-inputs `(("hello" ,hello))) + (arguments (this-package-native-input "hello"))))) + +(test-eq "this-package-native-input, does not exists" + #f + (package-arguments + (dummy-package "a" + (arguments (this-package-native-input "hello"))))) + (test-end "packages") ;;; Local Variables: -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:32 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:32 +0000 Received: from localhost ([127.0.0.1]:43155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpY-0001MW-9y for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:32 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpO-0001Jc-1d for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:22 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDMFT; Wed, 14 Jul 2021 13:13:21 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 07/22] tzdata: Don't bother with cross-compiling. Date: Wed, 14 Jul 2021 13:12:52 +0200 Message-Id: <20210714111307.19324-8-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261201; bh=Cmu09yDer4DaeEBMYUMihlI6CWPn3E1bzKVUj0Wn+SU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=HZZJXs678d3oExEZUIlXEG2/MtbI4xWVK0TPqxOiD82m2I75SjKVKfjjH7DSyLG+D XKdSxQfRDQkmeNUHe+CUC3/r9hfAbtBN/gwkmY3lGIKtmfwlHDrSDbYA6FQueZzsK5 O58CDTIJGx16HSX2tRY3K+BuyzcPzh1HQEhBEpphrOcXwVPcvgAKhk3I7X77wjdPr8 OVW/JCdWrI30frlo8hA9w4/QaqzxV/zOtG5IHBydq/xPo2t81M3f7uQhEZecceaJLK 6MhZZ4mrfcERXJmwBLTg5t3WWhP6Kph/vLdemtN79G1sGsEhTLjEjwvP4DVBt4xpNC lcLAI2RCzXROA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) The time zone database is architecture-independent, so trying to cross-compile it is pointless! * gnu/packages/base.scm (tzdata)[arguments]<#:target>: Set to #f. (tzdata)[allowed-references]: Only include the "out" output itself, to make sure no (architecture-dependent) binaries are installed. --- gnu/packages/base.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 565d2ccab8..88e4ec09a6 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -17,6 +17,7 @@ ;;; Copyright © 2020 Vitaliy Shatrov ;;; Copyright © 2020 Chris Marusich ;;; Copyright © 2021 Leo Le Bouter +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -1257,6 +1258,14 @@ command.") (build-system gnu-build-system) (arguments `(#:tests? #f + ;; This consists purely of (architecture-independent) data, + ;; so ‘cross-compilation’ is pointless here! + ;; (The binaries zic, dump, and tzselect are deleted in the post-install + ;; phase.) + #:target #f + ;; share/zoneinfo/posix is a symlink to share/zoneinfo, + ;; so include the package itself in #:allowed-references. + #:allowed-references ("out") #:make-flags (let ((out (assoc-ref %outputs "out")) (tmp (getenv "TMPDIR"))) (list (string-append "TOPDIR=" out) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:37 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:38 +0000 Received: from localhost ([127.0.0.1]:43157 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpd-0001Mo-L4 for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:37 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpO-0001Jh-G3 for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:23 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDMFZ; Wed, 14 Jul 2021 13:13:22 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 08/22] libgpg-error: Remove trailing #f from phases. Date: Wed, 14 Jul 2021 13:12:53 +0200 Message-Id: <20210714111307.19324-9-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261202; bh=rN441zyK8WHq8KGxpb4NN+FKMHbVY0resArbEcsKgRg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bmISeSMvZ4xXSLAUVutGr+Yo1wNr6uqhCAqmi89gntNaxhTula4Cs2QckJZrQR3S+ ivzAEKRg7vL70QI1R99djyM7SEeC+3Eqk//xuR0kY/7brP7w7PZmGmlhrTwRK34fXW EcNLYr1WaWVpKaqG/oYDP3ui/hGuzC8N6GmA4erPznRpc+YEQUvvipMmv+rfBGK3q5 42G+/gT0F1oCm2nc1gWXEva7cR8hQTFQpv0JD6w87GLaEkdM3VbiV2Dnt95YaZYJQg J6eCT7GWOqzO/dF9b7qYOMHyfaKhl13YSn8qC1QXzagkHQxREK4eB4wJUw8Tdf/zQF os5aWb1UlQjgQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) These aren't required anymore. * gnu/packages/gnupg.scm (libgpgerror)[arguments]{cross-symlinks}: Remove trailing #f. --- gnu/packages/gnupg.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index a6ec75765c..5c0d03927e 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -114,8 +114,7 @@ (string-append x "-unknown-linux-gnu"))))) (symlink (string-append "lock-obj-pub." triplet ".h") - "src/syscfg/lock-obj-pub.linux-gnu.h")) - #t)))) + "src/syscfg/lock-obj-pub.linux-gnu.h")))))) '())) (native-inputs `(("gettext" ,gettext-minimal))) (home-page "https://gnupg.org") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:38 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:38 +0000 Received: from localhost ([127.0.0.1]:43159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpd-0001Mq-Sl for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:38 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpO-0001Je-VE for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:23 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDNFg; Wed, 14 Jul 2021 13:13:22 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 09/22] libgpg-error: Prevent silent miscompilation some systems. Date: Wed, 14 Jul 2021 13:12:54 +0200 Message-Id: <20210714111307.19324-10-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261202; bh=QFau1FaeK/5b1bWqy9BVr+tMxwUOU/Qw1BH0pUCw/qc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vRMtq8u8p5o0JODt8vAOBNtgwpowRYI18830YT2GRNz91ir5nH9vpX7Ri5NAwim+g H+qYkLTfQyEh5Z6k8sjOmoXA+FkPu5GOQFU37Mfy69frv/F1x6y1GuBe2w7hhK5xNo gxfvPbr/CM3rxikfPRsZRV30cHLA1SfCUIZGTmfNMNKWWJdFcuoiLbTNiTKELFmma9 OfMUws+7+QQmNkW1JfRRBNAV1D7qmBZHS2iPFCF/kMhhwPcAmsewRfMqVx4DkmzN5x 2eAWQyEx+dyBYhi2AxsLnP38VwiLjAs2g8drJe/xFO3nZ/P/xVcuerdIbGWhZqaFQP Bt0Ww8bUHo7AQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) * gnu/packages/gpg.scm (libgpgerror)[arguments]<#:phases>{cross-symlinks}: Only link to src/syscfg/lock-obj-pub.linux-gnu.h if the package is being compiled for a Linux target. Do not link either if the architecture is unknown, as the headers vary with the architecture. --- gnu/packages/gnupg.scm | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 5c0d03927e..1a7c682ad6 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2018 Björn Höfling ;;; Copyright © 2019 Mathieu Othacehe ;;; Copyright © 2020 Fredrik Salomonsson +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -77,6 +78,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system perl) #:use-module (guix build-system python) + #:use-module (ice-9 match) #:use-module (srfi srfi-1)) (define-public libgpg-error @@ -94,27 +96,37 @@ (build-system gnu-build-system) (arguments (if (%current-target-system) - `(#:modules ((ice-9 match) - (guix build gnu-build-system) + `(#:modules ((guix build gnu-build-system) (guix build utils)) #:phases (modify-phases %standard-phases ;; When cross-compiling, some platform specific properties cannot ;; be detected. Create a symlink to the appropriate platform - ;; file. See Cross-Compiling section at: + ;; file if required. Note that these platform files depend on + ;; both the operating system and architecture! + ;; + ;; See Cross-Compiling section at: ;; https://github.com/gpg/libgpg-error/blob/master/README (add-after 'unpack 'cross-symlinks - (lambda* (#:key target inputs #:allow-other-keys) - (let ((triplet - (match (string-take target - (string-index target #\-)) - ("armhf" "arm-unknown-linux-gnueabi") - ("mips64el" "mips-unknown-linux-gnu") - (x - (string-append x "-unknown-linux-gnu"))))) - (symlink - (string-append "lock-obj-pub." triplet ".h") - "src/syscfg/lock-obj-pub.linux-gnu.h")))))) + (lambda _ + (define (link triplet source) + (symlink (string-append "lock-obj-pub." triplet ".h") + (string-append "src/syscfg/lock-obj-pub." + source ".h"))) + ,(let* ((target (%current-target-system)) + (architecture + (string-take target (string-index target #\-)))) + (cond ((target-linux? target) + (match architecture + ("armhf" + `(link "arm-unknown-linux-gnueabi" "linux-gnu")) + ("mips64el" + `(link "mips-unknown-linux-gnu" "linux-gnu")) + ;; Don't always link to the "linux-gnu" + ;; configuration, as this is not correct for + ;; all architectures. + (_ #t))) + (#t #t))))))) '())) (native-inputs `(("gettext" ,gettext-minimal))) (home-page "https://gnupg.org") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:38 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:38 +0000 Received: from localhost ([127.0.0.1]:43161 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpe-0001Mx-8l for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:38 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpP-0001Jg-Ck for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:23 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDNFm; Wed, 14 Jul 2021 13:13:23 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 10/22] libgpg-error: Fix cross-compilation error. Date: Wed, 14 Jul 2021 13:12:55 +0200 Message-Id: <20210714111307.19324-11-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261203; bh=GTJXiJu9i4qQ52TOPO4K/hcLzGRUNQA7Cm4Az8dv4LM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=kk+WpFSKmy9c05y5CoJUPEt3ZJ+RLM7e0XkMgekYIx+Bg0Sg9JDwK08FG0WGB+md6 3zsWRj4+k7MaFtvBVuhwnuPTANoc5yjp5l158uah3Mh9H238yT0gyLTWKXfik5a+Up ayJgkForix02FT9FtZcWaarYi7v44PcaWHRyEgE6kwpWp9GjJ6EeYjoM8UQyT34kP6 kZROVQD3vqbjVsDINcZSPni9UvwrEbNAXnKm79UFg2W0pZlYt//vfgcH4kYZvzXZxV 9DviFrAsTEm40sqPnKoyX2PAbI63vDbzF6TXJ2LxUVEBiJYTPzYsbzO1YWy9w0lkx4 eLdxQdUBNt8fg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) TODO: inform upstream about the cross-compilation error. * gnu/packages/gnupg.scm (libgpg-error)[arguments]{fix-gen-lock-obj.sh}: Prevent generated header files from being sprinkled with ‘\c’. --- gnu/packages/gnupg.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 1a7c682ad6..bb6fa4678b 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -100,6 +100,13 @@ (guix build utils)) #:phases (modify-phases %standard-phases + ;; If this is left out, some generated header + ;; files will be sprinkled with ‘\c’, which + ;; the compiler won't like. + (add-after 'unpack 'fix-gen-lock-obj.sh + (lambda _ + (substitute* "src/gen-lock-obj.sh" + (("if test -n `echo -n`") "if ! test -n `echo -n`")))) ;; When cross-compiling, some platform specific properties cannot ;; be detected. Create a symlink to the appropriate platform ;; file if required. Note that these platform files depend on -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:38 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:38 +0000 Received: from localhost ([127.0.0.1]:43163 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpe-0001N5-LL for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:38 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpP-0001Jd-SP for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:24 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDPFs; Wed, 14 Jul 2021 13:13:23 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 11/22] python: Fix reference to input when cross-compiling. Date: Wed, 14 Jul 2021 13:12:56 +0200 Message-Id: <20210714111307.19324-12-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261203; bh=tfhxpmot2txmcMbR0eEYan/RUbd5LXwGOg8MLYaAdXw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=TC/V+y0CLezPF5tte+IMc4tG86J2xnT2WTkplENQb1jBCiFKyhq5Xg1Y9rBrH0Y1P 8wMIZg90eyQXcEfcADYaGBsIz07dhNbmwyvsYOThK7l9J+DnnF2kOgjA6fNdIjYsJJ +TZjTJ7KAlY5xyFs12tX4Y6/2qBMhw6XDiU20Z/F/3yzpCLsTYLlTEoG4F5IFa/FVR nxaPUOwUe6WChB8pkDszS6EuuyovzrdtQ4vOx6B9JnIGe4nQ9dUThawUAs4ViNpV9a x9VJSP3ZbuneE9jApQu9x/HXKBUzigfre0jRUO5afS/tlKjyA16xXgh+raN3tU4NYY 0uo5v0o8krJ4Q== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) "sitecustomize.py" is a native input, so look it up in 'native-inputs', not 'inputs'. * gnu/packages/python.scm (customize-site): Look up "sizecustomize.py" in 'native-inputs', not 'inputs'. --- gnu/packages/python.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 227c612a68..ef47e79632 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -110,13 +110,14 @@ (define* (customize-site version) "Generate a install-sitecustomize.py phase, using VERSION." - `(lambda* (#:key inputs outputs #:allow-other-keys) + `(lambda* (#:key native-inputs inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (site-packages (string-append out "/lib/python" ,(version-major+minor version) "/site-packages")) - (sitecustomize.py (assoc-ref inputs "sitecustomize.py")) + (sitecustomize.py (assoc-ref (or native-inputs inputs) + "sitecustomize.py")) (dest (string-append site-packages "/sitecustomize.py"))) (mkdir-p site-packages) (copy-file sitecustomize.py dest) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:39 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:39 +0000 Received: from localhost ([127.0.0.1]:43165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpe-0001NC-Sr for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:39 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpQ-0001Jc-Bg for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:24 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDPFz; Wed, 14 Jul 2021 13:13:24 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 12/22] openssl: Remove trailing #t from phases. Date: Wed, 14 Jul 2021 13:12:57 +0200 Message-Id: <20210714111307.19324-13-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261204; bh=j/A6t2tDNHqcA+3FK2plLU7eEVpICq+dbE6XR1ZiAr0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ZpdQ6r2pduwC0kKDx7wq6m+ikBzJacjrDweHT22v5vBn5qCtzJk6HDAycC1fdCNTS /J/NBemy+Zy9E4NHJtX8dH+IBS8eMRNyV1t+JmmSbfHFWd86zoD2/Babn72DqUbzWm 0Iq8C3o7cIYDBqcQThfcroroBBaxQHG8eKkgjfASflAKQN1RjpXQoSn9k4cTfkL0RF hXsSoPwFTpXY3mgk2jHv3r0xrvSNR7mBUsKdW/QqD4mrgheBYC8vliZJYG8pXJxEOk eNo/dRwQRpY0n8N7L5usSX3Fb29SNGXrqgFh5leyoL5Fua6o5FTZgajnENLeSKBGBS stuj3pWL+aZOA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Delete trailing #t. --- gnu/packages/tls.scm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 297e16dd70..8a8fcb59fd 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -364,8 +364,7 @@ required structures.") ((string-prefix? "powerpc64" target) "linux-ppc64") ((string-prefix? "powerpc" target) - "linux-ppc"))) - #t))) + "linux-ppc")))))) '()) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) @@ -404,8 +403,7 @@ required structures.") (for-each (lambda (file) (install-file file slib) (delete-file file)) - (find-files lib "\\.a$")) - #t))) + (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation (lambda* (#:key outputs #:allow-other-keys) ;; Move man3 pages and full HTML documentation to "doc". @@ -418,8 +416,7 @@ required structures.") (copy-recursively man3 man-target) (delete-file-recursively man3) (copy-recursively html html-target) - (delete-file-recursively html) - #t))) + (delete-file-recursively html)))) (add-after 'install 'remove-miscellany (lambda* (#:key outputs #:allow-other-keys) @@ -428,8 +425,7 @@ required structures.") (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" ,(package-version this-package) - "/misc")) - #t)))))) + "/misc")))))))) (native-search-paths (list (search-path-specification (variable "SSL_CERT_DIR") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:40 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:40 +0000 Received: from localhost ([127.0.0.1]:43167 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpf-0001NJ-3b for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:40 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpQ-0001Jh-SP for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:25 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDQG4; Wed, 14 Jul 2021 13:13:24 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 13/22] openssl: Make the #:phases argument a G-expression. Date: Wed, 14 Jul 2021 13:12:58 +0200 Message-Id: <20210714111307.19324-14-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261204; bh=JHdidYibbmla5GyzrkyF1oyuXoOo0MlYIgVGOuNjBkE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=D32wl16MqOg+KGXgXW89FyBTRvb85yg2nTfid/odJhDEVlo3GA6lg1HwutUTEQoik qz4cQSdNKojbbdly4pxEf+oX3HH/n0lxHpLHnfV8jA8AtbgPrDiU0K39DuIBnDEVO3 3FU9lk0+mbrqOWVTyZFRqQyQfcV9WmlPNalwY6M+Fy1aaZuUJJwcV7qrrq73CB0gu/ LCaXhPiLX4Tz3HjrRn4rUb9FoRFKGO18s3jq4sTUWAMhdKl8F12IuIhUkoxtuLSjb6 1/agvhHoA0NvydkN6jW+IvKSSZ6uEM6RfBBn3uHordjceCHCID5Naw0vOpfYq4CQwc ILm6sYneHKSNg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) This allows using this-package-native-input later. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Make this a G-expression. (openssl-1.0)[arguments]<#:phases>: Likewise. --- gnu/packages/tls.scm | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 8a8fcb59fd..0024709a96 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -40,6 +40,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) + #:use-module (guix gexp) #:use-module (guix build-system gnu) #:use-module (guix build-system go) #:use-module (guix build-system perl) @@ -339,9 +340,10 @@ required structures.") ;; so we explicitly disallow it here. #:disallowed-references ,(list (canonical-package perl)) #:phases + ,#~ (modify-phases %standard-phases - ,@(if (%current-target-system) - '((add-before + #$@(if (%current-target-system) + #~((add-before 'configure 'set-cross-compile (lambda* (#:key target outputs #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) @@ -365,7 +367,7 @@ required structures.") "linux-ppc64") ((string-prefix? "powerpc" target) "linux-ppc")))))) - '()) + #~()) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -375,9 +377,9 @@ required structures.") (("/usr/bin/env") (string-append (assoc-ref %build-inputs "coreutils") "/bin/env"))) - (invoke ,@(if (%current-target-system) - '("./Configure") - '("./config")) + (invoke #$@(if (%current-target-system) + #~("./Configure") + #~("./config")) "shared" ;build shared libraries "--libdir=lib" @@ -386,13 +388,13 @@ required structures.") ;; conventional. (string-append "--openssldir=" out "/share/openssl-" - ,(package-version this-package)) + #$(package-version this-package)) (string-append "--prefix=" out) (string-append "-Wl,-rpath," lib) - ,@(if (%current-target-system) - '((getenv "CONFIGURE_TARGET_ARCH")) - '()))))) + #$@(if (%current-target-system) + #~((getenv "CONFIGURE_TARGET_ARCH")) + #~()))))) (add-after 'install 'move-static-libraries (lambda* (#:key outputs #:allow-other-keys) ;; Move static libraries to the "static" output. @@ -424,7 +426,7 @@ required structures.") ;; scripts. Remove them to avoid retaining a reference on Perl. (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" - ,(package-version this-package) + #$(package-version this-package) "/misc")))))))) (native-search-paths (list (search-path-specification @@ -469,7 +471,7 @@ required structures.") ;; Parallel build is not supported in 1.0.x. ((#:parallel-build? _ #f) #f) ((#:phases phases) - `(modify-phases ,phases + #~(modify-phases #$phases (add-before 'patch-source-shebangs 'patch-tests (lambda* (#:key inputs native-inputs #:allow-other-keys) (let ((bash (assoc-ref (or native-inputs inputs) "bash"))) @@ -492,9 +494,9 @@ required structures.") ;; Override this phase because OpenSSL 1.0 does not understand -rpath. (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) - (invoke ,@(if (%current-target-system) - '("./Configure") - '("./config")) + (invoke #$@(if (%current-target-system) + #~("./Configure") + #~("./config")) "shared" ;build shared libraries "--libdir=lib" @@ -502,12 +504,12 @@ required structures.") ;; PREFIX/ssl. Change that to something more ;; conventional. (string-append "--openssldir=" out - "/share/openssl-" ,version) + "/share/openssl-" #$version) (string-append "--prefix=" out) - ,@(if (%current-target-system) - '((getenv "CONFIGURE_TARGET_ARCH")) - '()))))) + #$@(if (%current-target-system) + '((getenv "CONFIGURE_TARGET_ARCH")) + '()))))) (delete 'move-extra-documentation) (add-after 'install 'move-man3-pages (lambda* (#:key outputs #:allow-other-keys) @@ -532,7 +534,7 @@ required structures.") ;; scripts. Remove them to avoid retaining a reference on Perl. (let ((out (assoc-ref outputs "out"))) (delete-file-recursively (string-append out "/share/openssl-" - ,version "/misc")) + #$version "/misc")) #t))))))))) (define-public libressl -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:40 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:41 +0000 Received: from localhost ([127.0.0.1]:43169 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpg-0001NR-G7 for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:40 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpR-0001Je-CI for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:25 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDQGA; Wed, 14 Jul 2021 13:13:25 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 14/22] openssl: Use G-exp machinery for referring to outputs. Date: Wed, 14 Jul 2021 13:12:59 +0200 Message-Id: <20210714111307.19324-15-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261205; bh=3B3QDGP7dkXVyEAZJY8WCsdDeSjbBRGSdZVIeTRN4/s=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=CiWy67s/8m5qJI6r8IDGYwcNRXb6r87IUAQJv3UOUXyEGUYJJBX9Cz/WaOtCOG+aL Pfosp6QtHqlT2KZZ99387cfeaKydSf7b2pZt7fqvlKAAcVn88NGqy/8OKRHdT3sEQJ AfsvqNG2osnPQql+/8xRVftt7Z1hvoVDTtu2rqoZPeCYeGzE9I7AHsK86Tu+6iTjxN FDroTuUH/XKGALkBC/uj0y2I372CHFR2Seyxv3MXt7sxSR43Wrha4U7/0Eph6r93PA bbo9yiDnwY65wT0Ghm+xXl5TPPD/jzLKLv61c3LmXAZODT2Ddx3sFqWQohr/v5VSr8 EvYN+PMf/7fDw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) This doesn't fix anything broken, just for simplifying the code a little while we're rebuilding the world anyway. IMHO this makes the code a little more readable. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>: Don't refer to the association list 'outputs', use #$output, #$output:doc and #$output:static instead. --- gnu/packages/tls.scm | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 0024709a96..fd4a8b07b2 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -18,6 +18,7 @@ ;;; Copyright © 2020, 2021 Maxim Cournoyer ;;; Copyright © 2021 Solene Rapenne ;;; Copyright © 2021 Brice Waegeneire +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -345,7 +346,7 @@ required structures.") #$@(if (%current-target-system) #~((add-before 'configure 'set-cross-compile - (lambda* (#:key target outputs #:allow-other-keys) + (lambda* (#:key target #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) (setenv "CONFIGURE_TARGET_ARCH" (cond @@ -369,8 +370,8 @@ required structures.") "linux-ppc")))))) #~()) (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) + (lambda _ + (let* ((out #$output) (lib (string-append out "/lib"))) ;; It's not a shebang so patch-source-shebangs misses it. (substitute* "config" @@ -396,23 +397,23 @@ required structures.") #~((getenv "CONFIGURE_TARGET_ARCH")) #~()))))) (add-after 'install 'move-static-libraries - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; Move static libraries to the "static" output. - (let* ((out (assoc-ref outputs "out")) + (let* ((out #$output) (lib (string-append out "/lib")) - (static (assoc-ref outputs "static")) + (static #$output:static) (slib (string-append static "/lib"))) (for-each (lambda (file) (install-file file slib) (delete-file file)) (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; Move man3 pages and full HTML documentation to "doc". - (let* ((out (assoc-ref outputs "out")) + (let* ((out #$output) (man3 (string-append out "/share/man/man3")) (html (string-append out "/share/doc/openssl")) - (doc (assoc-ref outputs "doc")) + (doc #$output:doc) (man-target (string-append doc "/share/man/man3")) (html-target (string-append doc "/share/doc/openssl"))) (copy-recursively man3 man-target) @@ -421,13 +422,12 @@ required structures.") (delete-file-recursively html)))) (add-after 'install 'remove-miscellany - (lambda* (#:key outputs #:allow-other-keys) + (lambda _ ;; The 'misc' directory contains random undocumented shell and Perl ;; scripts. Remove them to avoid retaining a reference on Perl. - (let ((out (assoc-ref outputs "out"))) - (delete-file-recursively (string-append out "/share/openssl-" - #$(package-version this-package) - "/misc")))))))) + (delete-file-recursively (string-append #$output "/share/openssl-" + #$(package-version this-package) + "/misc"))))))) (native-search-paths (list (search-path-specification (variable "SSL_CERT_DIR") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:41 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:41 +0000 Received: from localhost ([127.0.0.1]:43171 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpg-0001NZ-TK for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:41 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpS-0001Jg-4f for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:26 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDRGJ; Wed, 14 Jul 2021 13:13:25 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 15/22] openssl: Move documentation instead of copying and deleting it. Date: Wed, 14 Jul 2021 13:13:00 +0200 Message-Id: <20210714111307.19324-16-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261205; bh=7hdPjzxNLQ83Vv9FIbPnqNpMd0gcoxSAu51LPUrnFVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=jYBnqPfNZGZKDamGQ/K9+yOSJE0Wnh2nwsrJA2pFev+HqbHBd7zOkD3Lh3ck3GR/9 iAN47/1duIygRGJZ3CxQwMwEthqpcUddzt13/DrmyEk67lS93RLQTEwtwza0YjBPBE FQuYCL8puWVakO6VrTM2lHGZdG5n5/TkItL3e8O7z/45eJEnIukA6ShJQ+sP1WC80E /Q6CdcnDEVSRyqRprijhM4MzSZZFKmA4E1jg6KmH7fAPrYC7O0BEyoxnGdjpZI7o5O sRl+dOmMklIiyN7otTkIFgCaYE7+6f2MihOlHC7VGBb4xd/cq59FQbTrjdnccRI/5o Czx6l0tVmbXjA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) * gnu/packages/tls.scm (openssl)[arguments]<#:phases>{move-extra-documentation}: Use 'rename-file' instead of 'copy-recursively' and 'delete-file-recursively'. --- gnu/packages/tls.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index fd4a8b07b2..fcecc6ba41 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -416,10 +416,10 @@ required structures.") (doc #$output:doc) (man-target (string-append doc "/share/man/man3")) (html-target (string-append doc "/share/doc/openssl"))) - (copy-recursively man3 man-target) - (delete-file-recursively man3) - (copy-recursively html html-target) - (delete-file-recursively html)))) + (mkdir-p (dirname man3-target)) + (mkdir-p (dirname html-target)) + (rename-file man3 man-target) + (rename-file html html-target)))) (add-after 'install 'remove-miscellany (lambda _ -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:41 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:41 +0000 Received: from localhost ([127.0.0.1]:43173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cph-0001Ng-78 for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:41 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpT-0001Jd-6U for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:27 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDSGT; Wed, 14 Jul 2021 13:13:26 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 16/22] openssl: Move all man pages to separate output, not only man3. Date: Wed, 14 Jul 2021 13:13:01 +0200 Message-Id: <20210714111307.19324-17-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261206; bh=JIGYb8218IvtqiEioBC7F/bNr95fECSLQRHNxnN79pc=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=A3wiUGkRdgqbQZsgy0zNyWR13zp786EIQWCAOztt6FB0TriJzw6kjK6vEB3+ufjvN 4xV0tV+WdjQOw4XEvH58I9mKAaLyKCM3fs5sm+4L42g3bGqik6hMKTnZ1pYKFbT4F7 m+1SERPk4B4Acm3GRS8De42v7q9AJ6wSPfnllrrs6mTsDCtHqaT7oREZ+BenJDP854 BA0g2p1K1N4RTz39EGV8d+A2pKQ3tKqhmy+LKv/z6bF7MPflpWLlHRj9R1sPq6pT32 d1ZuBYu3tiBVZUBhE33bT2zpZgyeuRbInz+06L/T+igiAn+TT6H7SoRN+SziKXDHw4 JztxQesjs+WVA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) There does not seem to be any reason to only move man3 pages. So, move all man pages to a separate output for documentation. * gnu/packages/tls.scm (openssl)[arguments]<#:phases>{move-extra-documentation}: Move all man pages, not only man3. --- gnu/packages/tls.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index fcecc6ba41..6cebc1d6ed 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -409,16 +409,16 @@ required structures.") (find-files lib "\\.a$"))))) (add-after 'install 'move-extra-documentation (lambda _ - ;; Move man3 pages and full HTML documentation to "doc". + ;; Move man pages and full HTML documentation to "doc". (let* ((out #$output) - (man3 (string-append out "/share/man/man3")) - (html (string-append out "/share/doc/openssl")) + (man (string-append out "/share/man")) + (html (string-append out "/share/doc/openssl")) (doc #$output:doc) - (man-target (string-append doc "/share/man/man3")) + (man-target (string-append doc "/share/man")) (html-target (string-append doc "/share/doc/openssl"))) - (mkdir-p (dirname man3-target)) + (mkdir-p (dirname man-target)) (mkdir-p (dirname html-target)) - (rename-file man3 man-target) + (rename-file man man-target) (rename-file html html-target)))) (add-after 'install 'remove-miscellany -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:41 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:42 +0000 Received: from localhost ([127.0.0.1]:43175 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cph-0001Nn-HK for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:41 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpT-0001Jc-JZ for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:27 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDTGe; Wed, 14 Jul 2021 13:13:27 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 17/22] openssl: Extract logic for computing CONFIGURE_TARGET_ARCH. Date: Wed, 14 Jul 2021 13:13:02 +0200 Message-Id: <20210714111307.19324-18-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261207; bh=59zKgKpvwivXNlDrsEtd2QfN4mS/pBxN1trlqWAIkiA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=TL2A97EQuMDJS5sLHrsFhMsdQKEeulLCqV/k3bOPEhoi4r8IcaSjFIYBL+QncYqEp Ko6Hx0G/cyU0NvDrNQDqeVZ1LViPPIOCTis7QcOdZkb3wyLHbMBYfUjJXikHdrjagZ l2qut5k8gkGRKNscMdNod6bDMvhcYQO3Z4D8Lr53Pt2czARG2VyVjKPA+B2dKFHr3j joIq7lufKEREyoztT3NHS3oUbYUI33xHnqbiUnd3EKDy8hvf0Qcp8WeHfmYJHgeLO0 ZTUp8WQq0WWEUnsKGvOAOV7xSY3MLq09Fmc8gK2dBdMUaRwjBqUFqvOsafG0QTirCP hKLdVBhITj9pw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) By computing this value outside the build code, new targets can be added without causing rebuilds for other targets. * gnu/packages/tls.scm (target->openssl-target): New procedure. (openssl)[arguments]<#:phases>{set-cross-compile}: Use it. --- gnu/packages/tls.scm | 46 ++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 19 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 6cebc1d6ed..8c7bba0b6e 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -311,6 +311,31 @@ required structures.") (define-public guile3.0-gnutls (deprecated-package "guile3.0-gnutls" gnutls)) +(define (target->openssl-target target) + "Return the value to set CONFIGURE_TARGET_ARCH to when cross-compiling +OpenSSL for TARGET." + ;; Keep this code outside the build code, + ;; such that new targets can be added + ;; without causing rebuilds for other targets. + (cond ((string-prefix? "i586" target) + "hurd-x86") + ((string-prefix? "i686" target) + "linux-x86") + ((string-prefix? "x86_64" target) + "linux-x86_64") + ((string-prefix? "mips64el" target) + "linux-mips64") + ((string-prefix? "arm" target) + "linux-armv4") + ((string-prefix? "aarch64" target) + "linux-aarch64") + ((string-prefix? "powerpc64le" target) + "linux-ppc64le") + ((string-prefix? "powerpc64" target) + "linux-ppc64") + ((string-prefix? "powerpc" target) + "linux-ppc"))) + (define-public openssl (package (name "openssl") @@ -349,25 +374,8 @@ required structures.") (lambda* (#:key target #:allow-other-keys) (setenv "CROSS_COMPILE" (string-append target "-")) (setenv "CONFIGURE_TARGET_ARCH" - (cond - ((string-prefix? "i586" target) - "hurd-x86") - ((string-prefix? "i686" target) - "linux-x86") - ((string-prefix? "x86_64" target) - "linux-x86_64") - ((string-prefix? "mips64el" target) - "linux-mips64") - ((string-prefix? "arm" target) - "linux-armv4") - ((string-prefix? "aarch64" target) - "linux-aarch64") - ((string-prefix? "powerpc64le" target) - "linux-ppc64le") - ((string-prefix? "powerpc64" target) - "linux-ppc64") - ((string-prefix? "powerpc" target) - "linux-ppc")))))) + #$(target->openssl-target + (%current-target-system)))))) #~()) (replace 'configure (lambda _ -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:42 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:42 +0000 Received: from localhost ([127.0.0.1]:43177 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cph-0001Nu-SM for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:42 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpU-0001Jh-26 for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:28 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDTGl; Wed, 14 Jul 2021 13:13:27 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 18/22] glib: Use a correct python in scripts when cross-compiling. Date: Wed, 14 Jul 2021 13:13:03 +0200 Message-Id: <20210714111307.19324-19-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261207; bh=6hXOZRlH/MbFutLfGerdJWqLFB8VU+FCKvMl68udIcU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=V08ShEau99fTkVSpwLG6Tj7PdCMA+Mzrm+acEKoKJkY1LljyRBvs7szD1JF96WUuF ByMBa/+F1g4CnDnztOihU5U/utesQ9cxTilpLzaFtXl+9FqKYNjicM1ejoUppzCNUk hvkYqY/yxhHAGCAYj2oTOjxohk2LlnmMdz4tdUjCcZ0J3Cc8UMkaaMjG2oVB0/iEqh Ext/kB1p90eB0PL6qjQuCVzNoC6Yvv3oEyVZnWVS+c9JzysFoYsL9DlAnaTB3sboQn ypwAc9DbMaia4jYe5c8Sbf+CvtE8Zqxk5B+yoJGJymyQmoaQoMU17qTskLpAevJWH9 juzp6Xvzc+97A== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) During the build, a native python should be used as these scripts will be invoked during the build, but when installed, they should be a python for the system we're compiling for. * gnu/packages/glib.scm (glib)[arguments]<#:phases>{patch-python-references}: Look up "python" in 'native-inputs', not 'inputs'. (glib)[inputs]{python,python-wrapper,bash-minimal}: New inputs. --- gnu/packages/glib.scm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index f0be2ddaa4..99f5c5d450 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2020 Florian Pelz ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2020 Arthur Margerit +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -223,14 +224,19 @@ shared NFS home directories.") #t)) ;; Python references are not being patched in patch-phase of build, ;; despite using python-wrapper as input. So we patch them manually. + ;; + ;; These python scripts are both used during build and installed, + ;; so at first, use a python from 'native-inputs', not 'inputs'. When + ;; cross-compiling, the 'patch-shebangs' phase will replace + ;; the native python with a python from 'inputs'. (add-after 'unpack 'patch-python-references - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs #:allow-other-keys) (substitute* '("gio/gdbus-2.0/codegen/gdbus-codegen.in" "glib/gtester-report.in" "gobject/glib-genmarshal.in" "gobject/glib-mkenums.in") (("@PYTHON@") - (string-append (assoc-ref inputs "python") + (string-append (assoc-ref (or native-inputs inputs) "python") "/bin/python" ,(version-major+minor (package-version python))))) @@ -293,6 +299,13 @@ shared NFS home directories.") ("xsltproc" ,libxslt))) (inputs `(("bash-completion" ,bash-completion) + ;; "python", "python-wrapper" and "bash-minimal" + ;; are for the 'patch-shebangs' phase, to make + ;; sure the installed scripts end up with a correct shebang + ;; when cross-compiling. + ("python" ,python) + ("python-wrapper" ,python-wrapper) + ("bash-minimal" ,bash-minimal) ("dbus" ,dbus) ("libelf" ,libelf))) (propagated-inputs -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:47 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:47 +0000 Received: from localhost ([127.0.0.1]:43179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpi-0001O2-7J for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:47 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpU-0001Je-GS for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:28 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDTGq; Wed, 14 Jul 2021 13:13:28 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 19/22] glib: Verify the cross-compiled python is used in installed scripts. Date: Wed, 14 Jul 2021 13:13:04 +0200 Message-Id: <20210714111307.19324-20-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261208; bh=EdavLGCsmRKElVg3FWy+Yzt6MfN1A72DGpe66SV+JdI=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=RSspVK/kIJspHzSfxXGgR73Tn3bFtdCWre6Plg6bFcPw3Ybkc5cujLh0KDIjT15va rpI5ZhEMJVZs6L/zed3yh2jbHiKzUQUPlkWVXxddwDUXiyCatvkq40/8Ld1OO2/0A0 HNNgV7sVENq7oZtc2cZe9B2Mkq+fW6/JOAAV4xi6SsvpKbGq+hhGW2XjlTgbxnUm4M ayWaJ1MZsU60D//as2rc9wPL3cuEg20sLRshx8xF89cFe2PizPcAzDTDVWAj409Lyn R76BAEWwvBldQu7z2fCVeVp9xXB1tfkRq1dqQk9lyIHzvFGS1FIhFdu9sQ/7NOcTw8 oFI//b91I20dw== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) * gnu/packages/glib.scm (glib)[arguments]<#:disallowed-references>: Disallow the native python when cross-compiling. --- gnu/packages/glib.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 99f5c5d450..e4ebed7e2c 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -77,6 +77,8 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix utils) + #:use-module (guix gexp) + #:use-module (srfi srfi-26) #:use-module ((srfi srfi-1) #:hide (zip)) ;; Export variables up-front to allow circular dependency with the 'xorg' @@ -200,7 +202,15 @@ shared NFS home directories.") "static" ;static libraries "bin")) ;executables; depends on Python (arguments - `(#:disallowed-references (,tzdata-for-tests) + `(#:disallowed-references + (,tzdata-for-tests + ;; Verify glib-mkenums, gtester, ... use the cross-compiled + ;; python. + ,@(if (%current-target-system) + (map (cut gexp-input <> #:native? #t) + `(,(this-package-native-input "python") + ,(this-package-native-input "python-wrapper"))) + '())) #:configure-flags '("--default-library=both" "-Dman=true" "-Dselinux=disabled") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:47 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:48 +0000 Received: from localhost ([127.0.0.1]:43181 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpn-0001OF-LT for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:47 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39834) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpU-0001Jg-Va for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:29 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDUH1; Wed, 14 Jul 2021 13:13:28 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 20/22] glib: Look up "tzdata" in 'native-inputs', not 'inputs'. Date: Wed, 14 Jul 2021 13:13:05 +0200 Message-Id: <20210714111307.19324-21-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261208; bh=ZjEmLqo+AcCFyVjjjxBD6t1exf9WfOPlDV6wnmCi6Pw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Qi/ykeGwVw1UVy57r6V5BpOAtZiFtcpax3k0ySz0e4x8qZCzVxoKFBIQhuy/FZwIt mMlqnAYeduhxNbu7OaZwOHxMJwsxNnNFCQnVjd0r3bJXiplzaC4tQquTyxIuRPZvn7 o8Eizt0YkFhZAR9h1XG6KBhDS7pi+B2TiVINy8fuVxBv2pOiK1GwqVwiNrWEcKhwGc e9nrPYXQADgWe7hFhKGj/jJM0b2ASx0XYTsq60LnVewl9yhiWohsoHZlgYSfbnpLo8 HSVhEyKQyhoSl0dPEt38R3IAgqNJmJIBvwRZXKHdSq9IM7odL4zosX4R3a+Jvdsu2p MWFOmcfW/Y0nQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) Otherwise, "tzdata" won't be found when cross-compiling and string-append will complain about types. Alternatively, "tzdata" could be moved from 'native-inputs' to 'inputs'. * gnu/packages/glib.scm (glib)[arguments]<#:phases>{pre-check}: Look up "tzdata" in 'native-inputs', not 'inputs'. --- gnu/packages/glib.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index e4ebed7e2c..01683df8c5 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -252,10 +252,11 @@ shared NFS home directories.") (package-version python))))) #t)) (add-before 'check 'pre-check - (lambda* (#:key inputs outputs #:allow-other-keys) + (lambda* (#:key native-inputs inputs outputs #:allow-other-keys) ;; For tests/gdatetime.c. (setenv "TZDIR" - (string-append (assoc-ref inputs "tzdata") + (string-append (assoc-ref (or native-inputs inputs) + "tzdata") "/share/zoneinfo")) ;; Some tests want write access there. (setenv "HOME" (getcwd)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:48 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:48 +0000 Received: from localhost ([127.0.0.1]:43183 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpn-0001OM-VD for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:48 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpV-0001Jd-Cz for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:30 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDUH9; Wed, 14 Jul 2021 13:13:29 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 21/22] libelf: Update configure script and config.guess and config.sub. Date: Wed, 14 Jul 2021 13:13:06 +0200 Message-Id: <20210714111307.19324-22-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261209; bh=PmFSgOK+NW3vsdrropSeKY9k4clOeil1DsdklQk68os=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=mSe25dcGEyF84xHyi51hSmnzd3uX479YIH19xeAN4MVIxGY8SywMEadYY2wk3PKKH coca6t0chgCZm7QMG62OKnQ3dpcc6FX9p0uCoCYsTsUUSmn0s05OVvpBjZ2Ac/Lg5t NPOVGmd/lKSxZunZ7MKkviAsLmfZy9KD84W25QDc5PUQd0EhITPZCVXXu8UABgZmEy tscVUYr7wUenAEie3SsekM/3zlMzgT3Q8nZtxblHfTEiicekNhD/dm1jCzwJCwIB49 Ix2cOzWBbhjYLluOKmoMfIouM6Dza4ZbabQFF4B+/YRWW6TpvsqsVgvx5qffNxG2QP HIlMuTQME32KA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) The current configure script is too old to find the cross-compiler and support variables passed as arguments. Also, config.guess and config.sub are too old to recognise powerpc64 and aarch64. Solve this by regenerating the 'configure' script and replacing 'config.guess' and 'config.sub'. * gnu/packages/elf.scm (libelf)[arguments]<#:phases>{configure}: Remove phase. (libelf)[arguments]<#:phases>{delete-configure}: Regenerate the configure script and replace 'config.guess' and 'config.sub'. --- gnu/packages/elf.scm | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/gnu/packages/elf.scm b/gnu/packages/elf.scm index 0309dd95b5..2bc1d00048 100644 --- a/gnu/packages/elf.scm +++ b/gnu/packages/elf.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2020 Mark Wielaard ;;; Copyright © 2020 Michael Rohleder ;;; Copyright © 2021 Leo Le Bouter +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -32,6 +33,7 @@ #:use-module (guix build-system gnu) #:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+)) #:use-module (gnu packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages compression) #:use-module (gnu packages documentation) #:use-module (gnu packages gcc) @@ -205,22 +207,32 @@ static analysis of the ELF binaries at hand.") (arguments `(#:phases (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs #:allow-other-keys) - ;; This old `configure' script doesn't support - ;; variables passed as arguments. - (let ((out (assoc-ref outputs "out"))) - (setenv "CONFIG_SHELL" (which "bash")) - (invoke "./configure" - (string-append "--prefix=" out) - ,@(if (string=? "powerpc64le-linux" - (%current-system)) - '("--host=powerpc64le-unknown-linux-gnu") - '()) - ,@(if (string=? "aarch64-linux" - (%current-system)) - '("--host=aarch64-unknown-linux-gnu") - '())))))))) + ;; This old 'configure' script doesn't support cross-compilation + ;; well. I.e., it fails to find the cross-compiler. Also, + ;; the old `configure' script doesn't support variables passed as + ;; arguments. A third problem is that config.sub is too old to + ;; recognise aarch64 and powerpc64le. + ;; + ;; Solve this by regenerating the configure script and letting + ;; autoreconf update 'config.sub'. While 'config.sub' is updated + ;; anyway, update 'config.guess' as well. + (add-before 'bootstrap 'delete-configure + (lambda* (#:key native-inputs inputs #:allow-other-keys) + (delete-file "configure") + (delete-file "config.sub") + (delete-file "config.guess") + (for-each (lambda (file) + (install-file + (string-append + (assoc-ref (or native-inputs inputs) "automake") + "/share/automake-" + ,(version-major+minor (package-version automake)) + "/" file) ".")) + '("config.sub" "config.guess"))))))) + (native-inputs + `(("autoconf" ,autoconf) + ;; For up-to-date 'config.guess' and 'config.sub' + ("automake" ,automake))) (home-page (string-append "https://web.archive.org/web/20181111033959/" "http://www.mr511.de/software/english.html")) (synopsis "ELF object file access library") -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:13:49 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:13:49 +0000 Received: from localhost ([127.0.0.1]:43185 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpo-0001OT-D8 for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:49 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:39776) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cpW-0001Jc-3Z for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:13:31 -0400 Received: from localhost.localdomain ([188.188.219.228]) by andre.telenet-ops.be with bizsmtp id UzDG2500W4wFxCU01zDVHG; Wed, 14 Jul 2021 13:13:29 +0200 From: Maxime Devos To: 49025@debbugs.gnu.org Subject: [PATCH v6 22/22] build-system/meson: Support cross-compilation. Date: Wed, 14 Jul 2021 13:13:07 +0200 Message-Id: <20210714111307.19324-23-maximedevos@telenet.be> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210714111307.19324-1-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261209; bh=EGbE3W5tHUR4rkwn9FHgmcY2gE5rQmyVyDj5i+kyEzo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=tEaJkh6VLX0mq6BC2w5oS5CYnNHJqlaJdWslP8RCMhnFJ4MSW+CM8DTSbA7bZ+jw+ KRNUnjlU9jaYEXJFq71kIJ9WScfG/MLcpQCJsut2bdEkSjZyGhGIhreXydDfH8qLwq 2OPWbvsfFwgssNfHfV7n8Izac7kSFlZ2jbljQOOtkDpEkOVgErCxbXzO5RAn7Oz6FM p67Qkd93Le8/OyPxQpVrcTGO9mQkvO/+XIFolThxp7to6m9q/XXwahMoCBF7f8Suv1 Dz90gijDeXDaB1cBqWqa9etuO9ZGGPGh4ktq6+tA8mjqZLn3LdWWFF9nC0Kp+3XWdk 2tg9q2xkccdEA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , Maxime Devos 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.7 (-) For cross-compilation, meson needs to be passed a ‘cross file’ with information on the architecture, CPU type, endianness and operating system, and the name of the cross-compiler binaries. The new module (guix build meson-configuration) has some utilities for writing these cross files, used by 'make-cross-file' in a G-exp. The values for the cross file are generated by 'make-machine-alist' and 'make-binaries-alist'. 'make-machine-alist' and 'make-binaries-alist' live on the host side, such that new architectures and operating systems can be added without causing rebuilds for old architectures. All operating systems and targets supported by Guix are theoretically supported, but only aarch64-linux-gnu, powerpc64le-linux-gnu and arm-linux-gnueabihf have been tested. i686-linux-gnu has also been tested with a previous version of this patch series but required some changes to 'cross-base.scm'. This has been tested with: $ ./pre-inst-env guix build glib --target=TARGET * guix/build/meson-configuration.scm (write-section-header): New procedure. (write-assignment): New procedure. (write-assignments): New procedure. * guix/build-system/meson.scm (target-hurd?): New predicate. (make-machine-alist): New procedure. (make-binaries-alist): New procedure. (make-cross-file): New procedure. (meson-cross-build): New procedure. (lower)[build-inputs]: Add standard cross packages when cross-compiling. Do not include regular 'inputs' when cross-compiling. (lower)[host-inputs]: Include 'inputs' when cross-compiling. (lower)[target-inputs]: Add cross packages when cross-compiling. (lower)[build]: Call 'meson-cross-build' instead of 'cross-build' when cross-compiling. (lower)[target]: Set it. (lower)[private-keywords]: Do not remove #:target when cross-compiling. --- Makefile.am | 1 + guix/build-system/meson.scm | 209 ++++++++++++++++++++++++++--- guix/build/meson-configuration.scm | 56 ++++++++ 3 files changed, 247 insertions(+), 19 deletions(-) create mode 100644 guix/build/meson-configuration.scm diff --git a/Makefile.am b/Makefile.am index 05f013e3c2..6c17ab8492 100644 --- a/Makefile.am +++ b/Makefile.am @@ -234,6 +234,7 @@ MODULES = \ guix/build/emacs-utils.scm \ guix/build/java-utils.scm \ guix/build/lisp-utils.scm \ + guix/build/meson-configuration.scm \ guix/build/maven/java.scm \ guix/build/maven/plugin.scm \ guix/build/maven/pom.scm \ diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm index 5adc0f92c8..dae0abde94 100644 --- a/guix/build-system/meson.scm +++ b/guix/build-system/meson.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017 Peter Mikkelsen ;;; Copyright © 2018, 2019 Marius Bakke ;;; Copyright © 2021 Ludovic Courtès +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,7 +31,8 @@ #:use-module (guix packages) #:use-module (ice-9 match) #:export (%meson-build-system-modules - meson-build-system)) + meson-build-system + make-cross-file)) ;; Commentary: ;; @@ -40,6 +42,68 @@ ;; ;; Code: +(define (make-machine-alist triplet) + "Make an association list describing what should go into +the ‘host_machine’ section of the cross file when cross-compiling +for TRIPLET." + `((system . ,(cond ((target-hurd? triplet) "gnu") + ((target-linux? triplet) "linux") + ((target-mingw? triplet) "windows") + (#t (error "meson: unknown operating system")))) + (cpu_family . ,(cond ((target-x86-32? triplet) "x86") + ((target-x86-64? triplet) "x86_64") + ((target-arm32? triplet) "arm") + ((target-aarch64? triplet) "aarch64") + ((target-powerpc? triplet) + (if (target-64bit? triplet) + "ppc64" + "ppc")) + (#t (error "meson: unknown architecture")))) + (cpu . ,(cond ((target-x86-32? triplet) ; i386, ..., i686 + (substring triplet 0 4)) + ((target-x86-64? triplet) "x86_64") + ((target-aarch64? triplet) "armv8-a") + ((target-arm32? triplet) "armv7") + ;; According to #mesonbuild on OFTC, there does not appear + ;; to be an official-ish list of CPU types recognised by + ;; Meson, the "cpu" field is not used by Meson itself and + ;; most software doesn't look at this field, except perhaps + ;; for selecting optimisations, so set it to something + ;; arbitrary. + (#t "strawberries"))) + (endian . ,(cond ((string-prefix? "powerpc64le-" triplet) "little") + ((string-prefix? "mips64el-" triplet) "little") + ((target-x86-32? triplet) "little") + ((target-x86-64? triplet) "little") + ;; At least in Guix. Aarch64 and 32-bit arm + ;; have a big-endian mode as well. + ((target-arm? triplet) "little") + (#t (error "meson: unknown architecture")))))) + +(define (make-binaries-alist triplet) + "Make an associatoin list describing what should go into +the ‘binaries’ section of the cross file when cross-compiling for +TRIPLET." + `((c . ,(cc-for-target triplet)) + (cpp . ,(cxx-for-target triplet)) + (pkgconfig . ,(pkg-config-for-target triplet)) + (objcopy . ,(string-append triplet "-objcopy")) + (ar . ,(string-append triplet "-ar")) + (ld . ,(string-append triplet "-ld")) + (strip . ,(string-append triplet "-strip")))) + +(define (make-cross-file triplet) + (computed-file "cross-file" + (with-imported-modules '((guix build meson-configuration)) + #~(begin + (use-modules (guix build meson-configuration)) + (call-with-output-file #$output + (lambda (port) + (write-section-header port "host_machine") + (write-assignments port '#$(make-machine-alist triplet)) + (write-section-header port "binaries") + (write-assignments port '#$(make-binaries-alist triplet)))))))) + (define %meson-build-system-modules ;; Build-side modules imported by default. `((guix build meson-build-system) @@ -68,24 +132,34 @@ #:rest arguments) "Return a bag for NAME." (define private-keywords - `(#:meson #:ninja #:inputs #:native-inputs #:outputs #:target)) - - (and (not target) ;; TODO: add support for cross-compilation. - (bag - (name name) - (system system) - (build-inputs `(("meson" ,meson) - ("ninja" ,ninja) - ,@native-inputs - ,@inputs - ;; Keep the standard inputs of 'gnu-build-system'. - ,@(standard-packages))) - (host-inputs (if source - `(("source" ,source)) - '())) - (outputs outputs) - (build meson-build) - (arguments (strip-keyword-arguments private-keywords arguments))))) + `(#:meson #:ninja #:inputs #:native-inputs #:outputs + ,@(if target + '() + '(#:target)))) + + (bag + (name name) + (system system) (target target) + (build-inputs `(("meson" ,meson) + ("ninja" ,ninja) + ,@native-inputs + ,@(if target '() inputs) + ;; Keep the standard inputs of 'gnu-build-system'. + ,@(if target + (standard-cross-packages target 'host) + '()) + ,@(standard-packages))) + (host-inputs `(,@(if source + `(("source" ,source)) + '()) + ,@(if target inputs '()))) + ;; Keep the standard inputs of 'gnu-buid-system'. + (target-inputs (if target + (standard-cross-packages target 'target) + '())) + (outputs outputs) + (build (if target meson-cross-build meson-build)) + (arguments (strip-keyword-arguments private-keywords arguments)))) (define* (meson-build name inputs #:key @@ -161,6 +235,103 @@ has a 'meson.build' file." #:disallowed-references disallowed-references #:guile-for-build guile))) +(define* (meson-cross-build name + #:key + target + build-inputs host-inputs target-inputs + guile source + (outputs '("out")) + (configure-flags ''()) + (search-paths '()) + (native-search-paths '()) + + (build-type "debugoptimized") + (tests? #f) + (test-target "test") + (glib-or-gtk? #f) + (parallel-build? #t) + (parallel-tests? #f) + (validate-runpath? #t) + (patch-shebangs? #t) + (strip-binaries? #t) + (strip-flags ''("--strip-debug")) + (strip-directories ''("lib" "lib64" "libexec" + "bin" "sbin")) + (elf-directories ''("lib" "lib64" "libexec" + "bin" "sbin")) + ;; See 'gnu-cross-build' for why this needs to be + ;; disabled when cross-compiling. + (make-dynamic-linker-cache? #f) + (phases '%standard-phases) + (system (%current-system)) + (imported-modules %meson-build-system-modules) + (modules '((guix build meson-build-system) + (guix build utils))) + allowed-references + disallowed-references) + "Cross-build SOURCE for TARGET using MESON, and with INPUTS, assuming that +SOURCE has a 'meson.build' file." + (define cross-file + (make-cross-file target)) + (define inputs + (if (null? target-inputs) + (input-tuples->gexp host-inputs) + #~(append #$(input-tuples->gexp host-inputs) + #+(input-tuples->gexp target-inputs)))) + (define builder + (with-imported-modules imported-modules + #~(begin + (use-modules #$@(sexp->gexp modules)) + + (define build-phases + #$(let ((phases (if (pair? phases) (sexp->gexp phases) phases))) + (if glib-or-gtk? + phases + #~(modify-phases #$phases + (delete 'glib-or-gtk-compile-schemas) + (delete 'glib-or-gtk-wrap))))) + + ;; Do not use 'with-build-variables', as there should be + ;; no reason to use %build-inputs and friends. + (meson-build #:source #+source + #:system #$system + #:build #$(nix-system->gnu-triplet system) + #:target #$target + #:outputs #$(outputs->gexp outputs) + #:inputs #$inputs + #:native-inputs #+(input-tuples->gexp build-inputs) + #:search-paths '#$(sexp->gexp + (map search-path-specification->sexp + search-paths)) + #:native-search-paths '#$(sexp->gexp + (map search-path-specification->sexp + native-search-paths)) + #:phases build-phases + #:make-dynamic-linker-cache? #$make-dynamic-linker-cache? + #:configure-flags `("--cross-file" #+cross-file + ,@#$(sexp->gexp configure-flags)) + #:build-type #$build-type + #:tests? #$tests? + #:test-target #$test-target + #:parallel-build? #$parallel-build? + #:parallel-tests? #$parallel-tests? + #:validate-runpath? #$validate-runpath? + #:patch-shebangs? #$patch-shebangs? + #:strip-binaries? #$strip-binaries? + #:strip-flags #$(sexp->gexp strip-flags) + #:strip-directories #$(sexp->gexp strip-directories) + #:elf-directories #$(sexp->gexp elf-directories))))) + + (mlet %store-monad ((guile (package->derivation (or guile (default-guile)) + system #:graft? #f))) + (gexp->derivation name builder + #:system system + #:target target + #:substitutable? substitutable? + #:allowed-references allowed-references + #:disallowed-references disallowed-references + #:guile-for-build guile))) + (define meson-build-system (build-system (name 'meson) diff --git a/guix/build/meson-configuration.scm b/guix/build/meson-configuration.scm new file mode 100644 index 0000000000..1aac5f8f0a --- /dev/null +++ b/guix/build/meson-configuration.scm @@ -0,0 +1,56 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Maxime Devos +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix build meson-configuration) + #:use-module (ice-9 match) + #:export (write-section-header write-assignment write-assignments)) + +;; Commentary: +;; +;; Utilities for generating a ‘Cross build definition file’ for +;; the Meson build system. Configuration values are currently +;; never escaped. In practice this is unlikely to be a problem +;; in the build environment. +;; +;; Code: + +(define (write-section-header port section-name) + "Write a section header for a section named SECTION-NAME to PORT." + (format port "[~a]~%" section-name)) + +(define (write-assignment port key value) + "Write an assignment of VALUE to KEY to PORT. + +VALUE must be a string (without any special characters such as quotes), +a boolean or an integer. Lists are currently not supported" + (match value + ((? string?) + (format port "~a = '~a'~%" key value)) + ((? integer?) + (format port "~a = ~a~%" key value)) + (#f + (format port "~a = true~%" key)) + (#t + (format port "~a = false~%" key)))) + +(define* (write-assignments port alist) + "Write the assignments in ALIST, an association list, to PORT." + (for-each (match-lambda + ((key . value) + (write-assignment port key value))) + alist)) -- 2.32.0 From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 07:22:52 2021 Received: (at 49025) by debbugs.gnu.org; 14 Jul 2021 11:22:52 +0000 Received: from localhost ([127.0.0.1]:43219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cya-0001eR-0s for submit@debbugs.gnu.org; Wed, 14 Jul 2021 07:22:52 -0400 Received: from xavier.telenet-ops.be ([195.130.132.52]:47822) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3cyY-0001eJ-AW for 49025@debbugs.gnu.org; Wed, 14 Jul 2021 07:22:50 -0400 Received: from butterfly.local ([188.188.219.228]) by xavier.telenet-ops.be with bizsmtp id UzNn2500R4wFxCU01zNoWM; Wed, 14 Jul 2021 13:22:48 +0200 Message-ID: <641a980736152d3998b89859988504ac13078eea.camel@telenet.be> Subject: Re: [PATCH v6 10/22] libgpg-error: Fix cross-compilation error. From: Maxime Devos To: 49025@debbugs.gnu.org Date: Wed, 14 Jul 2021 13:22:39 +0200 In-Reply-To: <20210714111307.19324-11-maximedevos@telenet.be> References: <20210714111307.19324-1-maximedevos@telenet.be> <20210714111307.19324-11-maximedevos@telenet.be> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-2lOb/HaQ8rbKO6+1XRbJ" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626261768; bh=szRnJNPPuUDAxC9/MXmHEIZa2vqlN7C4nVcDOj2cc9g=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=ngLEuLvJdglgq0OT2InChljRqhpv8Y6UzenpJUK3U8flKU8a3bw6yg8UtWAM28nK6 M53iVHRn43uu5R5mg9yXFSb3Aq58/1KmnPgHfUcHIFDl0k1kFTlYuaePaTbw3YBp0S NA6pxn2FYaSAIuCWqZv8pQTJ4LQawkWvE/t6aeMS/6Gh2Asdgu3o/NLrWKtpHvNLBK A6MOjNkhynvD8CPKS2grWQ+SWw+TV2zlcbtpH/mSPY3OE5RiaWWhoE9zx0NcV5dkbB oquhVvOc5fl/AGnowTC7nnzjs/8cyf/CHhPppGy5UjHbJ62nQtsz0OalH7vrrNuksM DPOZGcA1exXMQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe 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.7 (-) --=-2lOb/HaQ8rbKO6+1XRbJ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Maxime Devos schreef op wo 14-07-2021 om 13:12 [+0200]: > TODO: inform upstream about the cross-compilation error. It appears that upstream is already informed: . Greetings, Maxime. --=-2lOb/HaQ8rbKO6+1XRbJ 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+4iGRcl7gUCYO7JABccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7ndqAP904/QkLoRJg3BBH9ErIyK6iAvt TCH9wF9BHPVSv29tLwD/elCnDCdYNu5VzHOG32B5azPb89FQE8xv+71HNj2ergQ= =KvSC -----END PGP SIGNATURE----- --=-2lOb/HaQ8rbKO6+1XRbJ-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 14 13:28:47 2021 Received: (at 49025-done) by debbugs.gnu.org; 14 Jul 2021 17:28:48 +0000 Received: from localhost ([127.0.0.1]:45851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3igh-0006k0-OI for submit@debbugs.gnu.org; Wed, 14 Jul 2021 13:28:47 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54716) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3igg-0006jn-Bi for 49025-done@debbugs.gnu.org; Wed, 14 Jul 2021 13:28:46 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:48492) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3iga-00083w-2Q; Wed, 14 Jul 2021 13:28:40 -0400 Received: from [2a01:e0a:19b:d9a0:f2f7:a404:c3d3:f8b4] (port=34770 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3igZ-0003hf-7Y; Wed, 14 Jul 2021 13:28:39 -0400 From: Mathieu Othacehe To: Maxime Devos Subject: Re: [PATCH v6 22/22] build-system/meson: Support cross-compilation. References: <20210714111307.19324-1-maximedevos@telenet.be> <20210714111307.19324-23-maximedevos@telenet.be> Date: Wed, 14 Jul 2021 19:28:37 +0200 In-Reply-To: <20210714111307.19324-23-maximedevos@telenet.be> (Maxime Devos's message of "Wed, 14 Jul 2021 13:13:07 +0200") Message-ID: <8735sgn6t6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49025-done Cc: 49025-done@debbugs.gnu.org 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 (---) Hey Maxime, > All operating systems and targets supported by Guix are > theoretically supported, but only aarch64-linux-gnu, > powerpc64le-linux-gnu and arm-linux-gnueabihf have been > tested. i686-linux-gnu has also been tested with a previous > version of this patch series but required some changes > to 'cross-base.scm'. That's great, I pushed the whole series on core-updates. Now let's see if we can get more packages to cross-compile :)! Thanks, Mathieu From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 18 13:58:45 2021 Received: (at 49025) by debbugs.gnu.org; 18 Jul 2021 17:58:45 +0000 Received: from localhost ([127.0.0.1]:57115 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5B3t-00086b-6i for submit@debbugs.gnu.org; Sun, 18 Jul 2021 13:58:45 -0400 Received: from hera.aquilenet.fr ([185.233.100.1]:36570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5B3r-00086O-0D for 49025@debbugs.gnu.org; Sun, 18 Jul 2021 13:58:43 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id BD4A93E5; Sun, 18 Jul 2021 19:42:45 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g685g4iiREEZ; Sun, 18 Jul 2021 19:42:45 +0200 (CEST) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id D546225D; Sun, 18 Jul 2021 19:42:44 +0200 (CEST) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxime Devos Subject: Re: bug#49025: [PATCH core-updates 00/37] Support cross-compilation with meson References: <20210714111307.19324-1-maximedevos@telenet.be> <20210714111307.19324-6-maximedevos@telenet.be> Date: Sun, 18 Jul 2021 19:42:37 +0200 In-Reply-To: <20210714111307.19324-6-maximedevos@telenet.be> (Maxime Devos's message of "Wed, 14 Jul 2021 13:12:50 +0200") Message-ID: <871r7v5xiq.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: -- Authentication-Results: hera.aquilenet.fr X-Rspamd-Server: hera X-Rspamd-Queue-Id: BD4A93E5 X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; RCVD_NO_TLS_LAST(0.10)[]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , 49025@debbugs.gnu.org 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: -0.0 (/) Hello! Maxime Devos writes: > These macros are intended to be used in build phases. > More precisely, (assoc-ref %build-inputs "input") can be > replaced by #$(this-package-input "input") or #+(this-package-native-input > "native-input") as appropriate. > > * guix/packages.scm > (package-input, package-native-input): New (unexported) procedures. > (this-package-input, this-package-native-input): New macros. As discussed some time ago on IRC, I think it would be good to homogenize this with =E2=80=98lookup-package-input=E2=80=99 and related pro= cedures introduced in ba32f6363878165b3ca53113f6c95b8677b8537b (we both had the same idea :-)). What about keeping the =E2=80=98this-=E2=80=99 macros above, rewriting them= in terms of =E2=80=98lookup-=E2=80=99, and removing =E2=80=98package-input=E2=80=99 and= =E2=80=98package-native-input=E2=80=99? Anyhow, I=E2=80=99m glad this series made it into the repo, thumbs up comra= des! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 19 05:40:59 2021 Received: (at 49025) by debbugs.gnu.org; 19 Jul 2021 09:40:59 +0000 Received: from localhost ([127.0.0.1]:58085 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5Plj-0003rd-1R for submit@debbugs.gnu.org; Mon, 19 Jul 2021 05:40:59 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:34070) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5Plh-0003rV-Be for 49025@debbugs.gnu.org; Mon, 19 Jul 2021 05:40:58 -0400 Received: from ptr-bvsjgyjmffd7q9timvx.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:aaf1:9810:a0b8:a55d]) by baptiste.telenet-ops.be with bizsmtp id Wxgv2500P0mfAB401xgvn8; Mon, 19 Jul 2021 11:40:56 +0200 Message-ID: <474342a545267f124f9a783415fe466ed048ada1.camel@telenet.be> Subject: Re: bug#49025: [PATCH core-updates 00/37] Support cross-compilation with meson From: Maxime Devos To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Date: Mon, 19 Jul 2021 11:40:41 +0200 In-Reply-To: <871r7v5xiq.fsf_-_@gnu.org> References: <20210714111307.19324-1-maximedevos@telenet.be> <20210714111307.19324-6-maximedevos@telenet.be> <871r7v5xiq.fsf_-_@gnu.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-Nna4G/PsTnfg8JLS624j" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r21; t=1626687656; bh=wvjJ5LGuvWLByqcmgr+fWKsQjTQm/0/ctVz4+fyQlFw=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=hmhrXKn5M/tgjFuXxTHwW/ZRfXUs7bICLmgZD+PBSWTgDl2adl46P598ETJTGYmwk MOsjyz8LPwy2f/JdPoX5vgJ7Z9SF4JW8qyOq4HsC7+njGPr04OkOfHDp7pQUj8RqGr JbPrgoRigHjy6hZc39fdT36ISvVTY41+MakAQEGt6h/BNd3oJa7SrQM/DsaQt3NFwF GSoskGjxzXXJn04W8WGDDjRgH3V5/WlwCYQxd8dFESdXFoQIgMXuOP0Cl+cUvPlnOh cOJU8v1Lp6EsghoCLKFLJTb+wlmfZLGQDnAGpqBLduFiv63bVrzh8IrfIn/4UBStyJ O4N98FPGAUTDg== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , 49025@debbugs.gnu.org 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.7 (-) --=-Nna4G/PsTnfg8JLS624j Content-Type: multipart/mixed; boundary="=-jaqE2YNUvqEWQGJ20kH/" --=-jaqE2YNUvqEWQGJ20kH/ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s schreef op zo 18-07-2021 om 19:42 [+0200]: > As discussed some time ago on IRC, I think it would be good to > homogenize this with =E2=80=98lookup-package-input=E2=80=99 and related p= rocedures > introduced in ba32f6363878165b3ca53113f6c95b8677b8537b (we both had the > same idea :-)). >=20 > What about keeping the =E2=80=98this-=E2=80=99 macros above, rewriting th= em in terms of > =E2=80=98lookup-=E2=80=99, and removing =E2=80=98package-input=E2=80=99 a= nd =E2=80=98package-native-input=E2=80=99? I've written a patch (see attachement) to do this. Greetings, MMaxime. --=-jaqE2YNUvqEWQGJ20kH/ Content-Disposition: inline; filename*0=0001-packages-Use-lookup-package-input-and-friends-instea.pat; filename*1=ch Content-Type: text/x-patch; name="0001-packages-Use-lookup-package-input-and-friends-instea.patch"; charset="UTF-8" Content-Transfer-Encoding: base64 RnJvbSBmOTgwM2FhNzdmMzQ4MjE0YjYyOTVkMzYzNTg1MjgyYTJiMmYzNWU2IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXhpbWUgRGV2b3MgPG1heGltZWRldm9zQHRlbGVuZXQuYmU+ CkRhdGU6IE1vbiwgMTkgSnVsIDIwMjEgMTE6MDg6NDAgKzAyMDAKU3ViamVjdDogW1BBVENIXSBw YWNrYWdlczogVXNlICdsb29rdXAtcGFja2FnZS1pbnB1dCcgYW5kIGZyaWVuZHMgaW5zdGVhZCBv ZgogJ3BhY2thZ2UtaW5wdXQnLgoKKiBndWl4L3BhY2thZ2VzLnNjbQogIChwYWNrYWdlLWlucHV0 LCBwYWNrYWdlLW5hdGl2ZS1pbnB1dCk6IFJlbW92ZS4KICAodGhpcy1wYWNrYWdlLWlucHV0KTog VXNlICdsb29rdXAtcGFja2FnZS1pbnB1dCcgYW5kCiAgJ2xvb2t1cC1wYWNrYWdlLXByb3BhZ2F0 ZWQtaW5wdXQnIGluc3RlYWQgb2YgJ3BhY2thZ2UtaW5wdXQnLgogICh0aGlzLXBhY2thZ2UtbmF0 aXZlLWlucHV0KTogVXNlICdsb29rdXAtcGFja2FnZS1uYXRpdmUtaW5wdXQnCiAgaW5zdGVhZCBv ZiAncGFja2FnZS1pbnB1dCcuCi0tLQogZ3VpeC9wYWNrYWdlcy5zY20gfCAyMCArKystLS0tLS0t LS0tLS0tLS0tLQogMSBmaWxlIGNoYW5nZWQsIDMgaW5zZXJ0aW9ucygrKSwgMTcgZGVsZXRpb25z KC0pCgpkaWZmIC0tZ2l0IGEvZ3VpeC9wYWNrYWdlcy5zY20gYi9ndWl4L3BhY2thZ2VzLnNjbQpp bmRleCBkM2ZhNzJmZDA5Li4yMzQ5YmI0MzQwIDEwMDY0NAotLS0gYS9ndWl4L3BhY2thZ2VzLnNj bQorKysgYi9ndWl4L3BhY2thZ2VzLnNjbQpAQCAtNTUwLDMyICs1NTAsMTggQEAgb2JqZWN0LiIK ICAgICAgICAgI2YpKSkKICAgICAoXyAjZikpKQogCi0oZGVmaW5lIChwYWNrYWdlLWlucHV0IHBh Y2thZ2UgbmFtZSkKLSAgIlJldHVybiB0aGUgcGFja2FnZSBpbnB1dCBOQU1FIG9mIFBBQ0tBR0Ut LWkuZS4sIGFuIGlucHV0Ci1mcm9tIHRoZSDigJhpbnB1dHPigJkgb3Ig4oCYcHJvcGFnYXRlZC1p bnB1dHPigJkgZmllbGQuICBOYXRpdmUgaW5wdXRzIGFyZSBub3QKLWNvbnNpZGVyZWQuICBJZiB0 aGlzIGlucHV0IGRvZXMgbm90IGV4aXN0LCByZXR1cm4gI2YgaW5zdGVhZC4iCi0gIChhbmQ9PiAo b3IgKGFzc29jLXJlZiAocGFja2FnZS1pbnB1dHMgcGFja2FnZSkgbmFtZSkKLSAgICAgICAgICAg ICAoYXNzb2MtcmVmIChwYWNrYWdlLXByb3BhZ2F0ZWQtaW5wdXRzIHBhY2thZ2UpIG5hbWUpKQot ICAgICAgICAgY2FyKSkKLQotKGRlZmluZSAocGFja2FnZS1uYXRpdmUtaW5wdXQgcGFja2FnZSBu YW1lKQotICAiUmV0dXJuIHRoZSBuYXRpdmUgcGFja2FnZSBpbnB1dCBOQU1FIG9mIFBBQ0tBR0Ut LWkuZS4sIGFuIGlucHV0Ci1mcm9tIHRoZSDigJhuYXRpdmUtaW5wdXRz4oCZIGZpZWxkLiBJZiB0 aGlzIG5hdGl2ZSBpbnB1dCBkb2VzIG5vdCBleGlzdCwKLXJldHVybiAjZiBpbnN0ZWFkLiIKLSAg KGFuZD0+IChhc3NvYy1yZWYgKHBhY2thZ2UtbmF0aXZlLWlucHV0cyBwYWNrYWdlKSBuYW1lKQot ICAgICAgICAgY2FyKSkKLQogKGRlZmluZS1zeW50YXgtcnVsZSAodGhpcy1wYWNrYWdlLWlucHV0 IG5hbWUpCiAgICJSZXR1cm4gdGhlIGlucHV0IE5BTUUgb2YgdGhlIHBhY2thZ2UgYmVpbmcgZGVm aW5lZC0taS5lLiwgYW4gaW5wdXQKIGZyb20gdGhlIOKAmGlucHV0c+KAmSBvciDigJhwcm9wYWdh dGVkLWlucHV0c+KAmSBmaWVsZC4gIE5hdGl2ZSBpbnB1dHMgYXJlIG5vdAogY29uc2lkZXJlZC4g IElmIHRoaXMgaW5wdXQgZG9lcyBub3QgZXhpc3QsIHJldHVybiAjZiBpbnN0ZWFkLiIKLSAgKHBh Y2thZ2UtaW5wdXQgdGhpcy1wYWNrYWdlIG5hbWUpKQorICAob3IgKGxvb2t1cC1wYWNrYWdlLWlu cHV0IHRoaXMtcGFja2FnZSBuYW1lKQorICAgICAgKGxvb2t1cC1wYWNrYWdlLXByb3BhZ2F0ZWQt aW5wdXQgdGhpcy1wYWNrYWdlIG5hbWUpKSkKIAogKGRlZmluZS1zeW50YXgtcnVsZSAodGhpcy1w YWNrYWdlLW5hdGl2ZS1pbnB1dCBuYW1lKQogICAiUmV0dXJuIHRoZSBuYXRpdmUgcGFja2FnZSBp bnB1dCBOQU1FIG9mIHRoZSBwYWNrYWdlIGJlaW5nIGRlZmluZWQtLWkuZS4sCiBhbiBpbnB1dCBm cm9tIHRoZSDigJhuYXRpdmUtaW5wdXRz4oCZIGZpZWxkLiAgSWYgdGhpcyBuYXRpdmUgaW5wdXQg ZG9lcyBub3QKIGV4aXN0LCByZXR1cm4gI2YgaW5zdGVhZC4iCi0gIChwYWNrYWdlLW5hdGl2ZS1p bnB1dCB0aGlzLXBhY2thZ2UgbmFtZSkpCisgIChsb29rdXAtcGFja2FnZS1uYXRpdmUtaW5wdXQg dGhpcy1wYWNrYWdlIG5hbWUpKQogCiA7OyBFcnJvciBjb25kaXRpb25zLgogCi0tIAoyLjMyLjAK Cg== --=-jaqE2YNUvqEWQGJ20kH/-- --=-Nna4G/PsTnfg8JLS624j 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+4iGRcl7gUCYPVImhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7l2/AQC/5Ndo41Ikpwcq9MWQeR/vipUP mVel8MpziKwJG4KifgEAwTCUPEXWMmVCXRCEXNL0bxCjAWa2FYOJHpSWAH6u7ww= =WBFe -----END PGP SIGNATURE----- --=-Nna4G/PsTnfg8JLS624j-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 23 04:53:14 2021 Received: (at 49025) by debbugs.gnu.org; 23 Jul 2021 08:53:14 +0000 Received: from localhost ([127.0.0.1]:42258 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6qvi-0006B8-1y for submit@debbugs.gnu.org; Fri, 23 Jul 2021 04:53:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43526) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6qvf-0006As-Rh for 49025@debbugs.gnu.org; Fri, 23 Jul 2021 04:53:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50944) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6qvZ-0003l0-D9; Fri, 23 Jul 2021 04:53:05 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=42894 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6qvY-0005nn-AX; Fri, 23 Jul 2021 04:53:05 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxime Devos Subject: Re: bug#49025: [PATCH core-updates 00/37] Support cross-compilation with meson References: <20210714111307.19324-1-maximedevos@telenet.be> <20210714111307.19324-6-maximedevos@telenet.be> <871r7v5xiq.fsf_-_@gnu.org> <474342a545267f124f9a783415fe466ed048ada1.camel@telenet.be> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 5 Thermidor an 229 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 23 Jul 2021 10:53:02 +0200 In-Reply-To: <474342a545267f124f9a783415fe466ed048ada1.camel@telenet.be> (Maxime Devos's message of "Mon, 19 Jul 2021 11:40:41 +0200") Message-ID: <87k0lhcsy9.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 49025 Cc: Mathieu Othacehe , 49025@debbugs.gnu.org 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 (---) Hi, Maxime Devos skribis: > From f9803aa77f348214b6295d363585282a2b2f35e6 Mon Sep 17 00:00:00 2001 > From: Maxime Devos > Date: Mon, 19 Jul 2021 11:08:40 +0200 > Subject: [PATCH] packages: Use 'lookup-package-input' and friends instead= of > 'package-input'. > > * guix/packages.scm > (package-input, package-native-input): Remove. > (this-package-input): Use 'lookup-package-input' and > 'lookup-package-propagated-input' instead of 'package-input'. > (this-package-native-input): Use 'lookup-package-native-input' > instead of 'package-input'. Pushed, thanks! Ludo=E2=80=99. From unknown Fri Sep 05 09:30:08 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 20 Aug 2021 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator