From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 65716@debbugs.gnu.org
Subject: bug#65716: bug#65718: Importing a toolchain packages causes top-level dependency cycles
Date: Sun, 03 Sep 2023 22:16:47 -0400 [thread overview]
Message-ID: <875y4qu1gw.fsf_-_@gmail.com> (raw)
In-Reply-To: <87lednt3ni.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 03 Sep 2023 16:14:57 -0400")
Hi Ludovic,
Maxim Cournoyer <maxim.cournoyer@gmail.com> writes:
> Hi Ludovic,
>
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hello,
>>
>> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>>
>>> Adding the Guile undocumented "(set! %load-verbosely #t)" to my local
>>> near the top of my (guix config) module, I see, when running 'make':
>>>
>>> make[2] : on entre dans le répertoire « /home/maxim/src/guix »
>>> [...]
>>> Compiling Scheme modules...
>>> [ 0%] LOAD guix.scm
>>> ;;; loading ./guix/build/syscalls.scm
>>> ;;; loading ./guix/build/syscalls.scm
>>
>> [...]
>>
>> Looks like this is independent from your change no? There’s no
>> ergodox.scm in the list of loaded files AFAICS.
>>
>> Do you experience the problem without your patch?
>
> I am not! As soon as I go back to a commit before my change, everything
> starts working again. I'm thoroughly puzzled :-)
(gnu packages avr) has definitions referencing gcc from the top level
(e.g. avr-gcc), which probably plays a role in this. (gnu packages
cross-base) has the note at the bottom:
--8<---------------cut here---------------start------------->8---
;;; Concrete cross tool chains are instantiated like this:
;;
;; (define-public xgcc-armhf
;; (let ((triplet "arm-linux-gnueabihf"))
;; (cross-gcc triplet
;; #:xbinutils (cross-binutils triplet)
;; #:libc (cross-libc triplet))))
;;
;;; We don't do that here because we'd be referring to bindings from (gnu
;;; packages gcc) from the top level, which doesn't play well with circular
;;; dependencies among modules.
--8<---------------cut here---------------end--------------->8---
But it seems hard to "visualize" the problem. Perhaps we need to write
a tool that analyzes and output the modules dependency graph to get more
insights.
It's unfortunate that we cannot define cross toolchain from the top
level -- is there no way in Scheme to make a procedure arguments lazily
evaluated as done by default in Haskell? It seems lazy evaluation could
help here.
Or failing that, could we combine the (gnu packages gcc) / (gnu packages
cross-base) / ? into a (gnu packages toolchain) monolith? Because exact
nature of the problem is still fuzzy to me, I'm not even sure if this
proposition makes sense / could work, but if the problem is gcc being
referenced at the top level from another module, it should, right?
--
Thanks,
Maxim
next prev parent reply other threads:[~2023-09-04 2:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-03 14:39 bug#65716: Importing a toolchain packages causes top-level dependency cycles Maxim Cournoyer
2023-09-03 18:55 ` Maxim Cournoyer
2023-09-03 19:56 ` bug#65718: " Ludovic Courtès
2023-09-03 20:14 ` bug#65716: " Maxim Cournoyer
2023-09-04 2:16 ` Maxim Cournoyer [this message]
2023-09-04 15:30 ` Maxim Cournoyer
2023-09-11 14:35 ` Maxim Cournoyer
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=875y4qu1gw.fsf_-_@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=65716@debbugs.gnu.org \
--cc=ludo@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 public inbox
https://git.savannah.gnu.org/cgit/guix.git
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).