From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id kNLYFIl56mUCcwAAqHPOHw:P1 (envelope-from ) for ; Fri, 08 Mar 2024 03:35:53 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id kNLYFIl56mUCcwAAqHPOHw (envelope-from ) for ; Fri, 08 Mar 2024 03:35:53 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=fastmail.com header.s=fm1 header.b=bNgzVPAd; dkim=fail ("body hash did not verify") header.d=messagingengine.com header.s=fm1 header.b=e2e9BAyM; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fastmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709865353; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=2r4Nc38YmfcTI+KNj1CLFVU7Je9OvtBC7EWCIVG1fVY=; b=uLApWGvfJSHd+KKtnW7Upc3OrmXGoEtKUm3Rz0t9lmuIJecV7J8m1pbdY9esytkFI9NPGU ux/ehkuRuX4t/WYgu/tCPXDtfJiQxizB99ritGjns382KYtwH16zOP06WIv7GzAOuJCaix vEam8K6fEzwxyZBEyvqWcHFJWt1/oAGZgyhwjvHeN4LMCocY/ADRYJ7x6kGrpezBOAI9Fd qqoJI+9kNTv1OjnA0P/27zU3Rk79GZ2J2ZR/SmVJumKtbLXlua8AeA62Ng9m+SmilwhVhO iBSju7j8l11r2mralCBl4IO80eD4ph3V4nGcpG8hvTKXVN+bz51bTIygrTb3iw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709865353; a=rsa-sha256; cv=none; b=GtMZ/oA1q7ASm7iB1gJZQNNPrvrV/00wx5/m3lNodJ5QTvgnHl4ppeDf57T8unBFcUze4X /z9X9g3OKK9nmZsBMhW2MF4W0PIzbdt5ZDUyka5MBOh4ixePRgT58eB55Q16EUA34J24Pj FFKD70XMnWaaYxKA9skqj2c2f5+C3JnKysBbDdNn966OKdWWzymL9ONKqNtrFs6W5g6FW3 4dQbwbqvkvadfKyAVFzN7/fkFS4mqrLmMo8cmDA+5eRgxb/TThDeoEt33+veTnl0D4wFXI Bk2/bZdvBP/KZf9PFL+x9ziOpbYCLHqq4oTNQCj+bdZusEyHE3oy5SQ5O6yIAg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=fastmail.com header.s=fm1 header.b=bNgzVPAd; dkim=fail ("body hash did not verify") header.d=messagingengine.com header.s=fm1 header.b=e2e9BAyM; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=fastmail.com (policy=none) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2B4BB42F67 for ; Fri, 8 Mar 2024 03:35:52 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1riQ51-0003cu-Dq; Thu, 07 Mar 2024 21:35:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1riQ4x-0003cg-Nt for help-guix@gnu.org; Thu, 07 Mar 2024 21:35:25 -0500 Received: from wfout7-smtp.messagingengine.com ([64.147.123.150]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1riQ4r-0007oi-QY for help-guix@gnu.org; Thu, 07 Mar 2024 21:35:22 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.west.internal (Postfix) with ESMTP id C11E41C0008F for ; Thu, 7 Mar 2024 21:35:13 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 07 Mar 2024 21:35:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1709865313; x=1709951713; bh=w42IqV5rQ5 tgUVv216DkUEbAE1NECQQHLgi67EcNWZU=; b=bNgzVPAddY9s/yiyNT/A7lBVQX aF/LmcYucD1qtiKYx1ym+aX4AB7uB9xj/LF073FZBiWQ39D3o4E7z7f0guIIwWB5 3DVcmTiNpvUmT647nfvty6BtO6DWc/RnKDuuynzC8/6sf3u0t2ZwhvM3CgXU8tDW khi1gSZbMATRI4GxAv7Y12RI5CJRBX5HOqbjJq1pp+TaZFBQZsk9xEoAi0msBm/x JdgXgVTXGQ9l4w9VIC0oiB+PEEtYjwcrwevwZRpfVaB3zQalMAukhvekH018s1ev 08inEdfqqBByqDlkkjFfW4oyYqWpVy0tgRUfPQTHunYINhFas7gsoQlS5e/Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1709865313; x=1709951713; bh=w42IqV5rQ5tgUVv216DkUEbAE1NE CQQHLgi67EcNWZU=; b=e2e9BAyMAGJsjTMMjyvD1gLsJO8MMLMN45uNx8Cyjhpf dteK0A0oKJfnuQJ8m/VB9bHBtGjsvxyiZ3B0U5DGXj387C1G702TdtRWvkei/OA/ 4O8TzmEr1NoucJB32nbplfbtNdEHqdq9pLmgwdP27k5ME1/RvxGfi7QzU81Gi0QK OpC1j1T6ONdBA57N15WRvA//NePzCVt+FDNUOPy5deHNahlRAHv2RatQWXRjv4LP h5IfN6GemUZ1njo1OeLdgUf2e6Jf71AMh65yp8ZlQgq0Y2H0sgP68MGTSVkC3xm8 xr8MgHrQPSCOhz0sh2rxpvPRwLRtWZYFpTRan3CQ8w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrieeggdegjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecuogfuuhhsphgvtghtffhomhgrihhnucdlgeelmdenuc fjughrpegtkfffgggfuffvfhfhjgesrgdtreertddvjeenucfhrhhomheplfgvshhsvgcu ofhilhhlfihoohguuceojhgvshhsvggpmhesfhgrshhtmhgrihhlrdgtohhmqeenucggtf frrghtthgvrhhnpeefheelvdehgfevkeejgfetgfethfehheegleetheekledvhfdugeeg hfehtefhffenucffohhmrghinheptghouggvsggvrhhgrdhorhhgpdhgnhhurdhorhhgpd hgihhthhhusgdrihhonecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomhepjhgvshhsvggpmhesfhgrshhtmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i57f947b1:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Thu, 7 Mar 2024 21:35:12 -0500 (EST) Message-ID: Date: Thu, 7 Mar 2024 21:35:11 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Help with channel build system and package Content-Language: en-US To: help-guix@gnu.org References: <68237c05-3c30-4d36-b733-6251f168ad9e@millwood.earth> <3587568.aeNJFYEL58@akashi> <3091283.mvXUDI8C0e@akashi> <71333165-cb1a-40b2-aee0-70eb68ded67a@millwood.earth> From: Jesse Millwood In-Reply-To: <71333165-cb1a-40b2-aee0-70eb68ded67a@millwood.earth> Received-SPF: pass client-ip=64.147.123.150; envelope-from=jesse_m@fastmail.com; helo=wfout7-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.27 X-Spam-Score: -5.27 X-Migadu-Queue-Id: 2B4BB42F67 X-Migadu-Scanner: mx11.migadu.com X-TUID: nJsi4J0E9Xsm I'm still trying to get this to work. I tracked some things I forgot and now have my channel hosted at: https://codeberg.org/moonling/guix-embedded-dev When I try to build my toolchain package I get this: ➜ guix build -v 4 -L guix-embedded-dev ct-ng-riscv64-unknown-elf substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0% substitute: updating substitutes from 'https://bordeaux.guix.gnu.org'... 100.0% The following derivation will be built: /gnu/store/wm1jba8npfb9jiqsbzd50gz4c89n3gjm-ct-ng-riscv64-unknown-elf-1.26.0.drv building /gnu/store/wm1jba8npfb9jiqsbzd50gz4c89n3gjm-ct-ng-riscv64-unknown-elf-1.26.0.drv... Backtrace:            3 (primitive-load "/gnu/store/kghq1xz3wyb509944y9jd8vhy0l?") In ice-9/eval.scm:    191:27  2 (_ #f)    223:20  1 (proc #) In unknown file:            0 (%resolve-variable (7 . gexp) #) ERROR: In procedure %resolve-variable: Unbound variable: gexp builder for `/gnu/store/wm1jba8npfb9jiqsbzd50gz4c89n3gjm-ct-ng-riscv64-unknown-elf-1.26.0.drv' failed with exit code 1 build of /gnu/store/wm1jba8npfb9jiqsbzd50gz4c89n3gjm-ct-ng-riscv64-unknown-elf-1.26.0.drv failed View build log at '/var/log/guix/drvs/wm/1jba8npfb9jiqsbzd50gz4c89n3gjm-ct-ng-riscv64-unknown-elf-1.26.0.drv.gz'. guix build: error: build of `/gnu/store/wm1jba8npfb9jiqsbzd50gz4c89n3gjm-ct-ng-riscv64-unknown-elf-1.26.0.drv' failed It seems the issue here is an unbound variable "gexp". I'm a little confused about this because I have #:use-module (guix gexp) included in my package and build-system/crosstool-ng.scm files. The backtrace is a little hard to follow. When I search for unbound variable: gexp I do find some posts that refer to unbound variable: ungexp like here https://lists.gnu.org/archive/html/help-guix/2019-06/msg00073.html It seems to be associated with making a file during the build phase. I do have this in my package: (define-public ct-ng-riscv64-unknown-elf   (package     (name "ct-ng-riscv64-unknown-elf")     (source (plain-file "defconfig" "\ CT_CONFIG_VERSION=\"4\"\n CT_EXPERIMENTAL=y\n CT_ARCH_RISCV=y\n # CT_DEMULTILIB is not set\n CT_ARCH_USE_MMU=y\n CT_ARCH_64=y\n CT_DEBUG_GDB=y\n # CT_GDB_CROSS_PYTHON is not set\n" ))     (version "1.26.0")     (build-system crosstool-ng-build-system)     (synopsis "A crosstool-ng based riscv64 unknown elf toolchain")     (description "A crosstool-ng based riscv64 unknown elf toolchain")     (home-page "https://crosstool-ng.github.io/docs/")     (license (list gpl2 gpl2+ gpl3+ lgpl2.1 lgpl3+))     )) I'm wondering if the "plain-file" part is not used properly. I did read in the guix docs that "source" > An object telling how the source code for the package should be > acquired. Most of the time, this is an |origin| object, which denotes > a file fetched from the Internet (see |origin| Reference > ). It can > also be any other “file-like” object such as a |local-file|, which > denotes a file from the local file system (see |local-file| > ). I couldn't find any examples using a "plain-file" but it should be a file-like object I think. If anything sticks out to anyone please send a message, Jesse On 2/15/24 08:23, Jesse wrote: >> About the warnings of invalid argument list: comment out the argument >> lists in >> the toolchain packages (I do not remember fully the names, I do not >> have acces >> to the big computer right now for easy reference). See how the change >> effects >> the build. >> >> I learned a lot by intentionally breaking code and reading the errors. >> > I ended up trying that, removing the arguments from the package, but I > did not get any change in the output. > > One thing I did try is trying to build with the repl. I made this > script, named build-repl.scm: > > (use-modules >  (guix store) >  (guix derivations) >  (guix packages) >  ;;(embedded-dev packages) >  ) > > (define (build-packages packages) >   (with-store store >     (let ((builds (map (lambda (package) >                          (package-derivation store package)) >                        packages))) >       (build-derivations store builds)))) > (define (build-package package) >   (build-packages (list package))) > > Which i got from here: > https://lists.gnu.org/archive/html/help-guix/2020-06/msg00173.html > > I don't seem to be able to use my channel here for some reason but I > think I got around that later. > > For context, this is my directory layout: > > embedded-dev-chan > ├── build-repl.scm > ├── .guix-channel > └── embedded-dev >     ├── build >     │   └── crosstool-ng-build-system.scm >     ├── build-system >     │   └── crosstool-ng.scm >     └── packages >         └── crosstool-ng.scm > > My understanding is that by adding embedded-dev-chan to the load path > I should be able to use the guile files inside with something like > (use-modules embedded-dev packages crosstool-ng). > > I invoked the repl: guix repl -L /home/jesse/Code/embedded-dev-chan > > Then I loaded the "build-repl.scm" script and tried to build my package: > > scheme@(guix-user)> ,load > /home/jesse/Code/embedded-dev-chan/build-repl.scm > scheme@(guix-user) [2]> (use-modules (embedded-dev packages > crosstool-ng)) > While compiling expression: > Syntax error: > unknown location: lambda*: invalid argument list in subform ((phases > (quote %standard-phases)) (outputs (quote ("out"))) (search-paths > (quote ())) (system (%current-system)) (guile #f) (imported-modules > %crosstool-ng-build-system-modules) (modules (quote ((embedded-dev > build crosstool-ng-build-system) (guix build utils))))) of (name > inputs (phases (quote %standard-phases)) (outputs (quote ("out"))) > (search-paths (quote ())) (system (%current-system)) (guile #f) > (imported-modules %crosstool-ng-build-system-modules) (modules (quote > ((embedded-dev build crosstool-ng-build-system) (guix build utils))))) > > This seems like it is giving me a little more to go off of. I > pretified the output a bit: > > ((phases >   (quote %standard-phases)) >  (outputs (quote ("out"))) >  (search-paths (quote ())) >  (system (%current-system)) >  (guile #f) >  (imported-modules %crosstool-ng-build-system-modules) >  (modules >   (quote ((embedded-dev build crosstool-ng-build-system) >           (guix build utils))))) > > of > > (name >  inputs >  (phases (quote %standard-phases)) >  (outputs (quote ("out"))) >  (search-paths (quote ())) >  (system (%current-system)) >  (guile #f) >  (imported-modules %crosstool-ng-build-system-modules) >  (modules (quote ((embedded-dev build crosstool-ng-build-system) >                   (guix build utils))))) > > > I'm not quite sure what this is trying to tell me. It seems like it is > an issue around here in embedded-dev/build-system/crosstool-ng.scm: > > (define* (crosstool-ng-build name inputs >                              (phases '%standard-phases) >                              (outputs '("out")) >                              (search-paths '()) >                              (system (%current-system)) >                              (guile #f) >                              (imported-modules > %crosstool-ng-build-system-modules) >                              (modules '((embedded-dev build > crosstool-ng-build-system) >                                         (guix build utils))) >                              ) >   "Build Crosstool-ng toolchain" > >   (define build >     #~(begin >         (use-modules #$@(sexp->gexp modules)) > >         #$(with-build-variables inputs outputs >             #~(crosstool-ng-build #:name #$name >                                   #:source #+source >                                   #:system #$system >                                   #:phases #$(if (pair? phases) >                                                  (sexp->gexp phases) >                                                  phases) >                                   #:outputs %outputs >                                   #:search-paths '#$(sexp->gexp >                                                      (map > search-path-specification->sexp > search-paths)) >                                   #:inputs %build-inputs)))) > >   (mlet %store-monad ((guile (package->derivation (or guile > (default-guile)) >                                                   system #:graft? #f))) >     (gexp->derivation name build >                       #:system system >                       #:target #f >                       #:modules imported-modules >                       #:guile-for-build guile))) > > > My first thought was that there was a mismatch between the arguments > of crosstool-ng-build -> build -> gexp->derivation. But the arguments > all seem to match up. I compared to build-system/ruby.scm and that > part seems really close to that as well except for some arguments that > seem like they are ruby specific. > > There must be some nuance that I'm missing here. > > Jesse