all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 52574@debbugs.gnu.org,
	Maxim Cournoyer <maxim.cournoyer@gmail.com>,
	L p R n d n <guix@lprndn.info>
Subject: bug#52574: Cross-compiling glib failure
Date: Sun, 19 Dec 2021 23:12:51 +0100	[thread overview]
Message-ID: <87sfuomefw.fsf@gnu.org> (raw)
In-Reply-To: <befb94870e8bf96380d1ee690e0c36912e90b327.camel@telenet.be> (Maxime Devos's message of "Fri, 17 Dec 2021 21:40:17 +0000")

[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]

Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

> Actually, glib's build system (meson-build-system) did not support
> cross-compilation at all before the merge. Cross-compilation support
> was added on that branch, but glib's package broke later, presumably in
> <https://git.savannah.gnu.org/cgit/guix.git/commit/?id=f22f6fc3b6cc6382df3246d192a40a3951b48c37>.
>
> The fix would be to replace to wrap the configure flags in a #~,
> instead of a ´,replace (assoc-ref %outputs "bin") by #$output:bin and
> adjust the configure flags of glib-with-documentation to use #~ and #$
> instead of ´ and ,.
>
> To avoid rebuilds, some
> (if (%current-target-system) #~#$output:bin #~(assoc-ref %outputs
> "bin"))
> may be needed.

In the case of ‘meson-build-system’, the logical fix IMO would be to
define ‘%build-inputs‘, ‘%outputs’, etc. when cross-compiling, with the
patch below.

This would be consistent with the fact that ‘meson-build-system’ defines
those variables for native builds already.

Thoughts?

Longer-term we can move away from ‘%outputs’, ‘%build-inputs’, & co.,
but that’s another story.

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 839 bytes --]

diff --git a/guix/build-system/meson.scm b/guix/build-system/meson.scm
index ba7441a3eb..ad604f8871 100644
--- a/guix/build-system/meson.scm
+++ b/guix/build-system/meson.scm
@@ -287,6 +287,19 @@ (define builder
       #~(begin
           (use-modules #$@(sexp->gexp modules))
 
+          (define %build-host-inputs
+            #+(input-tuples->gexp build-inputs))
+
+          (define %build-target-inputs
+            (append #$(input-tuples->gexp host-inputs)
+                    #+(input-tuples->gexp target-inputs)))
+
+          (define %build-inputs
+            (append %build-host-inputs %build-target-inputs))
+
+          (define %outputs
+            #$(outputs->gexp outputs))
+
           (define build-phases
             #$(let ((phases (if (pair? phases) (sexp->gexp phases) phases)))
                 (if glib-or-gtk?

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

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 12:51 bug#52574: Cross-compiling glib failure L p R n d n
2021-12-17 21:40 ` Maxime Devos
2021-12-18  4:34   ` Maxim Cournoyer
2021-12-19 22:12   ` Ludovic Courtès [this message]
2021-12-20  4:55     ` Maxim Cournoyer
     [not found]     ` <c39f3277b9e7c71a2d710b81e9468db640f47b63.camel@telenet.be>
2021-12-21  9:04       ` Ludovic Courtès
2022-01-17 17:14         ` 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

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

  git send-email \
    --in-reply-to=87sfuomefw.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=52574@debbugs.gnu.org \
    --cc=guix@lprndn.info \
    --cc=maxim.cournoyer@gmail.com \
    --cc=maximedevos@telenet.be \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.