From patchwork Thu Jul 8 17:51:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: M X-Patchwork-Id: 31237 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 26E8A27BC81; Thu, 8 Jul 2021 19:43:30 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,MAILING_LIST_MULTI,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A379827BC78 for ; Thu, 8 Jul 2021 19:43:29 +0100 (BST) Received: from localhost ([::1]:45470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1Yzg-0001YM-Ms for patchwork@mira.cbaines.net; Thu, 08 Jul 2021 14:43:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58518) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1YBu-000836-Ll for guix-patches@gnu.org; Thu, 08 Jul 2021 13:52:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45874) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1YBu-0005Ix-ED for guix-patches@gnu.org; Thu, 08 Jul 2021 13:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m1YBu-0002UK-7n for guix-patches@gnu.org; Thu, 08 Jul 2021 13:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49437] [PATCH core-updates] build-system/qt: Fix build failures when Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 08 Jul 2021 17:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49437 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Mathieu Othacehe Cc: 49437@debbugs.gnu.org Received: via spool by 49437-submit@debbugs.gnu.org id=B49437.16257666979532 (code B ref 49437); Thu, 08 Jul 2021 17:52:02 +0000 Received: (at 49437) by debbugs.gnu.org; 8 Jul 2021 17:51:37 +0000 Received: from localhost ([127.0.0.1]:57420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1YBV-0002Tg-2m for submit@debbugs.gnu.org; Thu, 08 Jul 2021 13:51:37 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:33328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1YBR-0002TV-Ub for 49437@debbugs.gnu.org; Thu, 08 Jul 2021 13:51:36 -0400 Received: from [172.20.10.4] ([188.189.203.76]) by michel.telenet-ops.be with bizsmtp id ShrX250041fQufw06hrXbe; Thu, 08 Jul 2021 19:51:32 +0200 Message-ID: <52c57042714d524c092002e64dfd53e4ebde5b02.camel@telenet.be> From: Maxime Devos Date: Thu, 08 Jul 2021 19:51:25 +0200 In-Reply-To: <87pmvsvp7v.fsf@gnu.org> References: <37bb64ffbb63ba40b6583d9dea983704c1658377.camel@telenet.be> <87pmvsvp7v.fsf@gnu.org> 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=1625766692; bh=HEnMuoL3/NkvXBrnIoykcGWmcvSn4lE/YNHYkRKl9yA=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=bbRDZUgtzKHRJvDm7lnZ9cZQsnWNUi9SLrQJv9DRdz1GVo4N/tdyraaLqQD6JaKye VicqgeCNqYitB0H2TqOsx78YLZ/La5UUhvJ4DSAlT36gM7uBAf4Y9S6M6cCoN9Dp6v Nku/rwONFuHuWpudSKx79EN3SwlQg0a5lXGOPnU2ak83HCL3FLxQ2c6QfC3Z3dm6y7 Pd7FGt09oGXjUZW56coa10ignCkW3dE/Nh0nokTPDmWzfTBwQ3gXZL16DAySjVBcif Yn0CY9TbrPSNeTmAp+0XTRLp2SZcsj8QEKZO3gS7/tPWIL03wm04UJQt3prOtV5F47 UNLfSnH+bsIQQ== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Mathieu Othacehe schreef op do 08-07-2021 om 16:45 [+0200]: > Hey Maxime, > > > I am unable to test this at the moment (too little substitutes > > for core-updates, too little processing power locally ...), but > > I intent to do so later. > > I think you are missing the attached patch here. Now attached! Greetings, Maxime. From b9e46156e1f35303b56fbe2ed4694385b6104214 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Tue, 6 Jul 2021 10:57:49 +0200 Subject: [PATCH core-updates] build-system/qt: Fix build failures when cross-compiling. One of the features of 'qt-build-system' is that it automatically creates wrappers, but it needs 'bash' (or 'bash-minimal') to do so. If "bin/bash" doesn't exist among the 'inputs', then 'search-input-file' (used by 'wrap-all-programs') will raise an exception. Address this exception by adding "bash-minimal" to 'host-inputs' when cross-compiling. This change does not impact native compilation; the derivations for natively-compiled packages remain identical. * guix/build-system/qt.scm (bash-for-wrappers): New procedure. (lower): Add 'bash-minimal' to 'host-inputs' when cross-compiling. --- guix/build-system/qt.scm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/guix/build-system/qt.scm b/guix/build-system/qt.scm index ccee89d5ef..9fa90baeeb 100644 --- a/guix/build-system/qt.scm +++ b/guix/build-system/qt.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2013 Cyril Roelandt ;;; Copyright © 2017 Ricardo Wurmus ;;; Copyright © 2019 Hartmut Goebel +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -63,6 +64,13 @@ (let ((module (resolve-interface '(gnu packages cmake)))) (module-ref module 'cmake-minimal))) +(define (bash-for-wrappers) + "Return the bash package to use for wrappers." + + ;; Do not use `@' to avoid introducing circular dependencies. + (let ((module (resolve-interface '(gnu packages bash)))) + (module-ref module 'bash-minimal))) + ;; This barely is a copy from (guix build-system cmake), only adjusted to use ;; the variables defined here. (define* (lower name @@ -91,7 +99,12 @@ '()) ;; Keep the standard inputs of 'gnu-build-system'. ,@(standard-packages))) - (host-inputs inputs) + ;; Make sure the 'qt-wrap' phase has a cross-compiled bash + ;; for wrappers when cross-compiling. + (host-inputs `(,@(if target + `(("bash-minimal" ,(bash-for-wrappers))) + '()) + ,@inputs)) ;; The cross-libc is really a target package, but for bootstrapping ;; reasons, we can't put it in 'host-inputs'. Namely, 'cross-gcc' is a -- 2.32.0