unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#52282: linux modules does not support inferior kernel
@ 2021-12-04 19:25 Oleg Pykhalov
  2021-12-04 20:19 ` Maxime Devos
  0 siblings, 1 reply; 5+ messages in thread
From: Oleg Pykhalov @ 2021-12-04 19:25 UTC (permalink / raw)
  To: 52282

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

Hi Guix,

I cannot build a system after adding '(kernel-loadable-modules (list
vendor-reset-linux-module))' to the Guix system config.

--8<---------------cut here---------------start------------->8---
      (kernel-loadable-modules (list vendor-reset-linux-module))
      (kernel
       (let*
           ((channels
             (list (channel
                    (name 'nonguix)
                    (url "https://gitlab.com/nonguix/nonguix")
                    (commit "10cdced375f835c8a1f51a00ac0eefe38c82d00a"))
                   (channel
                    (name 'guix)
                    (url "https://git.savannah.gnu.org/git/guix.git")
                    (commit "de81a58f79425dcab3d5e149657b97114be56325"))))
            (inferior
             (inferior-for-channels channels)))
         (first (lookup-inferior-packages inferior "linux" "5.14"))))
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
Backtrace:
In guix/store.scm:
   1320:8 19 (call-with-build-handler #<procedure 7fc7fe1f4f60 at g…> …)
  2119:24 18 (run-with-store #<store-connection 256.99 7fc800864910> …)
In guix/gexp.scm:
   1156:2 17 (_ #<store-connection 256.99 7fc800864910>)
   1022:2 16 (_ _)
    868:4 15 (_ _)
In guix/store.scm:
  2004:12 14 (_ #<store-connection 256.99 7fc800864910>)
   1381:9 13 (map/accumulate-builds #<store-connection 256.99 7fc80…> …)
   1320:8 12 (call-with-build-handler #<procedure 7fc7fe29af60 at g…> …)
  2119:24 11 (run-with-store #<store-connection 256.99 7fc800864910> …)
In guix/gexp.scm:
   873:13 10 (_ _)
In guix/store.scm:
   1956:8  9 (_ _)
In guix/gexp.scm:
   275:18  8 (_ _)
In guix/store.scm:
  1991:38  7 (_ #<store-connection 256.99 7fc800864910>)
In guix/packages.scm:
  1343:16  6 (package-derivation _ #<package vendor-reset-linux-mod…> …)
  1660:22  5 (thunk)
  1343:16  4 (package->bag _ _ _ #:graft? _)
  1445:21  3 (thunk)
In guix/build-system/linux-module.scm:
   133:22  2 (lower "vendor-reset-linux-module-0.0.1-1.225a49a" # _ . #)
In ice-9/boot-9.scm:
  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@5.14.15 7fc8055619f0>
--8<---------------cut here---------------end--------------->8---

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#52282: linux modules does not support inferior kernel
  2021-12-04 19:25 bug#52282: linux modules does not support inferior kernel Oleg Pykhalov
@ 2021-12-04 20:19 ` Maxime Devos
  2021-12-04 20:20   ` Maxime Devos
  2021-12-05 13:22   ` Oleg Pykhalov
  0 siblings, 2 replies; 5+ messages in thread
From: Maxime Devos @ 2021-12-04 20:19 UTC (permalink / raw)
  To: Oleg Pykhalov, 52282

Oleg Pykhalov schreef op za 04-12-2021 om 22:25 [+0300]:
> Hi Guix,
> 
> I cannot build a system after adding '(kernel-loadable-modules (list
> vendor-reset-linux-module))' to the Guix system config. [...]

Are you using a linux module package with #:linux some-linux-via-an-
inferior? If so, the likely cause is this code from (guix build-system
linux-module):

(define* (lower [...])
  [...]
  ,@(package-native-inputs linux)
  [...])

Currently, inferior packages aren't packages, so this fails with

In procedure %package-native-inputs-real: Wrong type argument:
> #<inferior-package linux@5.14.15 7fc8055619f0>

The solution would be to use inferior-package-native-inputs when linux
is an inferior package. (Search for inferior-package? in the source
code.)

