From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 01 11:30:45 2021 Received: (at 40272) by debbugs.gnu.org; 1 Aug 2021 15:30:45 +0000 Received: from localhost ([127.0.0.1]:36882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mADQK-0003RL-Sl for submit@debbugs.gnu.org; Sun, 01 Aug 2021 11:30:45 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:48397) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mADQI-0003R3-Gw for 40272@debbugs.gnu.org; Sun, 01 Aug 2021 11:30:43 -0400 Received: (Authenticated sender: brice@waegenei.re) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 085C5E0006 for <40272@debbugs.gnu.org>; Sun, 1 Aug 2021 15:30:35 +0000 (UTC) From: Brice Waegeneire To: 40272@debbugs.gnu.org Subject: Re: bug#40272: linux-module-build-system don't support an inferior package as a kernel References: <4ace97d14da81f85ee833cacda791edb@waegenei.re> Date: Sun, 01 Aug 2021 17:30:31 +0200 In-Reply-To: <4ace97d14da81f85ee833cacda791edb@waegenei.re> (Brice Waegeneire's message of "Sat, 28 Mar 2020 12:58:40 +0000") Message-ID: <87k0l5i3mw.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-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40272 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Brice Waegeneire writes: > Message Body > Hello, > > The linux-module-build-system crash when using an inferior package as=20 > the > kernel. I have first reported the issue in the second part of[0] and > latter, reading[1] made me realize that the root cause was in `(guix > `build-system linux-module)' and not directly related to the > `kernel-loadable-modules' field. > > I tried fixing it myself but (guix inferior) seems to be missing some > important procedures so I can manage to do it by myself - I don't have=20 > the > skills to modify that part of the code base. A way to make a package by > inheriting from a inferior-package would greatly help because > `make-linux-module-builder' assume that it's argument is straight=20 > forward > package. Hello Guix, Gentle bump. The core of this issue is that a package can't depend on a because build systems assume the inputs are . Having a procedure 'inferior-package->package' would solve it, but I'm guessing this isn't possible. Here is an updated package file to reproduce the issue: --8<---------------cut here---------------start------------->8--- (use-modules (gnu) (gnu system) (srfi srfi-1) (guix inferior) (guix utils) (guix packages) (guix channels)) (use-package-modules linux) (define channels (list (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git") (commit "6886c4960dd4d8913113ae0330cd8b2d27947a57")))) (define my-linux (let ((inferior (inferior-for-channels channels))) (first (lookup-inferior-packages inferior "linux-libre" "5.12")))) (package/inherit ddcci-driver-linux (arguments (ensure-keyword-arguments (package-arguments ddcci-driver-linux) ;; It works! ;; `(#:linux ,(specification->package ;; "linux-libre@5.12")) ;; It doesn't work... `(#:linux ,my-linux) ))) --8<---------------cut here---------------end--------------->8--- Here is the backtrace outputed when building the package: --8<---------------cut here---------------start------------->8--- $ COLUMNS=3D999 guix build -f ./40272.scm Backtrace: In guix/ui.scm: 463:3 19 (_) In ice-9/boot-9.scm: 1747:15 18 (with-exception-handler # _ #:unwind? _ #:unwind-for-type _) 1752:10 17 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) In guix/ui.scm: 450:6 16 (_) In guix/scripts/build.scm: 608:5 15 (_) In srfi/srfi-1.scm: 673:15 14 (append-map # ("x86_64-linux")) 586:17 13 (map1 ("x86_64-linux")) In guix/scripts/build.scm: 610:20 12 (_ _) In guix/store.scm: 1362:4 11 (map/accumulate-builds #= _ _) In srfi/srfi-1.scm: 586:17 10 (map1 (#)) In guix/store.scm: 1320:8 9 (call-with-build-handler # _) In guix/scripts/build.scm: 569:18 8 (_ _) In guix/packages.scm: 1177:16 7 (package-derivation _ # _ #:graft? _) 1494:22 6 (thunk) 1177:16 5 (package->bag _ _ _ #:graft? _) 1279:21 4 (thunk) In guix/build-system/linux-module.scm: 132:22 3 (lower "ddcci-driver-linux-0.3.3" #:source _ #:inputs _ #:nati= ve-inputs _ #:outputs _ #:system _ #:target _ #:linux _ . _) 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-native-inputs-real: Wrong type argument: # --8<---------------cut here---------------end--------------->8--- Issue #48082=C2=B9 is probably linked with that one but I couldn't reproduce it. =C2=B9 https://issues.guix.gnu.org/48082 Cheers, - Brice