unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: Martin <smartin@disroot.org>, 47908@debbugs.gnu.org
Subject: bug#47908: Cross building disk image for ARM Asus C201 fails
Date: Tue, 20 Apr 2021 21:23:17 +0200	[thread overview]
Message-ID: <5b3bf4b60ea3f5e4522981a0111d8743b8602e34.camel@telenet.be> (raw)
In-Reply-To: <96121f63-a710-0364-0408-b61907f8e5f5@disroot.org>

[-- Attachment #1: Type: text/plain, Size: 2627 bytes --]

Martin via Bug reports for GNU Guix schreef op di 20-04-2021 om 11:37 [+0000]:
> Hello,
> I'm trying to create a disk image for an Asus C201 chromebook using the 
> command 'guix system image test.scm' where test.scm based on 
> https://github.com/guix-mirror/guix/blob/master/gnu/system/examples/asus-c201.tmpl 
> but unfortunately this operation fails on my x86 dev machine (guix 53ed3e4):
> 
> ---
> [...]
> View build log at 
> '/var/log/guix/drvs/z2/diqxmpr8zkiyk2d5vma4flwvd3bzk6-vboot-utils-R63-10032.B.drv.bz2'.
> guix system: error: build of 
> `/gnu/store/z2diqxmpr8zkiyk2d5vma4flwvd3bzk6-vboot-utils-R63-10032.B.drv' 
> failed
> ---
> 
> the logs:
> [...]
> In unknown file:
>             2 (string-append #f "/bin/cmp")
> In ice-9/boot-9.scm:
>    1669:16  1 (raise-exception _ #:continuable? _)
>    1669:16  0 (raise-exception _ #:continuable? _)
> 
> ice-9/boot-9.scm:1669:16: In procedure raise-exception:
> In procedure string-append: Wrong type (expecting string): #f
> ---

> Any ideas how to fix it

Some issues I see in the definition of the "vboot-utils" package:

    (arguments
     `(#:make-flags (list "CC=gcc"
                          ;; On ARM, we must pass "HOST_ARCH=arm" so that the

The "CC=gcc" should be ,(string-append "CC=" (cc-for-target)), such that the
cross-compiler is used.  (cc-for-target) also works when not cross-compiling.

                    (lambda* (#:key inputs outputs #:allow-other-keys)
                      (let ((coreutils (assoc-ref inputs "coreutils"))
                            (diffutils (assoc-ref inputs "diffutils")))
                    [...]
                        (substitute* "tests/bitmaps/TestBmpBlock.py"
                          (("/usr/bin/cmp") (string-append diffutils "/bin/cmp")))

"diffutils" should be looked up in 'native-inputs', not 'inputs', as "cmp" is run
when building the package.  (And not when this package is actually used at run-time).

So that should be

                    (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
                      (let ((coreutils (assoc-ref inputs "coreutils"))
                            (diffutils (assoc-
ref (or native-inputs inputs) "diffutils")))
                    [...]
                        (substitute* "tests/bitmaps/TestBmpBlock.py"
                          (("/usr/bin/cmp") (string-append
diffutils "/bin/cmp")))

p.s.  I began replacing "CC=gcc" with ,(string-append "CC=" (cc-for-target)) where it seemed
necessary in the patch series at <https://issues.guix.gnu.org/47693>

Greetings,
Maxime.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

  reply	other threads:[~2021-04-20 19:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20 11:37 bug#47908: Cross building disk image for ARM Asus C201 fails Martin via Bug reports for GNU Guix
2021-04-20 19:23 ` Maxime Devos [this message]
2021-11-05  9:24 ` phodina via Bug reports for GNU Guix
2021-11-05  9:59   ` Maxime Devos
2021-11-05 18:17     ` phodina via Bug reports for GNU Guix

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=5b3bf4b60ea3f5e4522981a0111d8743b8602e34.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=47908@debbugs.gnu.org \
    --cc=smartin@disroot.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).