unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Mathieu Othacehe <m.othacehe@gmail.com>
To: Marius Bakke <mbakke@fastmail.com>
Cc: 36882@debbugs.gnu.org
Subject: bug#36882: Qemu 4.2.0 build for x86_64-linux fails
Date: Tue, 03 Mar 2020 12:55:44 +0100	[thread overview]
Message-ID: <871rq9ejpb.fsf@gmail.com> (raw)
In-Reply-To: <878skh3n0o.fsf@gmail.com>

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


> Yup, turned out patching GCC was too difficult. I'm experimenting a
> filter over inputs passed to set-path-environment-variable in set-paths.

This is also quite tricky, because the "libc" input passed to set-paths
must not be removed from C_INCLUDE_PATH in (gnu packages commencement)
for mes packages.

So, maybe the best option is to patch QEMU directly, as proposed in
the attached patch. WDYT?

Thanks,

Mathieu

[-- Attachment #2: 0001-gnu-qemu-minimal-Fix-build.patch --]
[-- Type: text/x-diff, Size: 3012 bytes --]

From 6d5dea746ce7b501cdb5ba41c5eff0c9ea7eb0b0 Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <m.othacehe@gmail.com>
Date: Tue, 3 Mar 2020 12:45:33 +0100
Subject: [PATCH] gnu: qemu-minimal: Fix build.

This fixes <https://issues.guix.info/issue/36882>.

* gnu/packages/virtualization.scm (qemu-minimal)[arguments]: Add a
remove-glibc phase to remove glibc from C_INCLUDE_PATH.
---
 gnu/packages/virtualization.scm | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index e16405fc9c..6ab8c3802c 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -11,6 +11,7 @@
 ;;; Copyright © 2018 Sou Bunnbu <iyzsong@member.fsf.org>
 ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2019 Guy Fleury Iteriteka <hoonandon@gmail.com>
+;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -124,7 +125,7 @@
                "1w38hzlw7xp05gcq1nhga7hxvndxy6dfcnzi7q2il8ff110isj6k"))))
     (build-system gnu-build-system)
     (arguments
-     '(;; Running tests in parallel can occasionally lead to failures, like:
+     `(;; Running tests in parallel can occasionally lead to failures, like:
        ;; boot_sector_test: assertion failed (signature == SIGNATURE): (0x00000000 == 0x0000dead)
        #:parallel-tests? #f
        #:configure-flags (list "--enable-usb-redir" "--enable-opengl"
@@ -135,8 +136,28 @@
                                "--audio-drv-list=alsa,pa,sdl")
        ;; Make build and test output verbose to facilitate investigation upon failure.
        #:make-flags '("V=1")
+       #:modules ((srfi srfi-1)
+                  (ice-9 match)
+                  ,@%gnu-build-system-modules)
        #:phases
        (modify-phases %standard-phases
+         ;; Work around https://issues.guix.info/issue/36882.  We need to
+         ;; remove glibc from C_INCLUDE_PATH so that the one hardcoded in GCC,
+         ;; at the bottom of GCC include search-path is used.
+         (add-after 'set-paths 'remove-glibc
+          (lambda* (#:key inputs #:allow-other-keys)
+            (let* ((filters '("libc"))
+                   (input-directories
+                    (filter-map (lambda (input)
+                                  (match input
+                                    ((name . dir)
+                                     (and (not (member name filters))
+                                          dir))))
+                                inputs)))
+              (set-path-environment-variable "C_INCLUDE_PATH"
+                                             '("include")
+                                             input-directories)
+              #t)))
          (replace 'configure
            (lambda* (#:key inputs outputs (configure-flags '())
                            #:allow-other-keys)
-- 
2.25.1


  reply	other threads:[~2020-03-03 11:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31 20:03 bug#36882: QEMU 4 fails to build for x86_64-linux Leo Famulari
2019-08-01 14:14 ` Marius Bakke
2019-08-23 12:58 ` Ludovic Courtès
2020-02-21 11:09 ` bug#36882: Qemu 4.2.0 build for x86_64-linux fails Mathieu Othacehe
2020-02-21 20:29   ` Ludovic Courtès
2020-02-22 19:13     ` Mathieu Othacehe
2020-02-23 11:32       ` Ludovic Courtès
2020-02-24  9:36         ` Mathieu Othacehe
2020-02-24 14:25           ` Ludovic Courtès
2020-02-25 14:34             ` Mathieu Othacehe
2020-02-25 14:46               ` Mathieu Othacehe
2020-02-26 20:55                 ` Ludovic Courtès
2020-03-02 22:01                 ` Marius Bakke
2020-03-03  7:39                   ` Mathieu Othacehe
2020-03-03 11:55                     ` Mathieu Othacehe [this message]
2020-03-03 20:26                       ` Marius Bakke
2020-03-03 20:37                         ` Marius Bakke
2020-03-03 21:09                       ` Jan (janneke) Nieuwenhuizen
2020-03-04  8:16                         ` Mathieu Othacehe
2020-03-05 16:36                       ` Ludovic Courtès
2020-03-05 16:42                         ` Marius Bakke
2020-03-06  7:25                           ` Mathieu Othacehe
2020-02-26 21:12             ` Marius Bakke

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=871rq9ejpb.fsf@gmail.com \
    --to=m.othacehe@gmail.com \
    --cc=36882@debbugs.gnu.org \
    --cc=mbakke@fastmail.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).