unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Brice Waegeneire <brice@waegenei.re>
To: 40272@debbugs.gnu.org
Subject: bug#40272: linux-module-build-system don't support an inferior package as a kernel
Date: Sun, 01 Aug 2021 17:30:31 +0200	[thread overview]
Message-ID: <87k0l5i3mw.fsf@waegenei.re> (raw)
In-Reply-To: <4ace97d14da81f85ee833cacda791edb@waegenei.re> (Brice Waegeneire's message of "Sat, 28 Mar 2020 12:58:40 +0000")

Brice Waegeneire <brice@waegenei.re> writes:

> Message Body
> Hello,
>
> The linux-module-build-system crash when using an inferior package as 
> 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 
> 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 
> forward
> package.

Hello Guix,

Gentle bump.

The core of this issue is that a package can't depend on a
<inferior-package> because build systems assume the inputs are
<package>.  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=999 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 #<procedure 7f4ddef9c720 at ice-9/boot-9.scm:1831:7 (exn)> _ #: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 #<procedure 7f4df6f491c0 at guix/scripts/build.scm:608:17 (system)> ("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 #<store-connection 256.99 7f4deefe2460> _ _)
In srfi/srfi-1.scm:
   586:17 10 (map1 (#<package ddcci-driver-linux@0.3.3 /home/bricewge/project/guix-config/40272.scm:21 7f4de10d3d20>))
In guix/store.scm:
   1320:8  9 (call-with-build-handler #<procedure build-accumulator (continue store things mode)> _)
In guix/scripts/build.scm:
   569:18  8 (_ _)
In guix/packages.scm:
  1177:16  7 (package-derivation _ #<package ddcci-driver-linux@0.3.3 /home/bricewge/project/guix-config/40272.scm:21 7f4de10d3d20> _ #: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 _ #:native-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: #<inferior-package linux-libre@5.12.19 7f4ddef23bd0>
--8<---------------cut here---------------end--------------->8---

Issue #48082¹ is probably linked with that one but I couldn't reproduce
it.

¹ https://issues.guix.gnu.org/48082

Cheers,
- Brice




  reply	other threads:[~2021-08-01 15:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-28 12:58 bug#40272: linux-module-build-system don't support an inferior package as a kernel Brice Waegeneire
2021-08-01 15:30 ` Brice Waegeneire [this message]
2021-08-01 16:46   ` Ludovic Courtès
2021-08-01 20:59     ` Brice Waegeneire
2021-08-02 17:12       ` Maxime Devos
2021-08-03 13:32         ` Ludovic Courtès
2021-08-02 19:03     ` Danny Milosavljevic
2021-08-03 13:34       ` Ludovic Courtès

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=87k0l5i3mw.fsf@waegenei.re \
    --to=brice@waegenei.re \
    --cc=40272@debbugs.gnu.org \
    /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).