From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: guix-devel <guix-devel@gnu.org>
Subject: Circular dependency woes with gcc variables
Date: Thu, 01 Dec 2022 23:25:25 -0500 [thread overview]
Message-ID: <87pmd2h1oq.fsf@gmail.com> (raw)
Hi,
After struggling for a couple hours (!) with top level cycles when
attempting to use the procedures from (gnu packages cross-base), I've
decided to try to have top level pre-defined variables for these in a
new module. The idea was that a new module could minimize the
inter-dependencies at the top level:
Put in : gnu/packages/cross-toolchains.scm
--8<---------------cut here---------------start------------->8---
(define-module (gnu packages cross-toolchains)
#:use-module (gnu packages cross-base)
#:autoload (gnu packages gcc) (gcc-9))
(define-public xgcc-armhf
(let ((triplet "arm-linux-gnueabihf"))
(cross-gcc triplet
#:xbinutils (cross-binutils triplet)
#:libc (cross-libc triplet))))
(define-public xgcc-armhf-9
(let ((triplet "arm-linux-gnueabihf"))
(cross-gcc triplet
#:xgcc gcc-9
#:xbinutils (cross-binutils triplet)
#:libc (cross-libc triplet
#:xgcc gcc-9))))
--8<---------------cut here---------------end--------------->8---
And register in gnu/local.mk like:
--8<---------------cut here---------------start------------->8---
modified gnu/local.mk
@@ -185,6 +185,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/crates-graphics.scm \
%D%/packages/crates-gtk.scm \
%D%/packages/cross-base.scm \
+ %D%/packages/cross-toolchains.scm \
%D%/packages/crypto.scm \
%D%/packages/cryptsetup.scm \
%D%/packages/cups.scm \
--8<---------------cut here---------------end--------------->8---
When we try to build, we get:
--8<---------------cut here---------------start------------->8---
Compiling Scheme modules...
[ 78%] LOAD gnu/packages/cross-toolchains.scm
error: failed to load 'gnu/packages/cross-toolchains.scm':
ice-9/eval.scm:293:34: No variable named gcc-9 in #<interface (gnu packages gcc) 7f0aac3f0d20>
--8<---------------cut here---------------end--------------->8---
Is there a way to get passed that? Everything I've tried (lazily
resolving gcc-9, delaying via 'delay', etc. hasn't worked). It'd be
nice to have the cross-compilers more readily available/usable.
--
Thanks,
Maxim
reply other threads:[~2022-12-02 4:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmd2h1oq.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=guix-devel@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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.