unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: 50299@debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Subject: bug#50299: [PATCH v4 09/25] gnu: swi-prolog: Set PROG_SWIPL when cross-compiling.
Date: Fri, 31 Dec 2021 12:14:51 +0000	[thread overview]
Message-ID: <20211231121507.70323-10-maximedevos@telenet.be> (raw)
In-Reply-To: <20211231121507.70323-1-maximedevos@telenet.be>

* 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





  parent reply	other threads:[~2021-12-31 12:22 UTC|newest]

Thread overview: 114+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31 15:25 bug#50299: The check-tests-true lint check is incorrect for Emacs packages Maxim Cournoyer
2021-09-07 12:34 ` bug#50299: lint: check-tests-true: Allow #:tests? #t for emacs-build-system Maxime Devos
2021-09-23  3:41   ` bug#50299: The check-tests-true lint check is incorrect for Emacs packages Maxim Cournoyer
2021-09-27 15:44     ` Maxime Devos
2021-09-27 15:45 ` bug#50299: [PATCH v2 01/27] lint: check-tests-true: Allow #:tests? #t for some build systems Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 02/27] gnu: lean: Set #:tests? appropriately when cross-compiling Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 03/27] gnu: lean: Add bash-minimal Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 04/27] gnu: swi-prolog: Move native-inputs to inputs where appropriate Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 05/27] gnu: swi-prolog: Don't explicitely enable tests Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 06/27] gnu: swi-prolog: Make configuration wok when cross-compiling Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 07/27] gnu: swi-prolog: Don't use 'cc' Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 08/27] gnu: swi-prolog: Use cross-compiled bash in shebangs Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 09/27] gnu: swi-prolog: Set PROG_SWIPL when cross-compiling Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 10/27] gnu: ruby-yard-with-tests: Don't enable tests " Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 11/27] gnu: ruby-byebug-11: " Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 12/27] gnu: ruby-ffi-rzmq: " Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 13/27] gnu: ruby-ffi-rzmq: Respect #:tests? Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 14/27] gnu: go-1.16: Don't enable tests when cross-compiling Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 15/27] gnu: ecl: Don't pretend to " Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 16/27] gnu: perl-unicode-utf8: Don't run " Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 17/27] gnu: libicns: " Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 18/27] gnu: python2-empy: " Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 19/27] gnu: python2-promise: " Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 20/27] gnu: ocaml4.07-fftw3: " Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 21/27] gnu: lablgtk: " Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 22/27] gnu: belcard: " Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 23/27] gnu: pjproject: " Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 24/27] gnu: tdlib: " Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 25/27] gnu: extra-cmake-modules: " Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 26/27] gnu: inkscape-1.1: " Maxime Devos
2021-09-27 15:45   ` bug#50299: [PATCH v2 27/27] gnu: ghc-bsb-http-chunked: " Maxime Devos
2021-09-28  1:14   ` bug#50299: [PATCH v2 01/27] lint: check-tests-true: Allow #:tests? #t for some build systems Maxim Cournoyer
2021-09-29 22:48     ` Maxime Devos
2021-09-29 22:47 ` bug#50299: [PATCH v3 " Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 02/27] gnu: lean: Set #:tests? appropriately when cross-compiling Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 03/27] gnu: lean: Add bash-minimal Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 04/27] gnu: swi-prolog: Move native-inputs to inputs where appropriate Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 05/27] gnu: swi-prolog: Don't explicitely enable tests Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 06/27] gnu: swi-prolog: Make configuration wok when cross-compiling Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 07/27] gnu: swi-prolog: Don't use 'cc' Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 08/27] gnu: swi-prolog: Use cross-compiled bash in shebangs Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 09/27] gnu: swi-prolog: Set PROG_SWIPL when cross-compiling Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 10/27] gnu: ruby-yard-with-tests: Don't enable tests " Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 11/27] gnu: ruby-byebug-11: " Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 12/27] gnu: ruby-ffi-rzmq: " Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 13/27] gnu: ruby-ffi-rzmq: Respect #:tests? Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 14/27] gnu: go-1.16: Don't enable tests when cross-compiling Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 15/27] gnu: ecl: Don't pretend to " Maxime Devos
2021-10-11 12:13     ` zimoun
2021-10-15 20:45       ` Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 16/27] gnu: perl-unicode-utf8: Don't run " Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 17/27] gnu: libicns: " Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 18/27] gnu: python2-empy: " Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 19/27] gnu: python2-promise: " Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 20/27] gnu: ocaml4.07-fftw3: " Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 21/27] gnu: lablgtk: " Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 22/27] gnu: belcard: " Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 23/27] gnu: pjproject: " Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 24/27] gnu: tdlib: " Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 25/27] gnu: extra-cmake-modules: " Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 26/27] gnu: inkscape-1.1: " Maxime Devos
2021-09-29 22:47   ` bug#50299: [PATCH v3 27/27] gnu: ghc-bsb-http-chunked: " Maxime Devos
2021-12-31 12:14 ` bug#50299: [PATCH v4 00/25] Fix 'check-tests-true' linter and some packages Maxime Devos
2021-12-31 12:14   ` bug#50299: [PATCH v4 01/25] lint: check-tests-true: Allow #:tests? #t for some build systems Maxime Devos
2021-12-31 12:14   ` bug#50299: [PATCH v4 02/25] gnu: lean: Don't run tests when cross-compiling Maxime Devos
2021-12-31 12:14   ` bug#50299: [PATCH v4 03/25] gnu: lean: Add bash-minimal Maxime Devos
2021-12-31 12:14   ` bug#50299: [PATCH v4 04/25] gnu: swi-prolog: Move native-inputs to inputs where appropriate Maxime Devos
2021-12-31 12:14   ` bug#50299: [PATCH v4 05/25] gnu: swi-prolog: Run tests conditionally Maxime Devos
2021-12-31 12:14   ` bug#50299: [PATCH v4 06/25] gnu: swi-prolog: Make configuration wok when cross-compiling Maxime Devos
2021-12-31 12:14   ` bug#50299: [PATCH v4 07/25] gnu: swi-prolog: Don't use 'cc' Maxime Devos
2021-12-31 12:14   ` bug#50299: [PATCH v4 08/25] gnu: swi-prolog: Use cross-compiled bash in shebangs Maxime Devos
2021-12-31 12:14   ` Maxime Devos [this message]
2021-12-31 12:14   ` bug#50299: [PATCH v4 10/25] gnu: swi-prolog: Correct reference to 'bin/swi-prolog' Maxime Devos
2021-12-31 12:14   ` bug#50299: [PATCH v4 11/25] gnu: ruby-yard-with-tests: Run tests conditionally Maxime Devos
2021-12-31 12:14   ` bug#50299: [PATCH v4 12/25] gnu: ruby-ffi-rzmq: " Maxime Devos
2021-12-31 12:14   ` bug#50299: [PATCH v4 13/25] gnu: ruby-ffi-rzmq: Respect #:tests? Maxime Devos
2021-12-31 12:14   ` bug#50299: [PATCH v4 14/25] gnu: go-1.16: Don't run tests when cross-compiling Maxime Devos
2021-12-31 12:14   ` bug#50299: [PATCH v4 15/25] gnu: ecl: Run tests conditionally Maxime Devos
2021-12-31 12:14   ` bug#50299: [PATCH v4 16/25] gnu: perl-unicode-utf8: " Maxime Devos
2021-12-31 12:14   ` bug#50299: [PATCH v4 17/25] gnu: libicns: " Maxime Devos
2021-12-31 12:15   ` bug#50299: [PATCH v4 18/25] gnu: python2-empy: " Maxime Devos
2021-12-31 12:15   ` bug#50299: [PATCH v4 19/25] gnu: python2-promise: " Maxime Devos
2021-12-31 12:15   ` bug#50299: [PATCH v4 20/25] gnu: lablgtk: " Maxime Devos
2021-12-31 12:15   ` bug#50299: [PATCH v4 21/25] gnu: belcard: " Maxime Devos
2021-12-31 12:15   ` bug#50299: [PATCH v4 22/25] gnu: pjproject: " Maxime Devos
2021-12-31 12:15   ` bug#50299: [PATCH v4 23/25] gnu: tdlib: " Maxime Devos
2021-12-31 12:15   ` bug#50299: [PATCH v4 24/25] gnu: extra-cmake-modules: Don't run tests when cross-compiling Maxime Devos
2021-12-31 12:15   ` bug#50299: [PATCH v4 25/25] gnu: ghc-bsb-http-chunked: " Maxime Devos
2022-03-04 13:00 ` bug#50299: [PATCH v5 00/24] Fix 'check-tests-true' linter and some packages Maxime Devos
2022-03-04 13:00   ` bug#50299: [PATCH v5 01/24] lint: check-tests-true: Allow #:tests? #t for some build systems Maxime Devos
2022-03-04 13:00   ` bug#50299: [PATCH v5 02/24] gnu: lean: Don't run tests when cross-compiling Maxime Devos
2022-03-04 13:00   ` bug#50299: [PATCH v5 03/24] gnu: lean: Add bash-minimal Maxime Devos
2022-03-04 13:00   ` bug#50299: [PATCH v5 04/24] gnu: swi-prolog: Move native-inputs to inputs where appropriate Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 05/24] gnu: swi-prolog: Run tests conditionally Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 06/24] gnu: swi-prolog: Make configuration wok when cross-compiling Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 07/24] gnu: swi-prolog: Don't use 'cc' Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 08/24] gnu: swi-prolog: Use cross-compiled bash in shebangs Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 09/24] gnu: swi-prolog: Set PROG_SWIPL when cross-compiling Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 10/24] gnu: swi-prolog: Correct reference to 'bin/swi-prolog' Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 11/24] gnu: ruby-yard-with-tests: Run tests conditionally Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 12/24] gnu: ruby-ffi-rzmq: " Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 13/24] gnu: ruby-ffi-rzmq: Respect #:tests? Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 14/24] gnu: go-1.16: Don't run tests when cross-compiling Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 15/24] gnu: ecl: Run tests conditionally Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 16/24] gnu: perl-unicode-utf8: " Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 17/24] gnu: libicns: " Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 18/24] gnu: python2-empy: " Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 19/24] gnu: python2-promise: " Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 20/24] gnu: lablgtk: " Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 21/24] gnu: belcard: " Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 22/24] gnu: tdlib: " Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 23/24] gnu: extra-cmake-modules: Don't run tests when cross-compiling Maxime Devos
2022-03-04 13:01   ` bug#50299: [PATCH v5 24/24] gnu: ghc-bsb-http-chunked: " Maxime Devos
2022-03-12  4:43   ` bug#50299: The check-tests-true lint check is incorrect for Emacs packages Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211231121507.70323-10-maximedevos@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=50299@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).