Importing a toolchain packages causes top-level dependency cycles

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Maxim Cournoyer
Severity
normal
Merged with
M
M
Maxim Cournoyer wrote on 3 Sep 2023 16:39
(name . bug-guix)(address . bug-guix@gnu.org)
87sf7vuxr9.fsf@gmail.com
Hello,

Attempting to add a new (gnu packages ergodox) module, it fails with the
following error:

Toggle snippet (14 lines)
[ 11%] LOAD guix/store/deduplication.scm
[ 11%] LOAD guix/store/roots.scm
[ 11%] LOAD guix/config.scm
[ 11%] LOAD guix/tests.scm
ice-9/eval.scm:293:34: error: cross-gcc: unbound variable
hint: Did you forget `(use-modules (gnu packages cross-base))'?

make[2]: *** [Makefile:6997: make-core-go] Error 1
make[2]: Leaving directory '/home/maxim/src/guix'
make[1]: *** [Makefile:6083: all-recursive] Error 1
make[1]: Leaving directory '/home/maxim/src/guix'
make: *** [Makefile:4197: all] Error 2

Which looks like a circular dependency problem at the top level. Here's
the content of gnu/packages/ergodox.scm:

Toggle snippet (80 lines)
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages ergodox)
#:use-module (gnu packages avr)
#:use-module (guix build-system gnu)
#:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages))

(define (make-ergodox-firmware layout)
(let ((revision "0")
(commit "89b7e2bfdafb2a87e0248846d5c95cc5e9a27858"))
(package
(name (string-append "ergodox-firmware-" layout))
(version (git-version "1" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/benblazak/ergodox-firmware")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(base32
"1gy2332kdqk8bjzpcsripx10896rbvgl0ic7r344kmpiwdgm9480"))))
(build-system gnu-build-system)
(arguments
(list #:make-flags #~(list (string-append "LAYOUT=" layout))
#:phases #~(modify-phases %standard-phases
(add-after 'unpack 'chdir
(lambda _
(chdir "src")))
;; The Makefile-based build system lacks configure
;; and install targets.
(delete 'configure)
(replace 'install
(lambda _
(install-file "firmware.hex" #$output)
(install-file "firmware.eep" #$output))))))
(native-inputs (list avr-toolchain))
(home-page "http://www.ergodox.io")
(synopsis "Firmware for the ErgoDox keyboard")
(description (format #f "This package contains the original firmware for
the ErgoDox keyboard, built using the ~a firmware. It contains two files: the
@file{firmware.hex} and the @file{firmware.eep} files, which can be loaded to
a target using the @code{teensy-loader-cli} package." layout))
(license license:expat))))

(define-public ergodox-firmware-colemak-jc-mod
(make-ergodox-firmware "colemak-jc-mod"))

(define-public ergodox-firmware-colemak-symbol-mod
(make-ergodox-firmware "colemak-symbol-mod"))

(define-public ergodox-firmware-dvorak-kinesis-mod
(make-ergodox-firmware "dvorak-kinesis-mod"))

(define-public ergodox-firmware-qwerty-kinesis-mod
(make-ergodox-firmware "qwerty-kinesis-mod"))

(define-public ergodox-firmware-workman-p-kinesis-mod
(make-ergodox-firmware "workman-p-kinesis-mod"))

Commenting out the '(native-inputs (list avr-toolchain))' line resolves
the problem, but obviously breaks the package, which requires avr-gcc
and friends.

Another similar report was made in

--
Thanks,
Maxim
M
M
Maxim Cournoyer wrote on 3 Sep 2023 20:32
control message for bug #65718
(address . control@debbugs.gnu.org)
874jkbumy6.fsf@gmail.com
merge 65718 65716
quit
L
L
Ludovic Courtès wrote on 3 Sep 2023 21:56
Re: bug#65718: Importing a toolchain packages causes top-level dependency cycles
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
871qffdo9v.fsf_-_@gnu.org
Hello,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

Toggle quote (10 lines)
> 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?

Thanks,
Ludo’.
M
M
Maxim Cournoyer wrote on 4 Oct 2023 04:33
control message for bug #65718
(address . control@debbugs.gnu.org)
874jj75d6u.fsf@gmail.com
close 65718
quit
?
Your comment

This issue is archived.

To comment on this conversation send an email to 65718@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 65718
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch