From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 84DUA18LB2HKpgAAgWs5BA (envelope-from ) for ; Sun, 01 Aug 2021 23:00:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id IKl0Ol4LB2GWQQAAbx9fmQ (envelope-from ) for ; Sun, 01 Aug 2021 21:00:14 +0000 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 40E7C18987 for ; Sun, 1 Aug 2021 23:00:14 +0200 (CEST) Received: from localhost ([::1]:50108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mAIZA-0000v5-4g for larch@yhetil.org; Sun, 01 Aug 2021 17:00:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43898) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mAIZ0-0000uv-LN for bug-guix@gnu.org; Sun, 01 Aug 2021 17:00:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53701) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mAIZ0-00029s-Du for bug-guix@gnu.org; Sun, 01 Aug 2021 17:00:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mAIZ0-0005b3-Di for bug-guix@gnu.org; Sun, 01 Aug 2021 17:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#40272: linux-module-build-system don't support an inferior package as a kernel Resent-From: Brice Waegeneire Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 01 Aug 2021 21:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40272 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 40272-submit@debbugs.gnu.org id=B40272.162785155421414 (code B ref 40272); Sun, 01 Aug 2021 21:00:02 +0000 Received: (at 40272) by debbugs.gnu.org; 1 Aug 2021 20:59:14 +0000 Received: from localhost ([127.0.0.1]:37014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAIYE-0005ZK-6Y for submit@debbugs.gnu.org; Sun, 01 Aug 2021 16:59:14 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:27413) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mAIYB-0005Z0-M2 for 40272@debbugs.gnu.org; Sun, 01 Aug 2021 16:59:13 -0400 Received: (Authenticated sender: brice@waegenei.re) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id C62B1240002; Sun, 1 Aug 2021 20:59:04 +0000 (UTC) From: Brice Waegeneire References: <4ace97d14da81f85ee833cacda791edb@waegenei.re> <87k0l5i3mw.fsf@waegenei.re> <875ywpxgdz.fsf@gnu.org> Date: Sun, 01 Aug 2021 22:59:01 +0200 In-Reply-To: <875ywpxgdz.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sun, 01 Aug 2021 18:46:00 +0200") Message-ID: <87h7g8j2zu.fsf@waegenei.re> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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: , Cc: 40272@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1627851614; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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; bh=souZ10eqelMoeICi6tRFAJJPg3jFPkWsYE7PJ1Ktlxw=; b=Kh0+KfO6auGHW/LfGCO+A4tnw0nq4HcVTZCGcjfgFKeQp6LOT9jR7XCdEgR/AJT9+Hsm8k z0twac9NtmLpVGVbYfBlR487tU+817C8W+GU9Yg9HiMky5LF7wEFyT1p2PfW+65mxFLovr EffF1rD3vLHCKV+C5m9Ea4/ebRl+pPC9guqRbY8Wqg2EU+XdIBaG+okty1fDaxHQKfcnpe Rk+4I2VVPFz8/0BQMBWpAAOfR/6NZ49aAjT1Fxo2uOkpYgZ14l+wgnq2KSN+36VNJm8ESY TRhcy0nDP0CP2OZFVioykV75xBGUFsmHPP3bgMSt+nUccYEg2UiXdQ0aHU3p4g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1627851614; a=rsa-sha256; cv=none; b=qoDflAlsLvR4uY/PRZhtw9km7HB9J/feZS63l26yAnrHaPTILIdZRi1jQ9DOvJS+/jeNou 6YCyqCeBPoP3nmzYLAM/5p7tlqIDoRadJ9FyXsxvPqlglDWxmKjeeAKBWnnqNGszoH4k+q Vjns55ZpVVTa0KhosefFugAd6EdBTIZonK5xnsXUt7eg1GUjKU051WxJWTy/OJcqHqrwCj 4txcSfP4WkJei4id051kz0TsLfHMRbIkmnHdcEur8KERRwKq/7cXsoM9XDzvPQiS6B/Xc+ XnLBuzEdH4YQmpUiXnJlSK9JPMrUtpmfixnHPtJOaalEoy7lclssM3VyRyae8Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.42 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 40E7C18987 X-Spam-Score: -2.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2zmeSi+E5Bvb Hello Ludo=E2=80=99, Ludovic Court=C3=A8s writes: > [...] > In this case, the problem is that (@ (guix build-system linux-module) > lower) assumes that =E2=80=98linux=E2=80=99 is a : > > (build-inputs `(,@(if source > `(("source" ,source)) > '()) > ,@native-inputs > ;; TODO: Remove "gmp", "mpfr", "mpc" since they are > ;; only needed to compile the gcc plugins. Maybe > ;; remove "flex", "bison", "elfutils", "perl", > ;; "openssl". That leaves very little ("bc", "gcc", > ;; "kmod"). > ,@(package-native-inputs linux) ;<----- HERE > > I suppose you could add a special-case for (inferior-package? linux). > Not pretty, but it=E2=80=99d do the job. As I said on IRC, I had already tried that without success. I did the following change: --8<---------------cut here---------------start------------->8--- diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-m= odule.scm index fc3d959ce7..c30cac90f9 100644 --- a/guix/build-system/linux-module.scm +++ b/guix/build-system/linux-module.scm @@ -21,6 +21,7 @@ #:use-module (guix store) #:use-module (guix utils) #:use-module (guix derivations) + #:use-module (guix inferior) #:use-module (guix search-paths) #:use-module (guix build-system) #:use-module (guix build-system gnu) @@ -129,7 +130,10 @@ ;; remove "flex", "bison", "elfutils", "perl", ;; "openssl". That leaves very little ("bc", "gcc", ;; "kmod"). - ,@(package-native-inputs linux) + ;; ,@(package-native-inputs linux) + ,@(if (inferior-package? linux) + (inferior-package-native-inputs linux) + (package-native-inputs linux)) ,@if target ;; Use the standard cross inputs of ;; 'gnu-build-system'. --8<---------------cut here---------------end--------------->8--- Which produced this backtrace, which seems to indicate an issue in the 'package->bag' procedure: --8<---------------cut here---------------start------------->8--- $ COLUMNS=3D999 ./pre-inst-env guix build -f ./40272.scm Backtrace: In srfi/srfi-1.scm: 673:15 19 (append-map # ("x86_64-linux")) 586:17 18 (map1 ("x86_64-linux")) In guix/scripts/build.scm: 610:20 17 (_ _) In guix/store.scm: 1362:4 16 (map/accumulate-builds #= _ _) In srfi/srfi-1.scm: 586:17 15 (map1 (#)) In guix/store.scm: 1320:8 14 (call-with-build-handler # _) In guix/scripts/build.scm: 569:18 13 (_ _) In guix/packages.scm: 1177:16 12 (package-derivation _ # _ #:graft? _) 1494:22 11 (thunk) 1177:16 10 (package->bag _ _ _ #:graft? _) 1279:21 9 (thunk) In ice-9/eval.scm: 293:34 8 (_ #(#(#(#(#(#(#(#) "ddcci-driver-linux-0.3.3" (#:system "x86_64-linux" #:source= # url: "https://gitlab.com/ddcci-driver-linux/ddc= ci-driver-linux.git" commit: "v0.3.3" recursive?: #f> # () 7f8aef024060> #:i= nputs () #:native-inputs () #:outputs ("out") #:target #f #:tests? #f #:pha= ses (modify-phases %standard-phases (replace (quote build) (lambda args (fo= r-each (lambda (module) (with-directory-excursion module (apply (assoc-ref = %standard-phases (quote build)) args))) (quote ("ddcci" "ddcci-backlight"))= ) #t)) (replace (quote install) (lambda args (for-each (lambda (module) (wi= th-directory-excursion module (apply (assoc-ref %standard-phases (quote ins= tall)) args))) (quote ("ddcci" "ddcci-backlight"))) #t))) #:linux #) # url= : =E2=80=A6> =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80= =A6)) 159:9 7 (_ #(#(#(#(#(#(#(#) "ddcci-driver-linux-0.3.3" (#:system "x86_64-linux" #:source= # url: "https://gitlab.com/ddcci-driver-linux/ddc= ci-driver-linux.git" commit: "v0.3.3" recursive?: #f> # () 7f8aef024060> #:i= nputs () #:native-inputs () #:outputs ("out") #:target #f #:tests? #f #:pha= ses (modify-phases %standard-phases (replace (quote build) (lambda args (fo= r-each (lambda (module) (with-directory-excursion module (apply (assoc-ref = %standard-phases (quote build)) args))) (quote ("ddcci" "ddcci-backlight"))= ) #t)) (replace (quote install) (lambda args (for-each (lambda (module) (wi= th-directory-excursion module (apply (assoc-ref %standard-phases (quote ins= tall)) args))) (quote ("ddcci" "ddcci-backlight"))) #t))) #:linux #) # url= : =E2=80=A6> =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80= =A6)) 159:9 6 (_ #(#(#(#(#(#(#(#) "ddcci-driver-linux-0.3.3" (#:system "x86_64-linux" #:source= # url: "https://gitlab.com/ddcci-driver-linux/ddc= ci-driver-linux.git" commit: "v0.3.3" recursive?: #f> # () 7f8aef024060> #:i= nputs () #:native-inputs () #:outputs ("out") #:target #f #:tests? #f #:pha= ses (modify-phases %standard-phases (replace (quote build) (lambda args (fo= r-each (lambda (module) (with-directory-excursion module (apply (assoc-ref = %standard-phases (quote build)) args))) (quote ("ddcci" "ddcci-backlight"))= ) #t)) (replace (quote install) (lambda args (for-each (lambda (module) (wi= th-directory-excursion module (apply (assoc-ref %standard-phases (quote ins= tall)) args))) (quote ("ddcci" "ddcci-backlight"))) #t))) #:linux #) # url= : =E2=80=A6> =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80= =A6)) 159:9 5 (_ #(#(#(#(#(#(#(#) "ddcci-driver-linux-0.3.3" (#:system "x86_64-linux" #:source= # url: "https://gitlab.com/ddcci-driver-linux/ddc= ci-driver-linux.git" commit: "v0.3.3" recursive?: #f> # () 7f8aef024060> #:i= nputs () #:native-inputs () #:outputs ("out") #:target #f #:tests? #f #:pha= ses (modify-phases %standard-phases (replace (quote build) (lambda args (fo= r-each (lambda (module) (with-directory-excursion module (apply (assoc-ref = %standard-phases (quote build)) args))) (quote ("ddcci" "ddcci-backlight"))= ) #t)) (replace (quote install) (lambda args (for-each (lambda (module) (wi= th-directory-excursion module (apply (assoc-ref %standard-phases (quote ins= tall)) args))) (quote ("ddcci" "ddcci-backlight"))) #t))) #:linux #) # url= : =E2=80=A6> =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80=A6) =E2=80= =A6)) 293:34 4 (_ #(#(#) #)) 159:9 3 (_ #(#(#) #)) In ice-9/boot-9.scm: 1685:16 2 (raise-exception _ #:continuable? _) 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: In procedure package-name: Wrong type argument: # --8<---------------cut here---------------end--------------->8--- > If we want to go further, we=E2=80=99ll have to end up with GOOPS=E2=80=A6 > [...] Building a parent class of and looks really involved to just fix this issue. Is there another way, or are we forced to use GOOPS in that case? Cheers, - Brice