From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WLXHIFsQImKBGgEAgWs5BA (envelope-from ) for ; Fri, 04 Mar 2022 14:12:59 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 8B9tGVsQImJNZQEAG6o9tA (envelope-from ) for ; Fri, 04 Mar 2022 14:12:59 +0100 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 1BE633B5DB for ; Fri, 4 Mar 2022 14:12:59 +0100 (CET) Received: from localhost ([::1]:43028 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQ7jt-0005n2-UA for larch@yhetil.org; Fri, 04 Mar 2022 08:12:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQ7iJ-0004LN-84 for bug-guix@gnu.org; Fri, 04 Mar 2022 08:11:19 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:50928) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nQ7iA-0005VL-2h for bug-guix@gnu.org; Fri, 04 Mar 2022 08:11:18 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nQ7i9-0007UU-Tu for bug-guix@gnu.org; Fri, 04 Mar 2022 08:11:09 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#50299: [PATCH v5 09/24] gnu: swi-prolog: Set PROG_SWIPL when cross-compiling. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 04 Mar 2022 13:11:09 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50299 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 50299@debbugs.gnu.org Received: via spool by 50299-submit@debbugs.gnu.org id=B50299.164639942228589 (code B ref 50299); Fri, 04 Mar 2022 13:11:09 +0000 Received: (at 50299) by debbugs.gnu.org; 4 Mar 2022 13:10:22 +0000 Received: from localhost ([127.0.0.1]:44801 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nQ7hJ-0007Qq-3n for submit@debbugs.gnu.org; Fri, 04 Mar 2022 08:10:21 -0500 Received: from andre.telenet-ops.be ([195.130.132.53]:42742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nQ7Yk-00079y-GT for 50299@debbugs.gnu.org; Fri, 04 Mar 2022 08:01:32 -0500 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by andre.telenet-ops.be with bizsmtp id 2D1P2700M4UW6Th01D1RjT; Fri, 04 Mar 2022 14:01:25 +0100 From: Maxime Devos Date: Fri, 4 Mar 2022 13:01:04 +0000 Message-Id: <20220304130119.14858-10-maximedevos@telenet.be> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220304130119.14858-1-maximedevos@telenet.be> References: <20220304130119.14858-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=r22; t=1646398885; bh=3a/IyBdFIs76fPgtBDjE73UskfscHGJREiq1jR6ssLE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=RM3OEfNwDKpsjrmFn5NoMGRNZ2IPCOgfsHYAfZzUD/EZwdyYxgDjisyejirVmvlte 7SeJdJIc9YzMSPLYeIqd4bagnTfgCq1E6XEPvtM7YKq/2HtcZgBELK5faHVWAzuDpq n1FePRQLTawhTWfHnN9C9SHypFn81PrH+B848LD4h7SZcvW08+htkPG+HIGpD66Z8p u3BvBANs5QYuEnx17wZ/H5x+y4F9q/9SLGu3lFNEhjlkoU6Z151YK06uJwQSGdMq4r EhfFe+PqqGptiO02suzR3jJo1VUcm3RO1z+gAzZGZRVynK/y9yp5TCGBU/aquDB0wr rbte3S4dQXxqw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646399579; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=3a/IyBdFIs76fPgtBDjE73UskfscHGJREiq1jR6ssLE=; b=uuZjOXABGwiB6/SrCigzBBoi9YzZ0UX7KIsd6Xas67QKvIKDW4kouWFbWEot1bIcZSnB/J ecqfOwyxOlbfhBE9KbTF35Gn+HHoe68oaPSRiKLkMGk4bXgLXBaLB077iwflRfqG23twTK oNrSqnL41EL3KNZ9E3TrGXcJ9RcO0HWsjAzWmk1M6s93EzttW1J5xX0H3L1gQaP+wC7hot li98RkZOg5LFlW3+/BbiLKdaWHr/C7CBjvgatM/160Htw3paDaJCn7b3kyFZXXNBxXqguv Bqn9UXsJ/uotz2+r5RNf7rvhrLgyydSXSvabgKTIxnVc02prDOVP++pSFWs70w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646399579; a=rsa-sha256; cv=none; b=OxaeUGg0cgoNbyMGzVuGFnrdq7LxXP7ER+ZNtZhsd7SRRf2RrQxWtEZJ09Ohdn4XskaEYo QjHs2jXf5io9HcP9uaz3SYnHvtFHnCipwYjwtz22Xip/z5CZMdJsnIcagPm92f3Lne+2ky YFhJy9slLCp+bMP8Y71DKjnGwQc2jtxDitk2f+bi4qpXRoupsWh1LTld2Jd6kir+n61U1n FRAiw+uiisHVhSj3vUtEc231/hpE1xr86yFObVlmlRvc9m+eUgO5LxAVAOQtII4g0I0rnD qPeja+yBbKwDUUtcBtxRriuYmei1HYkniQseEA82lPgowHsfYdfLNet6oRxRfA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=RM3OEfNw; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.04 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=RM3OEfNw; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1BE633B5DB X-Spam-Score: 6.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: EcQOE6DXq6Np * gnu/packages/prolog.scm (swi-prolog)[arguments]<#:configure-flags>: Set PROG_SWIPL and SWIPL_NATIVE_FRIEND when cross-compiling and make this a G-expression. (swi-prolog)[native-inputs]: Add 'this-package' when cross-compiling. --- gnu/packages/prolog.scm | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm index 3eaec533d7..00f09b49cc 100644 --- a/gnu/packages/prolog.scm +++ b/gnu/packages/prolog.scm @@ -22,11 +22,13 @@ (define-module (gnu packages prolog) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix git-download) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) + #:use-module (guix utils) #:use-module (gnu packages backup) #:use-module (gnu packages bash) #:use-module (gnu packages compression) @@ -100,16 +102,23 @@ manner. It also features an interactive interpreter.") (arguments `(#:parallel-build? #t #:configure-flags - (list ,@(if (%current-target-system) - ;; Set this manually, otherwise CMake would need to - ;; run a cross-compiled binary, which it can't do. - ;; These values were found on a Linux system. - '("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1" + ,#~(list + #$@(if (%current-target-system) + ;; Set this manually, otherwise CMake would need to + ;; run a cross-compiled binary, which it can't do. + ;; These values were found on a Linux system. + #~("-DBSD_SIGNALS=1" "-DQSORT_R_GNU=1" ;; If absent, the non-existent 'cc' is used. "-DCMAKE_HOST_CC=gcc" - '()) - "-DINSTALL_DOCUMENTATION=ON" - "-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation. + ;; swi-prolog needs a native copy of itself for + ;; cross-compilation. + "-DSWIPL_NATIVE_FRIEND=/nowhere" + (string-append "-DPROG_SWIPL=" + #+(this-package-native-input "swi-prolog") + "/bin/swipl")) + #~()) + "-DINSTALL_DOCUMENTATION=ON" + "-DSWIPL_INSTALL_IN_LIB=OFF") ; FIXME: Breaks RUNPATH validation. #:phases (modify-phases %standard-phases ;; XXX: Delete the test phase that attempts to write to the @@ -125,7 +134,15 @@ manner. It also features an interactive interpreter.") '("save"))) #t))))) (native-inputs - `(("texinfo" ,texinfo) + `(,@(if (%current-target-system) + (begin + (unless (equal? (target-64bit?) + (target-64bit? (%current-system))) + (error "swi-prolog requires --system and --target to have \ +the same word size")) + `(("swi-prolog" ,this-package))) + '()) + ("texinfo" ,texinfo) ("perl" ,perl) ("pkg-config" ,pkg-config))) (inputs -- 2.30.2