linux-module-build-system don't support an inferior package as a kernel

OpenSubmitted by Brice Waegeneire.
Details
4 participants
  • Brice Waegeneire
  • Danny Milosavljevic
  • Ludovic Courtès
  • Maxime Devos
Owner
unassigned
Severity
normal
B
B
Brice Waegeneire wrote on 28 Mar 2020 13:58
(address . bug-guix@gnu.org)
4ace97d14da81f85ee833cacda791edb@waegenei.re
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.

Following is the file `linux-module-inferior.scm' to reproduce the
error:

Toggle snippet (31 lines)
(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
"591faabd8c93bfb6879910d8a424f0db835066c2"))))

(define my-linux
(let ((inferior (inferior-for-channels channels)))
(first (lookup-inferior-packages inferior "linux-libre"
"4.4.217"))))

(package/inherit ddcci-driver-linux
(arguments
(ensure-keyword-arguments
(package-arguments ddcci-driver-linux)
;; `(#:linux ,(specification->package
"linux-libre@4.4.217")) ; NOTE It works
`(#:linux ,my-linux) ; NOTE It doesn't work
)))

Here is the error:

Toggle snippet (9 lines)
LANGUAGE=C guix build -f linux-module-inferior.scm
Updating channel 'guix' from Git repository at
'https://git.savannah.gnu.org/git/guix.git'...
Backtrace:
1 (primitive-load "/home/bricewge/.config/guix/current/bi…")
In guix/ui.scm:
1894:12 0 (run-guix-command _ . _)

B
B
Brice Waegeneire wrote on 1 Aug 2021 17:30
(address . 40272@debbugs.gnu.org)
87k0l5i3mw.fsf@waegenei.re
Brice Waegeneire <brice@waegenei.re> writes:

Toggle quote (19 lines)
> 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:

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

)))

Here is the backtrace outputed when building the package:

Toggle snippet (40 lines)
$ 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>

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


Cheers,
- Brice
L
L
Ludovic Courtès wrote on 1 Aug 2021 18:46
(name . Brice Waegeneire)(address . brice@waegenei.re)(address . 40272@debbugs.gnu.org)
875ywpxgdz.fsf@gnu.org
Hi,

Brice Waegeneire <brice@waegenei.re> skribis:

Toggle quote (10 lines)
> 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>

In this case, the problem is that (@ (guix build-system linux-module)
lower) assumes that ‘linux’ is a <package>:

(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’d do the job.

If we want to go further, we’ll have to end up with GOOPS…

HTH!

Ludo’.
B
B
Brice Waegeneire wrote on 1 Aug 2021 22:59
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 40272@debbugs.gnu.org)
87h7g8j2zu.fsf@waegenei.re
Hello Ludo’,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (18 lines)
> [...]
> In this case, the problem is that (@ (guix build-system linux-module)
> lower) assumes that ‘linux’ is a <package>:
>
> (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’d do the job.

As I said on IRC, I had already tried that without success. I did the
following change:

Toggle snippet (26 lines)
diff --git a/guix/build-system/linux-module.scm b/guix/build-system/linux-module.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'.

Which produced this backtrace, which seems to indicate an issue in the
'package->bag' procedure:

Toggle snippet (36 lines)
$ COLUMNS=999 ./pre-inst-env guix build -f ./40272.scm
Backtrace:
In srfi/srfi-1.scm:
673:15 19 (append-map #<procedure 7f8aebf46440 at guix/scripts/build.scm:608:17 (system)> ("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 #<store-connection 256.99 7f8afec1beb0> _ _)
In srfi/srfi-1.scm:
586:17 15 (map1 (#<package ddcci-driver-linux@0.3.3 /home/bricewge/project/guix-config/40272.scm:21 7f8aef33aa00>))
In guix/store.scm:
1320:8 14 (call-with-build-handler #<procedure build-accumulator (continue store things mode)> _)
In guix/scripts/build.scm:
569:18 13 (_ _)
In guix/packages.scm:
1177:16 12 (package-derivation _ #<package ddcci-driver-linux@0.3.3 /home/bricewge/project/guix-config/40272.scm:21 7f8aef33aa00> _ #:graft? _)
1494:22 11 (thunk)
1177:16 10 (package->bag _ _ _ #:graft? _)
1279:21 9 (thunk)
In ice-9/eval.scm:
293:34 8 (_ #(#(#(#(#(#(#(#<directory (guix build-system linux-module) 7f8af0d1ef00>) "ddcci-driver-linux-0.3.3" (#:system "x86_64-linux" #:source #<origin #<<git-reference> url: "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux.git" commit: "v0.3.3" recursive?: #f> #<content-hash sha256:0vkkja3ykjil783zjpwp0vz7jy2fp9ccazzi3afd4fjk8gldin7f> () 7f8aef024060> #:inputs () #:native-inputs () #:outputs ("out") #:target #f #:tests? #f #:phases (modify-phases %standard-phases (replace (quote build) (lambda args (for-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) (with-directory-excursion module (apply (assoc-ref %standard-phases (quote install)) args))) (quote ("ddcci" "ddcci-backlight"))) #t))) #:linux #<inferior-package linux-libre@5.12.19 7f8aed887420>) #<origin #<<git-reference> url: …> …) …) …) …) …) …))
159:9 7 (_ #(#(#(#(#(#(#(#<directory (guix build-system linux-module) 7f8af0d1ef00>) "ddcci-driver-linux-0.3.3" (#:system "x86_64-linux" #:source #<origin #<<git-reference> url: "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux.git" commit: "v0.3.3" recursive?: #f> #<content-hash sha256:0vkkja3ykjil783zjpwp0vz7jy2fp9ccazzi3afd4fjk8gldin7f> () 7f8aef024060> #:inputs () #:native-inputs () #:outputs ("out") #:target #f #:tests? #f #:phases (modify-phases %standard-phases (replace (quote build) (lambda args (for-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) (with-directory-excursion module (apply (assoc-ref %standard-phases (quote install)) args))) (quote ("ddcci" "ddcci-backlight"))) #t))) #:linux #<inferior-package linux-libre@5.12.19 7f8aed887420>) #<origin #<<git-reference> url: …> …) …) …) …) …) …))
159:9 6 (_ #(#(#(#(#(#(#(#<directory (guix build-system linux-module) 7f8af0d1ef00>) "ddcci-driver-linux-0.3.3" (#:system "x86_64-linux" #:source #<origin #<<git-reference> url: "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux.git" commit: "v0.3.3" recursive?: #f> #<content-hash sha256:0vkkja3ykjil783zjpwp0vz7jy2fp9ccazzi3afd4fjk8gldin7f> () 7f8aef024060> #:inputs () #:native-inputs () #:outputs ("out") #:target #f #:tests? #f #:phases (modify-phases %standard-phases (replace (quote build) (lambda args (for-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) (with-directory-excursion module (apply (assoc-ref %standard-phases (quote install)) args))) (quote ("ddcci" "ddcci-backlight"))) #t))) #:linux #<inferior-package linux-libre@5.12.19 7f8aed887420>) #<origin #<<git-reference> url: …> …) …) …) …) …) …))
159:9 5 (_ #(#(#(#(#(#(#(#<directory (guix build-system linux-module) 7f8af0d1ef00>) "ddcci-driver-linux-0.3.3" (#:system "x86_64-linux" #:source #<origin #<<git-reference> url: "https://gitlab.com/ddcci-driver-linux/ddcci-driver-linux.git" commit: "v0.3.3" recursive?: #f> #<content-hash sha256:0vkkja3ykjil783zjpwp0vz7jy2fp9ccazzi3afd4fjk8gldin7f> () 7f8aef024060> #:inputs () #:native-inputs () #:outputs ("out") #:target #f #:tests? #f #:phases (modify-phases %standard-phases (replace (quote build) (lambda args (for-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) (with-directory-excursion module (apply (assoc-ref %standard-phases (quote install)) args))) (quote ("ddcci" "ddcci-backlight"))) #t))) #:linux #<inferior-package linux-libre@5.12.19 7f8aed887420>) #<origin #<<git-reference> url: …> …) …) …) …) …) …))
293:34 4 (_ #(#(#<directory (guix build-system linux-module) 7f8af0d1ef00>) #<inferior-package linux-libre@5.12.19 7f8aed887420>))
159:9 3 (_ #(#(#<directory (guix build-system linux-module) 7f8af0d1ef00>) #<inferior-package linux-libre@5.12.19 7f8aed887420>))
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: #<inferior-package linux-libre@5.12.19 7f8aed887420>

Toggle quote (3 lines)
> If we want to go further, we’ll have to end up with GOOPS…
> [...]

Building a parent class of <package> and <inferior-package> looks really
involved to just fix this issue. Is there another way, or are we forced to
use GOOPS in that case?

Cheers,
- Brice
M
M
Maxime Devos wrote on 2 Aug 2021 19:12
(address . 40272@debbugs.gnu.org)
e18d66036f2e8a992d35e591bacb0dd99ba8896a.camel@telenet.be
Brice Waegeneire schreef op zo 01-08-2021 om 22:59 [+0200]:
Toggle quote (11 lines)
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> In procedure package-name: Wrong type argument: #<inferior-package linux-libre@5.12.19 7f8aed887420>
> --8<---------------cut here---------------end--------------->8---
>
> > If we want to go further, we’ll have to end up with GOOPS…
> > [...]
>
> Building a parent class of <package> and <inferior-package> looks really
> involved to just fix this issue. Is there another way, or are we forced to
> use GOOPS in that case?

Going full GOOPS isn't necessary. Something like 'define-gexp-compiler'
could be useful here, to make 'package-inputs' and the like support
inferior packages. More specifically, something like this:

;; In (guix packages)
(define %inputs-hashtable (make-hash-table 2))

(define (package-inputs package)
;; Fast path: package is actually a <package>
(if (eq? (struct-vtable package) <package>)
(%package-inputs package) ; expects a <package>
((hashq-ref %inputs-hashtable (struct-vtable package)) package)))

;; In (guix inferior):
(hashq-set! %inputs-hashtable <inferior-package> %inferior-package-inputs)

and likewise for native-inputs, propagated-inputs, name, version, ...
(some macroology is recommended).

Or, simpler, but less extensible (but probably good enough):

(define-module (guix packages)
[...]
#:autoload (guix inferior) (inferior-package-inputs [...]))

[...]
(define (package-inputs package)
(cond ((package? package) (%package-inputs package))
((inferior-package? package) (inferior-package-inputs package))
(#t (error (G_ "tried to use 'package-inputs' on a non-package object ~a") package))))

The idea of both suggestions is to let 'package-name', 'package-native-inputs',
... work on both regular <package> and <inferior-package> objects.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYQgnchccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7mBGAPwOD7uwLEjgsI40fngUe52n8gp3
6X+rrZLYe8AtDMc9agD9FTyF5fgeKSlfZ08Ipj0SK5es3j+Ei0oA9UOymaVggAg=
=v7sF
-----END PGP SIGNATURE-----


D
D
Danny Milosavljevic wrote on 2 Aug 2021 21:03
(name . Ludovic Courtès)(address . ludo@gnu.org)
20210802210129.0a281c96@scratchpost.org
Hi,

On Sun, 01 Aug 2021 18:46:00 +0200
Ludovic Courtès <ludo@gnu.org> wrote:

Toggle quote (29 lines)
> Brice Waegeneire <brice@waegenei.re> skribis:
>
> > 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>
>
> In this case, the problem is that (@ (guix build-system linux-module)
> lower) assumes that ‘linux’ is a <package>:
>
> (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’d do the job.

Or, as the comment says, it might be enough just to not get the
package-native-inputs from the package ever, but do hard-code
bc, gcc and kmod. Maybe add a comment why :)

The reason I hadn't done that back then is because it's slightly less
maintenance to not have Linux's native-inputs copy&pasted like this
(one day, Linux could switch the GCC version they use).
But really, we should be good for years anyway.
I'm not sure whether Linux checks whether it's being compiled with the
right compiler, though. If not, that could cause some nasty silent
miscompilations in the future.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAmEIQXkACgkQ5xo1VCww
uqWbXgf9ELvOELBWUV5fkNbULGxr31x0m7+ryIP+aYtLVpFgDegzpd2xbo6F8v/j
H4wLqYJazUkVKWMkuuLZ7ogHRK6vWG5stmZXk+pYa1rY6Io+w+Vtt4U+hy/xAVwF
abpssyhuXKV46QQwnIJDRtylpHjv5VbsUdHFla3/KBTwal7aWwMetyt7fwLtkFRk
Gi5M0x9QwUMjqPp0xtlVps5oP41wQrVmG8J6a0uXdjNgA4ja1AgFN1oZGdUldln4
unepxWK2VXaHXyNWCfu493P4lRwL1Ww1TizYirADlrPxez2qqnVLHKkV5dbYDilG
/LLU7x12w8yAQXTR11E40+SCXybrQA==
=LQPm
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 3 Aug 2021 15:32
(name . Maxime Devos)(address . maximedevos@telenet.be)
87zgtytzzs.fsf@gnu.org
Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (14 lines)
> Brice Waegeneire schreef op zo 01-08-2021 om 22:59 [+0200]:
>> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
>> In procedure package-name: Wrong type argument: #<inferior-package linux-libre@5.12.19 7f8aed887420>
>> --8<---------------cut here---------------end--------------->8---
>>
>> > If we want to go further, we’ll have to end up with GOOPS…
>> > [...]
>>
>> Building a parent class of <package> and <inferior-package> looks really
>> involved to just fix this issue. Is there another way, or are we forced to
>> use GOOPS in that case?
>
> Going full GOOPS isn't necessary.

Yes, I wasn’t seriously suggesting doing that just yet (I developed an
aversion to GOOPS for reasons that may be debatable ;-)), but it strikes
me as a case where our ad-hoc extension mechanism,
‘define-gexp-compiler’, appears to be insufficient.

Thanks,
Ludo’.
L
L
Ludovic Courtès wrote on 3 Aug 2021 15:34
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
87v94mtzwv.fsf@gnu.org
Hi Danny!

Danny Milosavljevic <dannym@scratchpost.org> skribis:

Toggle quote (3 lines)
> On Sun, 01 Aug 2021 18:46:00 +0200
> Ludovic Courtès <ludo@gnu.org> wrote:

[...]

Toggle quote (21 lines)
>> In this case, the problem is that (@ (guix build-system linux-module)
>> lower) assumes that ‘linux’ is a <package>:
>>
>> (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’d do the job.
>
> Or, as the comment says, it might be enough just to not get the
> package-native-inputs from the package ever, but do hard-code
> bc, gcc and kmod. Maybe add a comment why :)

True, that may be the easiest solution, and it certainly makes sense.

Thanks,
Ludo’.
?
Your comment

Commenting via the web interface is currently disabled.

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