From: Jesse Millwood <jesse_m@fastmail.com>
To: help-guix@gnu.org
Subject: Re: Help with channel build system and package
Date: Thu, 8 Feb 2024 13:33:09 -0500 [thread overview]
Message-ID: <cd4dc4dd-fd31-40a2-8351-c2c541c0c677@fastmail.com> (raw)
In-Reply-To: <3587568.aeNJFYEL58@akashi>
Thanks for the response Marek
On 2/8/24 12:00, Marek Paśnikowski wrote:
> 08.02.2024 15:32:44 CET Jesse:
>> Thanks for taking a look Carlo!
>>
>> On 2/7/24 22:37, Carlo Zancanaro wrote:
>>> Hi Jesse,
>>>
>>> I know very little about what you're trying to do, but there's one thing
>>> that looked wrong to me:
>>>
>>> On Wed, Feb 07 2024, Jesse wrote:
>>>> ...
>>>>
>>>> (build-system crosstool-ng)
>>>>
>>>> ...
>>> This isn't a build system, right? It's just the package? I think you may
>>> want crosstool-ng-build-system here.
>> However, now I get this:
>>
>> guix build -v3 -L embedded-dev ct-ng-riscv64-unknown-elf
>> guix build: warning: invalid argument list
>> guix build: warning: source expression failed to match any pattern
>> error: crosstool-ng-build-system: unbound variable
>> hint: Did you forget `(use-modules (embedded-dev build-system
>> crosstool-ng))'?
>>
>> guix build: error: ct-ng-riscv64-unknown-elf: unknown package
>>
>> This confuses me a bit because it says that it is an unbound variable
>> but it is defined in embedded-dev/build-system/crosstool-ng.scm. I
>> believe I should be importing this module with the "#:use-module
>> (embedded-dev build-system crosstool-ng)" line in the package file. The
>> symbol should be exported with:
> I am just starting to understand how packaging works, but one thing that
> stands out to me is the #:sample keyword in arguments of the *riscv64* package
> definition. Where is it defined? Is the source correctly imported?
Ha, I am just trying to understand how packaging works too (or at least
I think I am, lol).
That's a good catch and suggestion. I thought that by doing this in
build-system/crosstool-ng.scm:
(define* (crosstool-ng-build name inputs
#:key (sample "unknown")
(test-target "test")
(tests? #t)
(phases '%standard-phases)
(outputs '("out"))
(search-paths '())
(system (%current-system))
(guile #f)
(imported-modules
%crosstool-ng-build-system-modules)
(modules '((guix build
crosstool-ng-build-system)
(guix build utils)))
)
That the #:key (sample "unknown") was defining that as a keyword
argument. It was a hold over from an idea I had that I kind of abandoned
but didn't think it was causing any issues. I just removed that and the
arguments line from the packages.
Now I get two invalid argument list errors:
guix build -v3 -L embedded-dev ct-ng-riscv64-unknown-elf
guix build: warning: invalid argument list
guix build: warning: invalid argument list
error: crosstool-ng-build-system: unbound variable
hint: Did you forget `(use-modules (embedded-dev build-system
crosstool-ng))'?
guix build: error: ct-ng-riscv64-unknown-elf: unknown package
I guess I was thinking that it was saying that my invocation of the guix
build command had an invalid argument given. I hadn't thought that it
was talking about an argument given to one of the functions. That gives
me some where to start looking at least.
>
> My hypothesis is that guix, upon loading the module in question:
> 1. fails to parse the #:sample keyword (invalid argument list warning)
> 2. fails to parse the package definition due to the above (pattern failure)
> 3. fails to find the package definition due to the above (unbound variable)
>
> This problem is educational to me, so give me the benefit of the doubt.
That's a sound hypothesis. It gives me a good idea of where to look, thanks!
Do you know of any way to increase the verbosity of error messages or
logs to help debug where things are going awry?
>
> Sincerely,
>
> Marek Paśnikowski
Thanks,
Jesse
next prev parent reply other threads:[~2024-02-08 18:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 3:27 Help with channel build system and package Jesse
2024-02-08 3:37 ` Carlo Zancanaro
2024-02-08 14:32 ` Jesse
2024-02-08 17:00 ` Marek Paśnikowski
2024-02-08 18:33 ` Jesse Millwood [this message]
2024-02-08 18:52 ` Marek Paśnikowski
2024-02-15 13:23 ` Jesse
2024-03-08 2:35 ` Jesse Millwood
2024-03-08 10:43 ` Marek Paśnikowski
2024-03-09 14:44 ` Jesse Millwood
2024-03-09 3:39 ` Richard Sent
2024-03-09 15:02 ` Jesse Millwood
2024-03-16 21:47 ` Jesse Millwood
2024-03-16 22:50 ` Jesse Millwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cd4dc4dd-fd31-40a2-8351-c2c541c0c677@fastmail.com \
--to=jesse_m@fastmail.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).