* Can the builder access channel code?
@ 2019-05-24 14:02 Pierre Neidhardt
2019-05-28 14:31 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Pierre Neidhardt @ 2019-05-24 14:02 UTC (permalink / raw)
To: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 2205 bytes --]
Hi,
I'm working on a new build-systems from a channel.
When building a package using this build-system, I get
--8<---------------cut here---------------start------------->8---
building /gnu/store/j1qracwgv7qbxslbf6755z8wcwlv3bcf-foobar-qux-hires-2010.drv...
Backtrace:
4 (primitive-load "/gnu/store/v4yp12m19g3bnn901kxa65xpifp?")
In ice-9/eval.scm:
191:35 3 (_ #f)
213:21 2 (_ #f)
223:20 1 (proc #<directory (guile-user) 5cf140>)
In unknown file:
0 (%resolve-variable (7 . foobar-build) #<directory (gui?>)
ERROR: In procedure %resolve-variable:
Unbound variable: foobar-build
builder for `/gnu/store/j1qracwgv7qbxslbf6755z8wcwlv3bcf-foobar-qux-hires-2010.drv' failed with exit code 1
build of /gnu/store/j1qracwgv7qbxslbf6755z8wcwlv3bcf-foobar-qux-hires-2010.drv failed
View build log at '/var/log/guix/drvs/j1/qracwgv7qbxslbf6755z8wcwlv3bcf-foobar-qux-hires-2010.drv.bz2'.
guix build: error: build of `/gnu/store/j1qracwgv7qbxslbf6755z8wcwlv3bcf-foobar-qux-hires-2010.drv' failed
--8<---------------cut here---------------end--------------->8---
Here is the offending part:
--8<---------------cut here---------------start------------->8---
(define* (foobar-build store name inputs
#:key
(tests? #f)
(build-targets #f)
(phases '(@ (my-guix build foobar-build-system)
%standard-phases))
(outputs '("out"))
(search-paths '())
(system (%current-system))
(guile #f)
(substitutable? #t)
(imported-modules %foobar-build-system-modules)
(modules '((my-guix build foobar-build-system)
(guix build utils))))
...
--8<---------------cut here---------------end--------------->8---
The default value of the key argument "modules" is the problem. Is it
possible that the builder cannot find channel modules, or any module out
of the Guix tree?
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can the builder access channel code?
2019-05-24 14:02 Can the builder access channel code? Pierre Neidhardt
@ 2019-05-28 14:31 ` Ludovic Courtès
2019-06-15 12:19 ` Pierre Neidhardt
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2019-05-28 14:31 UTC (permalink / raw)
To: Pierre Neidhardt; +Cc: Guix-devel
Hello,
Pierre Neidhardt <mail@ambrevar.xyz> skribis:
> I'm working on a new build-systems from a channel.
> When building a package using this build-system, I get
>
> building /gnu/store/j1qracwgv7qbxslbf6755z8wcwlv3bcf-foobar-qux-hires-2010.drv...
> Backtrace:
> 4 (primitive-load "/gnu/store/v4yp12m19g3bnn901kxa65xpifp?")
> In ice-9/eval.scm:
> 191:35 3 (_ #f)
> 213:21 2 (_ #f)
> 223:20 1 (proc #<directory (guile-user) 5cf140>)
> In unknown file:
> 0 (%resolve-variable (7 . foobar-build) #<directory (gui?>)
>
> ERROR: In procedure %resolve-variable:
> Unbound variable: foobar-build
> builder for `/gnu/store/j1qracwgv7qbxslbf6755z8wcwlv3bcf-foobar-qux-hires-2010.drv' failed with exit code 1
> build of /gnu/store/j1qracwgv7qbxslbf6755z8wcwlv3bcf-foobar-qux-hires-2010.drv failed
> View build log at '/var/log/guix/drvs/j1/qracwgv7qbxslbf6755z8wcwlv3bcf-foobar-qux-hires-2010.drv.bz2'.
> guix build: error: build of `/gnu/store/j1qracwgv7qbxslbf6755z8wcwlv3bcf-foobar-qux-hires-2010.drv' failed
>
>
> Here is the offending part:
>
> (define* (foobar-build store name inputs
> #:key
> (tests? #f)
> (build-targets #f)
> (phases '(@ (my-guix build foobar-build-system)
> %standard-phases))
> (outputs '("out"))
> (search-paths '())
> (system (%current-system))
> (guile #f)
> (substitutable? #t)
> (imported-modules %foobar-build-system-modules)
> (modules '((my-guix build foobar-build-system)
> (guix build utils))))
> ...
>
> The default value of the key argument "modules" is the problem. Is it
> possible that the builder cannot find channel modules, or any module out
> of the Guix tree?
So your derivation tries to use ‘foobar-build’ on the build side? That
sounds weird.
In general, build systems only import (guix build …) modules on the
build side; things like (guix build-system …) modules (not to be
confused!) are meant to be used on the host side.
HTH,
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can the builder access channel code?
2019-05-28 14:31 ` Ludovic Courtès
@ 2019-06-15 12:19 ` Pierre Neidhardt
0 siblings, 0 replies; 3+ messages in thread
From: Pierre Neidhardt @ 2019-06-15 12:19 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 326 bytes --]
My bad, I had forgotten to add my build-system to the list of build-side modules:
(define %foo-build-system-modules
;; Build-side modules imported by default.
`((my-guix build foo-build-system)
,@%gnu-build-system-modules))
This fixes it, thanks for you help!
--
Pierre Neidhardt
https://ambrevar.xyz/
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-06-15 16:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-24 14:02 Can the builder access channel code? Pierre Neidhardt
2019-05-28 14:31 ` Ludovic Courtès
2019-06-15 12:19 ` Pierre Neidhardt
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).