From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Can the builder access channel code? Date: Tue, 28 May 2019 16:31:33 +0200 Message-ID: <87o93mzm4a.fsf@gnu.org> References: <87o93sx865.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:48937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hVd8b-000066-DC for guix-devel@gnu.org; Tue, 28 May 2019 10:31:38 -0400 In-Reply-To: <87o93sx865.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Fri, 24 May 2019 16:02:10 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Pierre Neidhardt Cc: Guix-devel Hello, Pierre Neidhardt 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-201= 0.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 #) > In unknown file: > 0 (%resolve-variable (7 . foobar-build) #) > > 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-201= 0.drv failed > View build log at '/var/log/guix/drvs/j1/qracwgv7qbxslbf6755z8wcwlv3bcf-f= oobar-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 =E2=80=98foobar-build=E2=80=99 on the build= side? That sounds weird. In general, build systems only import (guix build =E2=80=A6) modules on the build side; things like (guix build-system =E2=80=A6) modules (not to be confused!) are meant to be used on the host side. HTH, Ludo=E2=80=99.