Greetings,
Maxime





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#52282: linux modules does not support inferior kernel
  2021-12-04 20:19 ` Maxime Devos
@ 2021-12-04 20:20   ` Maxime Devos
  2021-12-05 13:22   ` Oleg Pykhalov
  1 sibling, 0 replies; 5+ messages in thread
From: Maxime Devos @ 2021-12-04 20:20 UTC (permalink / raw)
  To: Oleg Pykhalov, 52282

The underlying issue appears to be reported here:
https://issues.guix.gnu.org/40272





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#52282: linux modules does not support inferior kernel
  2021-12-04 20:19 ` Maxime Devos
  2021-12-04 20:20   ` Maxime Devos
@ 2021-12-05 13:22   ` Oleg Pykhalov
  2021-12-05 14:18     ` Maxime Devos
  1 sibling, 1 reply; 5+ messages in thread
From: Oleg Pykhalov @ 2021-12-05 13:22 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 52282

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

Maxime Devos <maximedevos@telenet.be> writes:

> Oleg Pykhalov schreef op za 04-12-2021 om 22:25 [+0300]:
>> Hi Guix,
>> 
>> I cannot build a system after adding '(kernel-loadable-modules (list
>> vendor-reset-linux-module))' to the Guix system config. [...]
>
> Are you using a linux module package with #:linux some-linux-via-an-
> inferior?

No '#:linux' argument, here is the linux module:
--8<---------------cut here---------------start------------->8---
(define-module (wigust packages linux)
  #:use-module (guix packages)
  #:use-module (gnu packages)
  #:use-module (guix git-download)
  #:use-module (guix build-system linux-module)
  #:use-module ((guix licenses) #:prefix license:))

(define-public vendor-reset-linux-module
  (let ((revision "1")
        (commit "225a49a40941e350899e456366265cf82b87ad25"))
    (package
      (name "vendor-reset-linux-module")
      (version (git-version "0.0.1" revision commit))
      (source
       (origin
         (method git-fetch)
         (uri (git-reference
               (url "https://github.com/gnif/vendor-reset")
               (commit commit)))
         (file-name (git-file-name name version))
         (sha256
          (base32 "071zd8slra0iqsvzqpp6lcvg5dql5hkn161gh9aq34wix7pwzbn5"))))
      (build-system linux-module-build-system)
      (arguments
       `(#:tests? #f                      ; no tests
                  ))
      (home-page "https://github.com/gnif/vendor-reset")
      (synopsis "Linux kernel module to perform GPU reset method calls")
      (description "")
      (license license:gpl3+))))
--8<---------------cut here---------------end--------------->8---

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#52282: linux modules does not support inferior kernel
  2021-12-05 13:22   ` Oleg Pykhalov
@ 2021-12-05 14:18     ` Maxime Devos
  0 siblings, 0 replies; 5+ messages in thread
From: Maxime Devos @ 2021-12-05 14:18 UTC (permalink / raw)
  To: Oleg Pykhalov; +Cc: 52282

Oleg Pykhalov schreef op zo 05-12-2021 om 16:22 [+0300]:
> Maxime Devos <maximedevos@telenet.be> writes:
> 
> > Oleg Pykhalov schreef op za 04-12-2021 om 22:25 [+0300]:
> > > Hi Guix,
> > > 
> > > I cannot build a system after adding '(kernel-loadable-modules
> > > (list
> > > vendor-reset-linux-module))' to the Guix system config. [...]
> > 
> > Are you using a linux module package with #:linux some-linux-via-
> > an-
> > inferior?
> 
> No '#:linux' argument, here is the linux module: [...]

The service code indirectly calls the procedure 'package-for-kernel'.
It modifies kernel module packages to use the kernel actually
specified in the operating-system record instead of an arbitrary
linux-libre from (gnu packages linux). In your operating-system,
you're using a linux from an inferior.

So effectively, there's a hidden ‘#:linux a-linux-from-an-inferior’ in
play.

Greetings,
Maxime.





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-12-05 18:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-04 19:25 bug#52282: linux modules does not support inferior kernel Oleg Pykhalov
2021-12-04 20:19 ` Maxime Devos
2021-12-04 20:20   ` Maxime Devos
2021-12-05 13:22   ` Oleg Pykhalov
2021-12-05 14:18     ` Maxime Devos

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).