linux modules does not support inferior kernel

  • Open
  • quality assurance status badge
Details
2 participants
  • Oleg Pykhalov
  • Maxime Devos
Owner
unassigned
Submitted by
Oleg Pykhalov
Severity
normal
O
O
Oleg Pykhalov wrote on 4 Dec 2021 20:25
(name . bug-guix)(address . bug-guix@gnu.org)
87o85wxjd3.fsf@gmail.com
Hi Guix,

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

Toggle snippet (17 lines)
(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"))))

Toggle snippet (35 lines)
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>
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAmGrwLgUHGdvLndpZ3Vz
dEBnbWFpbC5jb20ACgkQFn+OpQAa+pxvIQ//VaFMgehMZhtU2U4HEu7vf7exEFh9
wAIoUqJQi9zB2CGBdvLjcFtiPePlivNT7uZUcbbfdQg1CyxWhPkBmrj6dxQho9Ea
U607kDKXpSYJgCwZaooo2zHRluzk5gRGbii/Czuopgotctc3kjuW4EfQf0lJQ4vV
7wW0cH8yQlCFKg3ZB8YTCqNtxJywqmuaqH9JI4a8qrNuAL8pdwnNpd1MWdaT0432
hFWoMsNnuYJZyViuGssYbHTIM6Id0G+TM9PzwKYI4APF1eJ2D6tt6i0oAGowiVdB
g9w4ykTTg9b6Oh2Hl2N+GlZhhrVgnmUMSR7F4EOVkMiM66CWrSnTNMDavLxe1Gmw
0Wj50SQRhwIJiTahfd6h0ebW63n00LhN7XPTodVkyZ/g1LJUeiJaHvbuTSik5Spf
G1d0zyYMktvevX2ufvbK1AU9he5PYRBETgp/bm5XSi+CWcSelTzUHBZyI4QlV0ZL
INB3RGgyjThbdoSwBQtigd7UJDsMHMFhntqv+1AFM7Lh9ZLn/LwSBG9gWmFaVt4u
4ALzV9K1lt5gmJhrdqF2SH+36KXq1A045osugp3Lw/T+zxb+hnNsl2GA9TG0xOd4
TVvNilx4tXLxJ4EnOLPg7PLFlwUBtox68JaXpgnBnRHueM+19qx+/RWW9CyY95RC
slnM6iFwU5ZEtXE=
=+Bet
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 4 Dec 2021 21:19
5745fccbe4a7d902b3b4517f37042dbcb5e46a48.camel@telenet.be
Oleg Pykhalov schreef op za 04-12-2021 om 22:25 [+0300]:
Toggle quote (5 lines)
> 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:
Toggle quote (2 lines)
> #<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
M
O
O
Oleg Pykhalov wrote on 5 Dec 2021 14:22
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 52282@debbugs.gnu.org)
87h7bnjidp.fsf@gmail.com
Maxime Devos <maximedevos@telenet.be> writes:

Toggle quote (9 lines)
> 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:
Toggle snippet (31 lines)
(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+))))
-----BEGIN PGP SIGNATURE-----

iQJIBAEBCgAyFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAmGsvTIUHGdvLndpZ3Vz
dEBnbWFpbC5jb20ACgkQFn+OpQAa+py9rhAAjrW0V0LmARMyy2aQcAfS2lANMJLR
cHOW3bF6K1HPY3Iy+hHFM5Dh9ERkMGBA5OfWKivr2lvC1nB52oc+O676zy1uEhHb
Dzd3mTwp4y4t2ShUUk3OChTo+u6Vrs8StWJhJPrkPzNGWb7p7pGQjbhlJpVSi6JP
MFy0bwLNBdRcgHCtZwf2IPSpg7EUZL8FjU291g5dh7r9WVrvq5NVUIEKsJOB82NE
MUJcTyOLplUsxLB+QXeheAMSdT3MzXTFwZLGL4i68hgNRJflUhwIMq+vRO0za/kr
qzTAARzH9u/T8IudEzQg+6Os2kHIFVfqbV3qkutihNPl+CQh1tq1YgsGvWV0VYHE
UoLIU36O7UozYtIm97ebI6yesDKyWM5CDfhXM4AeSbZvZYftlgX0obzIsw9j0fCl
3A/l8JX7yFW0gjEr2fOG6QMvPLd9WIoF27ijdmfmAT0SRX2a9W8MUlLd19fAhk9Y
yh6DHkyWUULKv6MpBbP3tfePKuOo4rPy4mMITgk6uqMUhR5WryJESgkem2LUh+/g
c5mdk6Xi/7dfzuZpkBb8+G/3ObgTDfnRrSLeG6/RWYCaSSDJ4mMmfXtKieEyy8AE
TgLNRH8r0CxxE3J/v6ng8vCIRIMynO1QFHsEt7hbY1NyUkqm3kGFPRtTFDuz2J+W
nKtxlgcCaNefUbw=
=5u6M
-----END PGP SIGNATURE-----

M
M
Maxime Devos wrote on 5 Dec 2021 15:18
(name . Oleg Pykhalov)(address . go.wigust@gmail.com)(address . 52282@debbugs.gnu.org)
df8830d23ccd2f1e7b667bcd6290082481486f90.camel@telenet.be
Oleg Pykhalov schreef op zo 05-12-2021 om 16:22 [+0300]:
Toggle quote (15 lines)
> 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.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 52282@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 52282
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch