Subject: Re: bug#65718: Importing a toolchain packages causes top-level dependency cycles

From: Maxim Cournoyer <[email-masked]>
Date: Mon, 04 Sep 2023 11:30:48 -0400

Hi Ludovic,

Ludovic Courtès <[email-masked]> writes:

> Hello,
>
> Maxim Cournoyer <[email-masked]> 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?

A very simple reproducer on current master:

--8<---------------cut here---------------start------------->8---
modified   gnu/packages/firmware.scm
@@ -43,6 +43,7 @@ (define-module (gnu packages firmware)
   #:use-module (gnu packages admin)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages assembly)
+  #:use-module (gnu packages avr)
   #:use-module (gnu packages backup)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
--8<---------------cut here---------------end--------------->8---

And then:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix build hello
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/srfi/srfi-71.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/rnrs/io/ports.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/ice-9/binary-ports.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/rnrs/base.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/ice-9/iconv.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/ice-9/rdelim.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/rnrs/enums.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/rnrs/conditions.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/rnrs/exceptions.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/rnrs/control.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/rnrs/records/procedural.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/rnrs/syntax-case.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/ice-9/optargs.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/system/base/pmatch.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/rnrs/records/syntactic.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/rnrs/hashtables.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/srfi/srfi-69.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/srfi/srfi-13.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/rnrs/lists.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/rnrs/files.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/srfi/srfi-8.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/ice-9/receive.scm
;;; loading /home/maxim/src/guix/guix/build/utils.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/srfi/srfi-34.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/srfi/srfi-60.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/ice-9/ftw.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/ice-9/vlist.scm
;;; loading /home/maxim/src/guix/guix/build/syscalls.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/system/foreign.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/system/base/target.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/srfi/srfi-19.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/srfi/srfi-6.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/ice-9/i18n.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/system/foreign-library.scm
;;; loading /home/maxim/src/guix/guix/combinators.scm
;;; loading /home/maxim/src/guix/guix/deprecation.scm
;;; loading /home/maxim/src/guix/guix/serialization.scm
;;; loading /home/maxim/src/guix/guix/monads.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/system/syntax.scm
;;; loading /home/maxim/src/guix/guix/records.scm
;;; loading /home/maxim/src/guix/guix/base16.scm
;;; loading /home/maxim/src/guix/guix/base32.scm
;;; loading /gnu/store/b914k2bjm3wixvd2kc9s03mzvfsif69c-profile/share/guile/site/3.0/gcrypt/hash.scm
;;; loading /gnu/store/b914k2bjm3wixvd2kc9s03mzvfsif69c-profile/share/guile/site/3.0/gcrypt/utils.scm
;;; loading /gnu/store/b914k2bjm3wixvd2kc9s03mzvfsif69c-profile/share/guile/site/3.0/gcrypt/internal.scm
;;; loading /gnu/store/b914k2bjm3wixvd2kc9s03mzvfsif69c-profile/share/guile/site/3.0/gcrypt/package-config.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/ice-9/atomic.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/language/tree-il/primitives.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/system/base/syntax.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/language/tree-il.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/srfi/srfi-16.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/ice-9/popen.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/web/uri.scm
;;; loading /gnu/store/b914k2bjm3wixvd2kc9s03mzvfsif69c-profile/share/guile/site/3.0/gnutls.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/system/vm/program.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/system/vm/debug.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/system/vm/elf.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/system/vm/dwarf.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/system/vm/loader.scm
;;; loading /home/maxim/src/guix/guix/derivations.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/ice-9/textual-ports.scm
;;; loading /home/maxim/src/guix/guix/sets.scm
;;; loading /home/maxim/src/guix/guix/packages.scm
;;; loading /home/maxim/src/guix/guix/grafts.scm
;;; loading /home/maxim/src/guix/guix/build-system.scm
;;; loading /home/maxim/src/guix/guix/search-paths.scm
;;; loading /home/maxim/src/guix/guix/profiles.scm
;;; loading /home/maxim/src/guix/guix/modules.scm
;;; loading /home/maxim/src/guix/guix/licenses.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/srfi/srfi-31.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/texinfo.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/sxml/simple.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/sxml/ssax/input-parse.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/sxml/ssax.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/sxml/transform.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/texinfo/plain-text.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/texinfo/string-utils.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/srfi/srfi-14.scm
;;; loading /home/maxim/src/guix/guix/scripts/build.scm
;;; loading /home/maxim/src/guix/guix/scripts.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/srfi/srfi-37.scm
;;; loading /home/maxim/src/guix/gnu/packages.scm
;;; loading /home/maxim/src/guix/guix/discovery.scm
;;; loading /home/maxim/src/guix/guix/describe.scm
;;; loading /gnu/store/4gvgcfdiz67wv04ihqfa8pqwzsb0qpv5-guile-3.0.9/share/guile/3.0/srfi/srfi-39.scm
;;; loading /home/maxim/src/guix/guix/platform.scm
;;; loading /home/maxim/src/guix/guix/status.scm
;;; loading /home/maxim/src/guix/guix/progress.scm
;;; loading /home/maxim/src/guix/guix/transformations.scm
;;; loading /home/maxim/src/guix/guix/download.scm
;;; loading /home/maxim/src/guix/gnu/packages/abduco.scm
;;; loading /home/maxim/src/guix/guix/build-system/gnu.scm
;;; loading /home/maxim/src/guix/gnu/packages/abiword.scm
;;; loading /home/maxim/src/guix/guix/build-system/glib-or-gtk.scm
;;; loading /home/maxim/src/guix/guix/build/glib-or-gtk-build-system.scm
;;; loading /home/maxim/src/guix/guix/build/gnu-build-system.scm
;;; loading /home/maxim/src/guix/guix/build/gremlin.scm
;;; loading /home/maxim/src/guix/guix/elf.scm
;;; loading /home/maxim/src/guix/gnu/packages/autotools.scm
;;; loading /home/maxim/src/guix/gnu/packages/perl.scm
;;; loading /home/maxim/src/guix/guix/git-download.scm
;;; loading /home/maxim/src/guix/guix/build-system/perl.scm
;;; loading /home/maxim/src/guix/gnu/packages/base.scm
;;; loading /home/maxim/src/guix/gnu/packages/acl.scm
;;; loading /home/maxim/src/guix/gnu/packages/attr.scm
;;; loading /home/maxim/src/guix/gnu/packages/gettext.scm
;;; loading /home/maxim/src/guix/guix/build-system/python.scm
;;; loading /home/maxim/src/guix/gnu/packages/bash.scm
;;; loading /home/maxim/src/guix/gnu/packages/bootstrap.scm
;;; loading /home/maxim/src/guix/guix/build-system/trivial.scm
;;; loading /home/maxim/src/guix/gnu/packages/compression.scm
;;; loading /home/maxim/src/guix/guix/build-system/ant.scm
;;; loading /home/maxim/src/guix/guix/build-system/cmake.scm
;;; loading /home/maxim/src/guix/guix/build-system/go.scm
;;; loading /home/maxim/src/guix/guix/build-system/meson.scm
;;; loading /home/maxim/src/guix/gnu/packages/assembly.scm
;;; loading /home/maxim/src/guix/gnu/packages/admin.scm
;;; loading /home/maxim/src/guix/guix/build-system/cargo.scm
;;; loading /home/maxim/src/guix/guix/build-system/emacs.scm
;;; loading /home/maxim/src/guix/guix/build/emacs-build-system.scm
;;; loading /home/maxim/src/guix/guix/build/emacs-utils.scm
;;; loading /home/maxim/src/guix/guix/build-system/pyproject.scm
;;; loading /home/maxim/src/guix/guix/build-system/qt.scm
;;; loading /home/maxim/src/guix/guix/build/qt-utils.scm
;;; loading /home/maxim/src/guix/guix/build-system/ruby.scm
;;; loading /home/maxim/src/guix/gnu/packages/algebra.scm
;;; loading /home/maxim/src/guix/gnu/packages/bison.scm
;;; loading /home/maxim/src/guix/gnu/packages/m4.scm
;;; loading /home/maxim/src/guix/gnu/packages/flex.scm
;;; loading /home/maxim/src/guix/gnu/packages/man.scm
;;; loading /home/maxim/src/guix/gnu/packages/dbm.scm
;;; loading /home/maxim/src/guix/gnu/packages/gawk.scm
;;; loading /home/maxim/src/guix/gnu/packages/gcc.scm
;;; loading /home/maxim/src/guix/gnu/packages/multiprecision.scm
;;; loading /home/maxim/src/guix/gnu/packages/texinfo.scm
;;; loading /home/maxim/src/guix/gnu/packages/ncurses.scm
;;; loading /home/maxim/src/guix/gnu/packages/pkg-config.scm
;;; loading /home/maxim/src/guix/gnu/packages/swig.scm
;;; loading /home/maxim/src/guix/gnu/packages/boost.scm
;;; loading /home/maxim/src/guix/gnu/packages/hurd.scm
;;; loading /home/maxim/src/guix/gnu/packages/cross-base.scm
;;; loading /home/maxim/src/guix/gnu/packages/linux.scm
;;; loading /home/maxim/src/guix/gnu/packages/apparmor.scm
;;; loading /home/maxim/src/guix/gnu/packages/dejagnu.scm
;;; loading /home/maxim/src/guix/gnu/packages/tcl.scm
;;; loading /home/maxim/src/guix/gnu/packages/image.scm
;;; loading /home/maxim/src/guix/gnu/packages/build-tools.scm
;;; loading /home/maxim/src/guix/guix/build-system/copy.scm
;;; loading /home/maxim/src/guix/gnu/packages/adns.scm
;;; loading /home/maxim/src/guix/gnu/packages/check.scm
;;; loading /home/maxim/src/guix/gnu/packages/cmake.scm
;;; loading /home/maxim/src/guix/gnu/packages/backup.scm
;;; loading /home/maxim/src/guix/gnu/packages/crypto.scm
;;; loading /home/maxim/src/guix/gnu/packages/aidc.scm
;;; loading /home/maxim/src/guix/gnu/packages/imagemagick.scm
;;; loading /home/maxim/src/guix/gnu/packages/fontutils.scm
;;; loading /home/maxim/src/guix/gnu/packages/datastructures.scm
;;; loading /home/maxim/src/guix/gnu/packages/docbook.scm
;;; loading /home/maxim/src/guix/gnu/packages/inkscape.scm
;;; loading /home/maxim/src/guix/gnu/packages/aspell.scm
;;; loading /home/maxim/src/guix/gnu/packages/bdw-gc.scm
;;; loading /home/maxim/src/guix/gnu/packages/glib.scm
;;; loading /home/maxim/src/guix/gnu/packages/cpp.scm
;;; loading /home/maxim/src/guix/guix/build-system/scons.scm
;;; loading /home/maxim/src/guix/gnu/packages/benchmark.scm
;;; loading /home/maxim/src/guix/gnu/packages/c.scm
;;; loading /home/maxim/src/guix/gnu/packages/guile.scm
;;; loading /home/maxim/src/guix/gnu/packages/gperf.scm
;;; loading /home/maxim/src/guix/gnu/packages/libffi.scm
;;; loading /home/maxim/src/guix/gnu/packages/python.scm
;;; loading /home/maxim/src/guix/gnu/packages/python-build.scm
;;; loading /home/maxim/src/guix/gnu/packages/readline.scm
;;; loading /home/maxim/src/guix/gnu/packages/sqlite.scm
;;; loading /home/maxim/src/guix/gnu/packages/tls.scm
;;; loading /home/maxim/src/guix/gnu/packages/curl.scm
;;; loading /home/maxim/src/guix/gnu/packages/golang.scm
;;; loading /home/maxim/src/guix/gnu/packages/fonts.scm
;;; loading /home/maxim/src/guix/guix/build-system/font.scm
;;; loading /home/maxim/src/guix/gnu/packages/gd.scm
;;; loading /home/maxim/src/guix/gnu/packages/gtk.scm
;;; loading /home/maxim/src/guix/guix/bzr-download.scm
;;; loading /home/maxim/src/guix/guix/build-system/waf.scm
;;; loading /home/maxim/src/guix/gnu/packages/audio.scm
;;; loading /home/maxim/src/guix/gnu/packages/avahi.scm
;;; loading /home/maxim/src/guix/gnu/packages/libdaemon.scm
;;; loading /home/maxim/src/guix/gnu/packages/libevent.scm
;;; loading /home/maxim/src/guix/gnu/packages/perl-check.scm
;;; loading /home/maxim/src/guix/gnu/packages/valgrind.scm
;;; loading /home/maxim/src/guix/gnu/packages/gdb.scm
;;; loading /home/maxim/src/guix/gnu/packages/xml.scm
;;; loading /home/maxim/src/guix/gnu/packages/documentation.scm
;;; loading /home/maxim/src/guix/gnu/packages/python-xyz.scm
;;; loading /home/maxim/src/guix/gnu/packages/astronomy.scm
;;; loading /home/maxim/src/guix/gnu/packages/databases.scm
;;; loading /home/maxim/src/guix/gnu/packages/cyrus-sasl.scm
;;; loading /home/maxim/src/guix/gnu/packages/kerberos.scm
;;; loading /home/maxim/src/guix/gnu/packages/gnupg.scm
;;; loading /home/maxim/src/guix/gnu/packages/emacs.scm
;;; loading /home/maxim/src/guix/gnu/packages/freedesktop.scm
;;; loading /home/maxim/src/guix/gnu/packages/cryptsetup.scm
;;; loading /home/maxim/src/guix/gnu/packages/password-utils.scm
;;; loading /home/maxim/src/guix/gnu/packages/authentication.scm
;;; loading /home/maxim/src/guix/gnu/packages/security-token.scm
;;; loading /home/maxim/src/guix/gnu/packages/crates-io.scm
;;; loading /home/maxim/src/guix/gnu/packages/crates-graphics.scm
;;; loading /home/maxim/src/guix/gnu/packages/gl.scm
;;; loading /home/maxim/src/guix/gnu/packages/elf.scm
;;; loading /home/maxim/src/guix/gnu/packages/sphinx.scm
;;; loading /home/maxim/src/guix/guix/hg-download.scm
;;; loading /home/maxim/src/guix/gnu/packages/graphviz.scm
;;; loading /home/maxim/src/guix/gnu/packages/gnome.scm
;;; loading /home/maxim/src/guix/gnu/packages/calendar.scm
;;; loading /home/maxim/src/guix/gnu/packages/dav.scm
;;; loading /home/maxim/src/guix/gnu/packages/python-check.scm
;;; loading /home/maxim/src/guix/gnu/packages/django.scm
;;; loading /home/maxim/src/guix/gnu/packages/finance.scm
;;; loading /home/maxim/src/guix/guix/build-system/haskell.scm
;;; loading /home/maxim/src/guix/gnu/packages/dns.scm
;;; loading /home/maxim/src/guix/gnu/packages/groff.scm
;;; loading /home/maxim/src/guix/gnu/packages/ruby.scm
;;; loading /home/maxim/src/guix/gnu/packages/rails.scm
;;; loading /home/maxim/src/guix/gnu/packages/node.scm
;;; loading /home/maxim/src/guix/guix/build-system/node.scm
;;; loading /home/maxim/src/guix/gnu/packages/icu4c.scm
;;; loading /home/maxim/src/guix/gnu/packages/cpio.scm
;;; loading /home/maxim/src/guix/gnu/packages/java.scm
;;; loading /home/maxim/src/guix/guix/svn-download.scm
;;; loading /home/maxim/src/guix/guix/build/svn.scm
;;; loading /home/maxim/src/guix/guix/build-system/maven.scm
;;; loading /home/maxim/src/guix/gnu/packages/certs.scm
;;; loading /home/maxim/src/guix/gnu/packages/cups.scm
;;; loading /home/maxim/src/guix/gnu/packages/ghostscript.scm
;;; loading /home/maxim/src/guix/gnu/packages/xorg.scm
;;; loading /home/maxim/src/guix/gnu/packages/anthy.scm
;;; loading /home/maxim/src/guix/gnu/packages/haskell-xyz.scm
;;; loading /home/maxim/src/guix/gnu/packages/haskell.scm
;;; loading /home/maxim/src/guix/gnu/packages/file.scm
;;; loading /home/maxim/src/guix/gnu/packages/lisp.scm
;;; loading /home/maxim/src/guix/gnu/packages/ed.scm
;;; loading /home/maxim/src/guix/gnu/packages/haskell-check.scm
;;; loading /home/maxim/src/guix/gnu/packages/haskell-crypto.scm
;;; loading /home/maxim/src/guix/gnu/packages/haskell-web.scm
;;; loading /home/maxim/src/guix/gnu/packages/libffcall.scm
;;; loading /home/maxim/src/guix/gnu/packages/libsigsegv.scm
;;; loading /home/maxim/src/guix/gnu/packages/llvm.scm
;;; loading /home/maxim/src/guix/gnu/packages/libedit.scm
;;; loading /home/maxim/src/guix/gnu/packages/lua.scm
;;; loading /home/maxim/src/guix/gnu/packages/pretty-print.scm
;;; loading /home/maxim/src/guix/gnu/packages/gv.scm
;;; loading /home/maxim/src/guix/gnu/packages/qt.scm
;;; loading /home/maxim/src/guix/gnu/packages/enchant.scm
;;; loading /home/maxim/src/guix/gnu/packages/hunspell.scm
;;; loading /home/maxim/src/guix/gnu/packages/textutils.scm
;;; loading /home/maxim/src/guix/gnu/packages/pcre.scm
;;; loading /home/maxim/src/guix/gnu/packages/python-web.scm
;;; loading /home/maxim/src/guix/gnu/packages/openstack.scm
;;; loading /home/maxim/src/guix/gnu/packages/monitoring.scm
;;; loading /home/maxim/src/guix/gnu/packages/mail.scm
;;; loading /home/maxim/src/guix/gnu/packages/docker.scm
;;; loading /home/maxim/src/guix/gnu/packages/networking.scm
;;; loading /home/maxim/src/guix/gnu/packages/autogen.scm
;;; loading /home/maxim/src/guix/gnu/packages/code.scm
;;; loading /home/maxim/src/guix/gnu/packages/perl-compression.scm
;;; loading /home/maxim/src/guix/gnu/packages/serialization.scm
;;; loading /home/maxim/src/guix/gnu/packages/python-science.scm
;;; loading /home/maxim/src/guix/gnu/packages/bioinformatics.scm
;;; loading /home/maxim/src/guix/guix/build-system/r.scm
;;; loading /home/maxim/src/guix/gnu/packages/bioconductor.scm
;;; loading /home/maxim/src/guix/gnu/packages/cran.scm
;;; loading /home/maxim/src/guix/gnu/packages/fribidi.scm
;;; loading /home/maxim/src/guix/gnu/packages/geo.scm
;;; loading /home/maxim/src/guix/gnu/packages/gps.scm
;;; loading /home/maxim/src/guix/gnu/packages/libusb.scm
;;; loading /home/maxim/src/guix/gnu/packages/mp3.scm
;;; loading /home/maxim/src/guix/gnu/packages/cdrom.scm
;;; loading /home/maxim/src/guix/gnu/packages/music.scm
;;; loading /home/maxim/src/guix/gnu/packages/apr.scm
;;; loading /home/maxim/src/guix/gnu/packages/digest.scm
;;; loading /home/maxim/src/guix/gnu/packages/fltk.scm
;;; loading /home/maxim/src/guix/gnu/packages/game-development.scm
;;; loading /home/maxim/src/guix/gnu/packages/gnunet.scm
;;; loading /home/maxim/src/guix/gnu/packages/guile-xyz.scm
;;; loading /home/maxim/src/guix/gnu/packages/disk.scm
;;; loading /home/maxim/src/guix/gnu/packages/file-systems.scm
;;; loading /home/maxim/src/guix/guix/build-system/linux-module.scm
;;; loading /home/maxim/src/guix/gnu/packages/jemalloc.scm
;;; loading /home/maxim/src/guix/gnu/packages/libunwind.scm
;;; loading /home/maxim/src/guix/gnu/packages/maths.scm
;;; loading /home/maxim/src/guix/guix/build-system/ocaml.scm
;;; loading /home/maxim/src/guix/gnu/packages/coq.scm
;;; loading /home/maxim/src/guix/gnu/packages/ocaml.scm
;;; loading /home/maxim/src/guix/gnu/packages/emacs-xyz.scm
;;; loading /home/maxim/src/guix/guix/cvs-download.scm
;;; loading /home/maxim/src/guix/gnu/packages/chez.scm
;;; loading /home/maxim/src/guix/gnu/packages/netpbm.scm
;;; loading /home/maxim/src/guix/gnu/packages/racket.scm
;;; loading /home/maxim/src/guix/gnu/packages/tex.scm
;;; loading /home/maxim/src/guix/guix/build-system/texlive.scm
;;; loading /home/maxim/src/guix/gnu/packages/libreoffice.scm
;;; loading /home/maxim/src/guix/gnu/packages/graphics.scm
;;; loading /home/maxim/src/guix/gnu/packages/gstreamer.scm
;;; loading /home/maxim/src/guix/gnu/packages/image-processing.scm
;;; loading /home/maxim/src/guix/gnu/packages/gimp.scm
;;; loading /home/maxim/src/guix/gnu/packages/patchutils.scm
;;; loading /home/maxim/src/guix/gnu/packages/less.scm
;;; loading /home/maxim/src/guix/gnu/packages/package-management.scm
;;; loading /home/maxim/src/guix/gnu/artwork.scm
;;; loading /home/maxim/src/guix/gnu/packages/debian.scm
;;; loading /home/maxim/src/guix/gnu/packages/wget.scm
;;; loading /home/maxim/src/guix/gnu/packages/libidn.scm
;;; loading /home/maxim/src/guix/gnu/packages/libunistring.scm
;;; loading /home/maxim/src/guix/gnu/packages/web.scm
;;; loading /home/maxim/src/guix/gnu/packages/bittorrent.scm
;;; loading /home/maxim/src/guix/gnu/packages/nettle.scm
;;; loading /home/maxim/src/guix/gnu/packages/python-crypto.scm
;;; loading /home/maxim/src/guix/gnu/packages/protobuf.scm
;;; loading /home/maxim/src/guix/gnu/packages/rpc.scm
;;; loading /home/maxim/src/guix/gnu/packages/regex.scm
;;; loading /home/maxim/src/guix/gnu/packages/python-compression.scm
;;; loading /home/maxim/src/guix/gnu/packages/rust.scm
;;; loading /home/maxim/src/guix/gnu/packages/ssh.scm
;;; loading /home/maxim/src/guix/gnu/packages/logging.scm
;;; loading /home/maxim/src/guix/gnu/packages/popt.scm
;;; loading /home/maxim/src/guix/gnu/packages/time.scm
;;; loading /home/maxim/src/guix/gnu/packages/terminals.scm
;;; loading /home/maxim/src/guix/gnu/packages/dlang.scm
;;; loading /home/maxim/src/guix/gnu/packages/ninja.scm
;;; loading /home/maxim/src/guix/gnu/packages/libcanberra.scm
;;; loading /home/maxim/src/guix/gnu/packages/pulseaudio.scm
;;; loading /home/maxim/src/guix/gnu/packages/xiph.scm
;;; loading /home/maxim/src/guix/gnu/packages/xdisorg.scm
;;; loading /home/maxim/src/guix/gnu/packages/kde-frameworks.scm
;;; loading /home/maxim/src/guix/gnu/packages/ebook.scm
;;; loading /home/maxim/src/guix/gnu/packages/javascript.scm
;;; loading /home/maxim/src/guix/gnu/packages/uglifyjs.scm
;;; loading /home/maxim/src/guix/gnu/packages/node-xyz.scm
;;; loading /home/maxim/src/guix/guix/build-system/minify.scm
;;; loading /home/maxim/src/guix/gnu/packages/language.scm
;;; loading /home/maxim/src/guix/gnu/packages/ibus.scm
;;; loading /home/maxim/src/guix/gnu/packages/iso-codes.scm
;;; loading /home/maxim/src/guix/gnu/packages/speech.scm
;;; loading /home/maxim/src/guix/gnu/packages/machine-learning.scm
;;; loading /home/maxim/src/guix/gnu/packages/jupyter.scm
;;; loading /home/maxim/src/guix/gnu/packages/rdf.scm
;;; loading /home/maxim/src/guix/gnu/packages/version-control.scm
;;; loading /home/maxim/src/guix/gnu/packages/cook.scm
;;; loading /home/maxim/src/guix/gnu/packages/nano.scm
;;; loading /home/maxim/src/guix/gnu/packages/php.scm
;;; loading /home/maxim/src/guix/gnu/packages/openldap.scm
;;; loading /home/maxim/src/guix/gnu/packages/nss.scm
;;; loading /home/maxim/src/guix/guix/build-system/mozilla.scm
;;; loading /home/maxim/src/guix/gnu/packages/rsync.scm
;;; loading /home/maxim/src/guix/gnu/packages/selinux.scm
;;; loading /home/maxim/src/guix/gnu/packages/sdl.scm
;;; loading /home/maxim/src/guix/gnu/packages/sync.scm
;;; loading /home/maxim/src/guix/gnu/packages/shells.scm
;;; loading /home/maxim/src/guix/gnu/packages/libbsd.scm
;;; loading /home/maxim/src/guix/gnu/packages/rust-apps.scm
;;; loading /home/maxim/src/guix/gnu/packages/kde.scm
;;; loading /home/maxim/src/guix/gnu/packages/djvu.scm
;;; loading /home/maxim/src/guix/gnu/packages/ocr.scm
;;; loading /home/maxim/src/guix/gnu/packages/pdf.scm
;;; loading /home/maxim/src/guix/gnu/packages/lesstif.scm
;;; loading /home/maxim/src/guix/gnu/packages/markup.scm
;;; loading /home/maxim/src/guix/gnu/packages/photo.scm
;;; loading /home/maxim/src/guix/gnu/packages/opencl.scm
;;; loading /home/maxim/src/guix/gnu/packages/mpi.scm
;;; loading /home/maxim/src/guix/gnu/packages/fabric-management.scm
;;; loading /home/maxim/src/guix/gnu/packages/pciutils.scm
;;; loading /home/maxim/src/guix/gnu/packages/parallel.scm
;;; loading /home/maxim/src/guix/gnu/packages/freeipmi.scm
;;; loading /home/maxim/src/guix/gnu/packages/video.scm
;;; loading /home/maxim/src/guix/gnu/packages/perl-web.scm
;;; loading /home/maxim/src/guix/gnu/packages/rdesktop.scm
;;; loading /home/maxim/src/guix/gnu/packages/re2c.scm
;;; loading /home/maxim/src/guix/gnu/packages/samba.scm
;;; loading /home/maxim/src/guix/gnu/packages/onc-rpc.scm
;;; loading /home/maxim/src/guix/gnu/packages/spice.scm
;;; loading /home/maxim/src/guix/gnu/packages/polkit.scm
;;; loading /home/maxim/src/guix/gnu/packages/virtualization.scm
;;; loading /home/maxim/src/guix/gnu/packages/bootloaders.scm
;;; note: source file /home/maxim/src/guix/gnu/packages/firmware.scm
;;;       newer than compiled /home/maxim/src/guix/gnu/packages/firmware.go
;;; note: source file /home/maxim/src/guix/gnu/packages/firmware.scm
;;;       newer than compiled /run/current-system/profile/lib/guile/3.0/site-ccache/gnu/packages/firmware.go
;;; loading /home/maxim/src/guix/gnu/packages/firmware.scm
;;; loading /home/maxim/src/guix/gnu/packages/firmware.scm
;;; loading /home/maxim/src/guix/gnu/packages/avr.scm
;;; loading /home/maxim/src/guix/gnu/packages/flashing-tools.scm
;;; loading /home/maxim/src/guix/gnu/packages/embedded.scm
;;; loading /home/maxim/src/guix/gnu/packages/libftdi.scm
;;; loading /home/maxim/src/guix/gnu/packages/messaging.scm
;;; loading /home/maxim/src/guix/gnu/packages/matrix.scm
;;; loading /home/maxim/src/guix/gnu/packages/mpd.scm
;;; loading /home/maxim/src/guix/gnu/packages/telephony.scm
;;; loading /home/maxim/src/guix/gnu/packages/linphone.scm
;;; loading /home/maxim/src/guix/gnu/packages/gnome-xyz.scm
;;; loading /home/maxim/src/guix/gnu/packages/upnp.scm
;;; loading /home/maxim/src/guix/gnu/packages/webkit.scm
;;; loading /home/maxim/src/guix/gnu/packages/games.scm
;;; loading /home/maxim/src/guix/gnu/packages/emulators.scm
;;; loading /home/maxim/src/guix/gnu/packages/vulkan.scm
;;; loading /home/maxim/src/guix/gnu/packages/wine.scm
;;; loading /home/maxim/src/guix/gnu/packages/mingw.scm
;;; loading /home/maxim/src/guix/gnu/packages/scanner.scm
;;; loading /home/maxim/src/guix/gnu/packages/wxwidgets.scm
;;; loading /home/maxim/src/guix/gnu/packages/gnu-doc.scm
;;; loading /home/maxim/src/guix/gnu/packages/gnuzilla.scm
;;; loading /home/maxim/src/guix/gnu/packages/gsasl.scm
;;; loading /home/maxim/src/guix/gnu/packages/squirrel.scm
;;; loading /home/maxim/src/guix/gnu/packages/tbb.scm
;;; loading /home/maxim/src/guix/gnu/packages/unicode.scm
error: cross-gcc: unbound variable
hint: Did you forget `(use-modules (gnu packages cross-base))'?
--8<---------------cut here---------------end--------------->8---

So it seems the problem of referencing packages at the top level lies
within (gnu packages avr), and I suspect even in (gnu packages
cross-base).  I've tried many things but without success so far :-/.

-- 
Thanks,
Maxim