From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Othacehe Subject: bug#36882: Qemu 4.2.0 build for x86_64-linux fails Date: Tue, 03 Mar 2020 12:55:44 +0100 Message-ID: <871rq9ejpb.fsf@gmail.com> References: <87k14gnqng.fsf@gmail.com> <87mu9b3crd.fsf@gnu.org> <87a75a5taw.fsf@gmail.com> <87o8tptu7u.fsf@gnu.org> <87ftf0nx7n.fsf@gmail.com> <87tv3gm59r.fsf@gnu.org> <875zfuag6v.fsf@gmail.com> <874kveafns.fsf@gmail.com> <874kv6ju1c.fsf@devup.no> <878skh3n0o.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:42283) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j969b-0008FT-LO for bug-guix@gnu.org; Tue, 03 Mar 2020 06:56:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j969a-000650-4P for bug-guix@gnu.org; Tue, 03 Mar 2020 06:56:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:32817) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j969a-00064w-0o for bug-guix@gnu.org; Tue, 03 Mar 2020 06:56:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j969Z-0000Xn-V8 for bug-guix@gnu.org; Tue, 03 Mar 2020 06:56:01 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-reply-to: <878skh3n0o.fsf@gmail.com> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: Marius Bakke Cc: 36882@debbugs.gnu.org --=-=-= Content-Type: text/plain > 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 --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-qemu-minimal-Fix-build.patch Content-Transfer-Encoding: quoted-printable >From 6d5dea746ce7b501cdb5ba41c5eff0c9ea7eb0b0 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Tue, 3 Mar 2020 12:45:33 +0100 Subject: [PATCH] gnu: qemu-minimal: Fix build. This fixes . * 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 =C2=A9 2018 Sou Bunnbu ;;; Copyright =C2=A9 2018 Julien Lepiller ;;; Copyright =C2=A9 2019 Guy Fleury Iteriteka +;;; Copyright =C2=A9 2020 Mathieu Othacehe ;;; ;;; 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, lik= e: + `(;; Running tests in parallel can occasionally lead to failures, lik= e: ;; boot_sector_test: assertion failed (signature =3D=3D SIGNATURE):= (0x00000000 =3D=3D 0x0000dead) #:parallel-tests? #f #:configure-flags (list "--enable-usb-redir" "--enable-opengl" @@ -135,8 +136,28 @@ "--audio-drv-list=3Dalsa,pa,sdl") ;; Make build and test output verbose to facilitate investigation u= pon failure. #:make-flags '("V=3D1") + #: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) --=20 2.25.1 --=-=-=--