From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id VW/pOfIIGGFzegEAgWs5BA (envelope-from ) for ; Sat, 14 Aug 2021 20:18:26 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id CCzsNPIIGGGkKQAAbx9fmQ (envelope-from ) for ; Sat, 14 Aug 2021 18:18:26 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 434F3E87E for ; Sat, 14 Aug 2021 20:18:26 +0200 (CEST) Received: from localhost ([::1]:47288 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mEyEi-00011e-6e for larch@yhetil.org; Sat, 14 Aug 2021 14:18:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48548) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEyEZ-00011Q-7n for help-guix@gnu.org; Sat, 14 Aug 2021 14:18:15 -0400 Received: from mx.kolabnow.com ([95.128.36.42]:4444) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEyEW-00067j-Ts for help-guix@gnu.org; Sat, 14 Aug 2021 14:18:14 -0400 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 7085E166B for ; Sat, 14 Aug 2021 20:18:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-type:content-type:content-transfer-encoding:mime-version :message-id:date:date:subject:subject:from:from:received :received:received; s=dkim20160331; t=1628965089; x=1630779490; bh=k3JCY8gM+i10rPJ2rAkBAGnfLrljYsA6VqGlhT5DLDc=; b=ydVencFR/cm6 ZSzrWIIoE3oumJpta8f3KoOdFd1437ISfBxZ+hSPptEfx7V3g0Kmq0Zmd+mU/ExN 7nZAHX01oT4wYliOlyyVaXThLZ2gVWd3dcUzskMdyH8K/2JtTdZtJs6gC/L5ygcV p1Z04yTed51MyG9CSipMqAPA3gWF/0i7TB0gEQMzPdsoVQAe6QIEi/9hNOJJZzwi tvqbFEuWMMu6QbNC/NhQdpDmvAuQjA08QlfNfCYax6zqWgHMVwaQBXAGij4eehHS ebarcXwwhvAlJBvEOeYCfKuUwDN89kS1QG/sE4Lo1XlgJoGV/lbtGDUZhYmf2vKf 9rf54ZHN5AnV49yN2fGtdJru+sfkk23y5XouYL5YCxrP+5Ae3N6cfxUyuht0FT8l a/asJzKMWWpdVBzhrYCSXuBTqoQ30VECNKNf+tR15yu1YgBGhFUmgDCn5UyRw0DF udSahysp8kQLDgLFMfX5BQ4+XUaGPVnimuylYqzg3JdHAKEOMdXNmqrGJz8+bEUi ibQGcscaShcUi923qVxhSBBoEtm20xnKyYNzxRypj2GJeboSVZ8OfrnLsZZmAcsf WfAyAqTHJiw6kFachRlZAOOrrwAPw/9AHRdMs2xoMbHlGXiuRaMOqNKu/nkbFT8M VExNfH7XY5rzIuvn+1rsFYxY3xJaoB8= X-Virus-Scanned: amavisd-new at mykolab.com Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CUrjD9bJsA0Q for ; Sat, 14 Aug 2021 20:18:09 +0200 (CEST) Received: from int-mx003.mykolab.com (unknown [10.9.13.3]) by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 5E1E61664 for ; Sat, 14 Aug 2021 20:18:09 +0200 (CEST) Received: from ext-subm002.mykolab.com (unknown [10.9.6.2]) by int-mx003.mykolab.com (Postfix) with ESMTPS id B70C73DCB for ; Sat, 14 Aug 2021 20:18:08 +0200 (CEST) From: Thiago Jung Bauermann To: help-guix@gnu.org Subject: help with use of %current-target-system parameter and gexps Date: Sat, 14 Aug 2021 15:18:01 -0300 Message-ID: <2108194.9MkYMPdv0c@popigai> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=95.128.36.42; envelope-from=bauermann@kolabnow.com; helo=mx.kolabnow.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628965106; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=k3JCY8gM+i10rPJ2rAkBAGnfLrljYsA6VqGlhT5DLDc=; b=fEL60lcmSdqFRpCm+XKE7xJHv7lR1Y4G+Okkec3XpdeSUskDVJmRlPoupvBlQTT8vPo9os odibDPgSyHQq9U3ZCqfLAc77XIrjJciUx1gvcAEOcRViGcK6qpuG9Ds0BMtwzMky6UVcEy 1azVeSp73Q/GQhj9qKTpVtP65Uofz/NgGL2OqJw2Uhjs5Q48Fr0L6dBFsXsp+G2//k7AB0 m4AfLzH564Svo74mm/ofj5UKvdyro0ScEWtA/tV+uza3/1yQtG6+LLfMnsc2L3naoOM/H7 byHjYZ+kXJ1XpHXtG9rc3vYzqnQzJJk4rhZiqrmR4oMORr4dk1Ydueo7MtP7jw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628965106; a=rsa-sha256; cv=none; b=ZKR7mAih1WYws9e4x88FA1NE19e91zWS5Vi7JbFAcitkdScxhlFfnUIPO/XP66C6UVY45J ikOoAAbPy91Ezlw3fBHkb55SwhhPLaXcHLvR+K49rn2qz4xa/IhU2XEHmY2zUkYd9sJhDR f0oQCVPDltaRQK4mcZdh2FRv2qo38RjKWZI6JfixwXHTmtZ/vutrG9bYX9DzZ4pi054pCc BuigQwei0gRgNUxVMqSgptpNvKnRg5x/VTl6bfBsKFybdMSlSH5WiWcbvSIGXjd9ndtKdt J2ukI9SZmsTszhkshQgWXuhc8selL1Pa9IRtwcbT7k5fWGahSf/GPQvnzTcoGQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=kolabnow.com header.s=dkim20160331 header.b=ydVencFR; dmarc=pass (policy=quarantine) header.from=kolabnow.com; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.61 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=kolabnow.com header.s=dkim20160331 header.b=ydVencFR; dmarc=pass (policy=quarantine) header.from=kolabnow.com; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 434F3E87E X-Spam-Score: -2.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3GoaU2vVQEo4 Hello Guix, I would like to ask for help with a couple of issues that I ran into while trying to fix a build failure in =E2=80=98texlive-texmf=E2=80=99 in the cor= e-updates-frozen branch on powerpc64le-linux: fmtutil [ERROR]: not building luajittex due to missing engine: luajittex fmtutil [ERROR]: not building luajithbtex due to missing engine: luajithb= tex The problem is straightforward: LuaJIT isn=E2=80=99t supported on powerpc64= le. =E2=80=98texlive-latex-base=E2=80=99 disables these engines accordingly: ;; LuaJIT is not ported to powerpc64le* yet. ,@(if (string-prefix? "powerpc64le" (or (%current-target-system) (%current-system))) '("luajittex" "luajithbtex" "mfluajit") '()) So all I have to do is disable these =E2=80=9C*luajit*=E2=80=9D engines in = =E2=80=98texlive-texmf=E2=80=99 as well. Unfortunately copying the same =E2=80=98if=E2=80=99 expression lik= e so: =2D-8<---------------cut here---------------start------------->8--- diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 70166941d554..8fc420039417 100644 =2D-- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -6821,9 +6821,17 @@ directly generate PDF documents instead of DVI.") (share (string-append out "/share")) (texmfroot (string-append share "/texmf-dist/web2c")) (texmfcnf (string-append texmfroot "/texmf.cnf")) + (fmtutilcnf (string-append texmfroot "/fmtutil.cnf")) (texlive-bin (assoc-ref inputs "texlive-bin")) (texbin (string-append texlive-bin "/bin")) (tlpkg (string-append texlive-bin "/share/tlpkg"))) + ;; LuaJIT is not ported to powerpc64le* yet. + (if (string-prefix? "powerpc64le" + (or (%current-target-system) + (%current-system))) + (substitute* fmtutilcnf + (((string-append "^(luajittex|luajithbtex|mfluajit)"= ) m) + (string-append "#! " m)))) ;; Register SHARE as TEXMFROOT in texmf.cnf. (substitute* texmfcnf (("TEXMFROOT =3D \\$SELFAUTOPARENT") =2D-8<---------------cut here---------------end--------------->8--- Results in an error: =2D-8<---------------cut here---------------start------------->8--- starting phase `texmf-config' error: in phase 'texmf-config': uncaught exception: unbound-variable #f "Unbound variable: ~S" (%current-target-system) #f phase `texmf-config' failed after 0.0 seconds Backtrace: 14 (primitive-load "/gnu/store/49q7az0dglza46v2cz06iajc568?") In guix/build/gnu-build-system.scm: 904:2 13 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #) In ice-9/boot-9.scm: 1752:10 12 (with-exception-handler _ _ #:unwind? _ # _) In srfi/srfi-1.scm: 634:9 11 (for-each # ?) In ice-9/boot-9.scm: 1752:10 10 (with-exception-handler _ _ #:unwind? _ # _) In guix/build/gnu-build-system.scm: 925:23 9 (_) In ice-9/eval.scm: 619:8 8 (_ #(#(#(#(#(#(#(#(#(#) ?) ?) ?) ?) ?) ?) ?) ?)) 245:16 7 (_ #(#(#(#(#(#(#(#(#(#) ?) ?) ?) ?) ?) ?) ?) ?)) 159:9 6 (_ #(#(#(#(#(#(#(#(#(#) ?) ?) ?) ?) ?) ?) ?) ?)) 293:34 5 (_ #(#(#(#(#(#(#(#(#(#) ?) ?) ?) ?) ?) ?) ?) ?)) 182:19 4 (proc #(#(#(#(#(#(#(#(#(#) ?) ?) ?) ?) ?) ?) ?) ?)) 142:16 3 (compile-top-call # # #) In unknown file: 2 (%resolve-variable (7 . %current-target-system) #) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: Unbound variable: %current-target-system =2D-8<---------------cut here---------------end--------------->8--- So this is my first question: why does that =E2=80=98if=E2=80=99 condition = work in =E2=80=98texlive-latex-base=E2=80=99 but not in =E2=80=98texlive-texmf=E2= =80=99? I can=E2=80=99t see a significant difference between the two. In any case, I thought I could solve this by using a gexp. I tried several different variations, but none worked. I think this was my best shot: =2D-8<---------------cut here---------------start------------->8--- diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm index 70166941d554..1df5dbbd5f9e 100644 =2D-- a/gnu/packages/tex.scm +++ b/gnu/packages/tex.scm @@ -51,6 +51,7 @@ #:use-module (guix deprecation) #:use-module (guix git-download) #:use-module (guix svn-download) + #:use-module (guix gexp) #:use-module (gnu packages) #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) @@ -6794,7 +6795,7 @@ directly generate PDF documents instead of DVI.") ("ruby" ,ruby) ("tcsh" ,tcsh))) (arguments =2D `(#:modules ((guix build gnu-build-system) + (list #:modules '((guix build gnu-build-system) (guix build utils) (srfi srfi-26)) =20 @@ -6803,7 +6804,7 @@ directly generate PDF documents instead of DVI.") #:substitutable? #f =20 #:phases =2D (modify-phases (map (cut assq <> %standard-phases) + #~(modify-phases (map (cut assq <> %standard-phases) '(set-paths unpack patch-source-shebangs)) (add-after 'unpack 'unset-environment-variables (lambda _ @@ -6821,9 +6822,16 @@ directly generate PDF documents instead of DVI.") (share (string-append out "/share")) (texmfroot (string-append share "/texmf-dist/web2c")) (texmfcnf (string-append texmfroot "/texmf.cnf")) + (fmtutilcnf (string-append texmfroot "/fmtutil.cnf")) (texlive-bin (assoc-ref inputs "texlive-bin")) (texbin (string-append texlive-bin "/bin")) (tlpkg (string-append texlive-bin "/share/tlpkg"))) + #~(let-system (system target) + ;; LuaJIT is not ported to powerpc64le* yet. + (if (string-prefix? "powerpc64le" (or target system)) + (substitute* fmtutilcnf + (((string-append "^(luajittex|luajithbtex|mfluaj= it)") m) + (string-append "#! " m))))) ;; Register SHARE as TEXMFROOT in texmf.cnf. (substitute* texmfcnf (("TEXMFROOT =3D \\$SELFAUTOPARENT") =2D-8<---------------cut here---------------end--------------->8--- But it results in this error: =2D-8<---------------cut here---------------start------------->8--- starting phase `texmf-config' error: in phase 'texmf-config': uncaught exception: unbound-variable #f "Unbound variable: ~S" (gexp) #f phase `texmf-config' failed after 0.0 seconds Backtrace: 11 (primitive-load "/gnu/store/dvqdh0afs7nn2b9ymxmvzy6nrlb?") In guix/build/gnu-build-system.scm: 904:2 10 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #) In ice-9/boot-9.scm: 1752:10 9 (with-exception-handler _ _ #:unwind? _ # _) In srfi/srfi-1.scm: 634:9 8 (for-each # ?) In ice-9/boot-9.scm: 1752:10 7 (with-exception-handler _ _ #:unwind? _ # _) In guix/build/gnu-build-system.scm: 925:23 6 (_) In ice-9/eval.scm: 619:8 5 (_ #(#(#(#(#(#(#(#(#(#(#) ?) ?) ?) ?) ?) ?) ?) ?) ?)) 182:19 4 (proc #(#(#(#(#(#(#(#(#(#(#) # ?) ?) ?) ?) ?) ?) ?) ?) ?)) 142:16 3 (compile-top-call # # #) In unknown file: 2 (%resolve-variable (7 . gexp) #) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: Unbound variable: gexp builder for `/gnu/store/mj1wim034hpnjzwicbgr6791bl1q3f99-texlive-texmf-2021= 0325.drv' failed with exit code 1 build of /gnu/store/mj1wim034hpnjzwicbgr6791bl1q3f99-texlive-texmf-20210325= =2Edrv failed =2D-8<---------------cut here---------------end--------------->8--- So my second question is: can somebody see any way to make =E2=80=98texlive= =2Dmf=E2=80=99 disable the =E2=80=9C*luajit*=E2=80=99 engines when building for powerpc64l= e? =2D-=20 Thanks, Thiago