unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 65718@debbugs.gnu.org
Subject: bug#65718: Importing a toolchain packages causes top-level dependency cycles
Date: Sun, 03 Sep 2023 10:39:22 -0400	[thread overview]
Message-ID: <87sf7vuxr9.fsf@gmail.com> (raw)

Hello,

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

--8<---------------cut here---------------start------------->8---
[ 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
--8<---------------cut here---------------end--------------->8---

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

--8<---------------cut here---------------start------------->8---
;;; 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"))
--8<---------------cut here---------------end--------------->8---

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
<https://lists.gnu.org/archive/html/help-guix/2023-01/msg00013.html>.

-- 
Thanks,
Maxim




             reply	other threads:[~2023-09-03 18:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-03 14:39 Maxim Cournoyer [this message]
  -- strict thread matches above, loose matches on Subject: below --
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

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=87sf7vuxr9.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=65718@debbugs.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).