[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Help with channel build system and package
From: |
Jesse |
Subject: |
Help with channel build system and package |
Date: |
Wed, 7 Feb 2024 22:27:54 -0500 |
User-agent: |
Mozilla Thunderbird |
Hello,
I have a channel where I am trying to develop a few packages that need a
new build system. I want to try and use guix to build toolchains from
crosstool-ng[1] for embedded development. In an effort to guix-fiy some
of my development environments I'd like to be able to use the same
toolchains that I do normally but specified in a manifest for embedded
projects. I have attached my channel here.
It seems to be able to build the crosstool-ng package fine with
guix build -v3 -L embedded-dev crosstool-ng
guix build: warning: invalid argument list
guix build: warning: source expression failed to match any pattern
guix build: warning: ambiguous package specification `crosstool-ng'
guix build: warning: choosing crosstool-ng@1.26.0 from
embedded-dev/embedded-dev/packages/crosstool-ng.scm:26:2
/gnu/store/5adzqwspya97z59pgxfvchrlyddl7v6a-crosstool-ng-1.26.0
However, when I try to build one of my packages that depend on
crosstool-ng 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
Backtrace:
In ice-9/boot-9.scm:
1747:15 19 (with-exception-handler #<procedure 7fd0988d3ea0 at ic…> …)
1752:10 18 (with-exception-handler _ _ #:unwind? _ # _)
In guix/ui.scm:
485:6 17 (_)
In guix/scripts/build.scm:
711:5 16 (_)
In srfi/srfi-1.scm:
673:15 15 (append-map #<procedure 7fd09b28b140 at guix/scripts/b…> …)
586:17 14 (map1 ("x86_64-linux"))
In guix/scripts/build.scm:
713:21 13 (_ _)
In guix/store.scm:
1380:11 12 (map/accumulate-builds #<store-connection 256.99 7fd0a…> …)
1298:8 11 (call-with-build-handler #<procedure 7fd0988d3e40 at g…> …)
In guix/scripts/build.scm:
667:16 10 (_ #<package ct-ng-riscv64-unknown-elf@1.26.0 embedded-…>)
656:24 9 (_ #<package ct-ng-riscv64-unknown-elf@1.26.0 embedded…> …)
In guix/packages.scm:
1372:17 8 (supported-package? #<package ct-ng-riscv64-unknown-el…> …)
In guix/memoization.scm:
101:0 7 (_ #<hash-table 7fd09923d640 0/31> #<package ct-ng-ris…> …)
In guix/packages.scm:
1350:39 6 (_)
1612:16 5 (package->bag _ _ _ #:graft? _)
1709:22 4 (thunk)
In guix/build-system.scm:
94:2 3 (make-bag _ _ #:source _ #:inputs _ #:native-inputs _ # …)
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:
Throw to key `match-error' with args `("match" "no matching pattern"
#<package crosstool-ng@1.26.0
embedded-dev/embedded-dev/packages/crosstool-ng.scm:26 7fd09cb334d0>)'.
I'm a little lost on how to proceed debugging this. It seems like it is
saying it can't find the crosstool-ng package. It seemed to build fine
and the package definition is in the same file.
For some background, when building a toolchain from crosstool-ng you
provide it with a defconfig and it has a number of steps it goes through
to bootstrap it and pull the versioned dependencies down and everything.
So my plan was to have some of these packages that use crosstool-ng and
just provide the defconfig as a plain file:
(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)
(arguments `(#:sample "riscv64-unknown-elf"))
(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+))
))
The actual guix build system that I put together mainly follows others
that I saw in the guix source. It really just deletes a bunch of phases
from the gnu standard phases and then just runs the crosstool-ng
commands, one per phase.
There are some tweaks that I want to make here and there to clean things
up before I see if this is upstreamable but I'd like to get this build
debugged first.
Thanks for any tips.
1: https://crosstool-ng.github.io/
embedded-dev.tar.gz
Description: application/gzip
- Help with channel build system and package,
Jesse <=