From patchwork Mon May 31 12:30:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: M X-Patchwork-Id: 29705 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 46F6A27BC81; Mon, 31 May 2021 13:37:17 +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,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, 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 671C127BC78 for ; Mon, 31 May 2021 13:37:16 +0100 (BST) Received: from localhost ([::1]:49340 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnhAR-0002GE-IO for patchwork@mira.cbaines.net; Mon, 31 May 2021 08:37:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnhAE-0002Fv-8I for guix-patches@gnu.org; Mon, 31 May 2021 08:37:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lnhAD-00006e-Uq for guix-patches@gnu.org; Mon, 31 May 2021 08:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lnhAD-0007Ey-R7 for guix-patches@gnu.org; Mon, 31 May 2021 08:37:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48759] [PATCH]: Replace '%build-inputs' with 'inputs' in some places and fix 'smalltalk' cross-compilation somewhat Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 31 May 2021 12:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 48759 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 48759@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162246459427782 (code B ref -1); Mon, 31 May 2021 12:37:01 +0000 Received: (at submit) by debbugs.gnu.org; 31 May 2021 12:36:34 +0000 Received: from localhost ([127.0.0.1]:32935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnh9f-0007Dv-NL for submit@debbugs.gnu.org; Mon, 31 May 2021 08:36:34 -0400 Received: from lists.gnu.org ([209.51.188.17]:36840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lnh9a-0007Di-Dv for submit@debbugs.gnu.org; Mon, 31 May 2021 08:36:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnh9Z-0002EE-8J for guix-patches@gnu.org; Mon, 31 May 2021 08:36:22 -0400 Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]:48590) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lnh9T-0007y5-Ou for guix-patches@gnu.org; Mon, 31 May 2021 08:36:20 -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 BQcB2500V0mfAB401QcB6p; Mon, 31 May 2021 14:36:12 +0200 Message-ID: <9c37923b90058f446dcc330c4d65f88754b6307b.camel@telenet.be> From: Maxime Devos Date: Mon, 31 May 2021 14:30:31 +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=1622464572; bh=qxZ7Z+n9Xpb+uiqtpCge/ZksedJ+BHYgQgX8e+YvNso=; h=Subject:From:To:Date; b=KYY4pVSdrwURJqVxuHaWxKu9uB2pkznpDN22Q1Mo5RmFVJAhu3K0LvjFwYlYuL0RH DKvp7DlSrFTeyUfXDXSeJ8ZNRMq/H+nJ+bG5tF5aHk+r/luDb/ZeeqegapgNaidRRK pejft03nDMpCl17SZUcXk3VTbra09q9yc2/VoKKrJC6IFOkLMlp6dStqs3xFbZsss9 UwrcqQNlKCh+o6VTKn577AQTx5WLNbi2nRKZt4ksfYYLNUPvPtn40aHF/mppbNhsvX LQNrHDvRT1mT89tCzEGCkibMiz12Xe8NK/SCGtxq2Lq95IDJKUOulOY2hrEhO97UHN 2ar6NQ6tyhemw== Received-SPF: pass client-ip=2a02:1800:120:4::f00:13; envelope-from=maximedevos@telenet.be; helo=baptiste.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-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 Hi guix, Overview: (%build-inputs --> inputs, native-inputs) #1: gnu: ci: Use 'inputs' in build phases instead of '%build-inputs'. #2: gnu: smalltalk: Use 'inputs' in phases instead of '%build-inputs'. #3: gnu: neovim: Use 'inputs' in phases instead of '%build-inputs'. #4: gnu: qemacs: Use 'native-inputs' instead of '%build-inputs'. #5: gnu: ding: Use 'inputs' in build phases instead of '%build-inputs'. (more smalltalk fixes) #6: gnu: smalltalk: Move 'zip' from 'inputs' to 'native-inputs'. #7: gnu: smalltalk: Find glibc even when cross-compiling. See patch descriptions for details. This would cause 5 rebuilds: ./pre-inst-env guix refresh --list-dependents ding qemacs neovim smalltalk cuirass No dependents other than themselves: cuirass@1.0.0-17.31fd4d4 smalltalk@3.2.91 neovim@0.4.4 qemacs@0.3.3 ding@1.8.1 Building succeeds: ./pre-inst-env guix build ding qemacs neovim smalltalk cuirass Cross-compilation: somewhat improved # ding: ok, refers to binaries of correct architecture # qemacs: cannot cross-compile, because its dependency libxv # tries to run a test program (even when cross-compiling) # (during configuration, "checking whether malloc(0) returns NULL...") # neovim: cannot cross-compile, because its dependency "libtermkey" is not cross-compilable # cuirass: the meson build system does not support cross-compilaion # smalltalk: still some failures, even after patches (#6 and #7) # # ./gst --no-user-files --kernel-dir "./kernel" --image gst.im -iQ /dev/null # ./gst: line 117: /tmp/guix-build-smalltalk-3.2.91.drv-0/smalltalk-3.2.91/.libs/gst: cannot execute binary file: Exec format error # ./gst: line 117: /tmp/guix-build-smalltalk-3.2.91.drv-0/smalltalk-3.2.91/.libs/gst: Success ./pre-inst-env guix build ding --target=aarch64-linux-gnu Greetings, Maxime. From dcd7d16b8b89defcedefb4b8a71977d376d04273 Mon Sep 17 00:00:00 2001 From: Maxime Devos Date: Mon, 31 May 2021 14:07:50 +0200 Subject: [PATCH 7/7] gnu: smalltalk: Find glibc even when cross-compiling. Curiously, glibc is named "cross-libc" instead of "libc" when cross-compiling. I don't know why. Anyway, here is a fix. Smalltalk still fails to cross-compile though. * gnu/packages/smalltalk.scm (smalltalk)[arguments]{phases}<#:fix-libc>: Also search for "cross-libc" instead of only "libc" in 'inputs'. --- gnu/packages/smalltalk.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnu/packages/smalltalk.scm b/gnu/packages/smalltalk.scm index af4b7642ff..20ecc19881 100644 --- a/gnu/packages/smalltalk.scm +++ b/gnu/packages/smalltalk.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2016 Nicolas Goaziou ;;; Copyright © 2016 Ludovic Courtès ;;; Copyright © 2018 Tobias Geerinckx-Rice +;;; Copyright © 2021 Maxime Devos ;;; ;;; This file is part of GNU Guix. ;;; @@ -103,7 +104,11 @@ #t)) (add-before 'configure 'fix-libc (lambda* (#:key inputs #:allow-other-keys) - (let ((libc (assoc-ref inputs "libc"))) + (let ((libc (or (assoc-ref inputs "libc") + ;; When cross-compiling, the input + ;; is named "cross-libc" instead of + ;; simply "libc". I don't know why. + (assoc-ref inputs "cross-libc")))) (substitute* "libc.la.in" (("@LIBC_SO_NAME@") "libc.so") (("@LIBC_SO_DIR@") (string-append libc "/lib")))) -- 2.31.1