unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#47908: Cross building disk image for ARM Asus C201 fails
@ 2021-04-20 11:37 Martin via Bug reports for GNU Guix
  2021-04-20 19:23 ` Maxime Devos
  2021-11-05  9:24 ` phodina via Bug reports for GNU Guix
  0 siblings, 2 replies; 5+ messages in thread
From: Martin via Bug reports for GNU Guix @ 2021-04-20 11:37 UTC (permalink / raw)
  To: 47908

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):

---
  yaml-0.2.5.tar.gz  595KiB                                  4.0MiB/s 
00:00 [##################] 100.0%
  zstd-1.4.4.tar.xz  1.3MiB                                  2.9MiB/s 
00:00 [##################] 100.0%
building /gnu/store/ifnczywhsw1x5wijrv60myv309g7vqg0-libyaml-0.2.5.drv...
building 
/gnu/store/fi24bh8iqrwqby2224n602vd0x2gvz81-python-minimal-3.8.2.drv...
building 
/gnu/store/z2diqxmpr8zkiyk2d5vma4flwvd3bzk6-vboot-utils-R63-10032.B.drv...
- 'patch-hard-coded-paths' phasebuilder for 
`/gnu/store/z2diqxmpr8zkiyk2d5vma4flwvd3bzk6-vboot-utils-R63-10032.B.drv' 
failed with exit code 1
build of 
/gnu/store/z2diqxmpr8zkiyk2d5vma4flwvd3bzk6-vboot-utils-R63-10032.B.drv 
failed
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:
---
vboot-utils-R63-10032.B-checkout/vboot_host.pc.in
phase `unpack' succeeded after 1.1 seconds
starting phase `patch-hard-coded-paths'
Backtrace:
           16 (primitive-load "/gnu/store/3px9vwr51v82zhh7bzi8wcmiaw3…")
In ice-9/eval.scm:
    191:35 15 (_ #f)
In guix/build/gnu-build-system.scm:
     838:2 14 (gnu-build #:source _ #:outputs _ #:inputs _ #:phases . #)
In ice-9/boot-9.scm:
   1736:10 13 (with-exception-handler _ _ #:unwind? _ # _)
In srfi/srfi-1.scm:
    857:16 12 (every1 #<procedure 7ffff5f6d120 at guix/build/gnu-bui…> …)
In guix/build/gnu-build-system.scm:
    847:30 11 (_ _)
In ice-9/eval.scm:
     619:8 10 (_ #(#(#(#<directory (guile-user) 7ffff6bb9f00>) # #) …))
In ice-9/boot-9.scm:
   1736:10  9 (with-exception-handler _ _ #:unwind? _ # _)
In ice-9/ports.scm:
    445:17  8 (call-with-input-file _ _ #:binary _ #:encoding _ # _)
In guix/build/utils.scm:
    741:26  7 (_ _)
    767:26  6 (_ #<input: tests/bitmaps/TestBmpBlock.py 15> #<input-o…>)
In srfi/srfi-1.scm:
    460:18  5 (fold #<procedure 7ffff6a7c040 at guix/build/utils.scm…> …)
In ice-9/eval.scm:
    202:51  4 (_ #(#(#(#(#(#(#<directory (guile-user)…> …)) …) …) …) …))
     163:9  3 (_ #(#(#(#(#(#(#<directory (guile-user)…> …)) …) …) …) …))
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 or do you know some alternative approaches how 
to install GuixSD on Asus C201?

Thanks,
Martin




^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#47908: Cross building disk image for ARM Asus C201 fails
  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
  2021-11-05  9:24 ` phodina via Bug reports for GNU Guix
  1 sibling, 0 replies; 5+ messages in thread
From: Maxime Devos @ 2021-04-20 19:23 UTC (permalink / raw)
  To: Martin, 47908

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#47908: Cross building disk image for ARM Asus C201 fails
  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
@ 2021-11-05  9:24 ` phodina via Bug reports for GNU Guix
  2021-11-05  9:59   ` Maxime Devos
  1 sibling, 1 reply; 5+ messages in thread
From: phodina via Bug reports for GNU Guix @ 2021-11-05  9:24 UTC (permalink / raw)
  To: 47908@debbugs.gnu.org

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

Hi Martin & Maxime,

I've tested if the system image builds after merging patches for the
vboot-utils package.

$ guix system build -s armhf-linux test.scm

Unfortunately I don't own the ARM Asus C201 Chromebook so I can't test the live system.

Could you Martin test please? I used commit 7af3b822178782d6598865e1d6a780a756dd0cb3.

Petr

[-- Attachment #2: Type: text/html, Size: 595 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#47908: Cross building disk image for ARM Asus C201 fails
  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
  0 siblings, 1 reply; 5+ messages in thread
From: Maxime Devos @ 2021-11-05  9:59 UTC (permalink / raw)
  To: phodina, 47908@debbugs.gnu.org

phodina via Bug reports for GNU Guix schreef op vr 05-11-2021 om 09:24
[+0000]:
> Hi Martin & Maxime,
> 
> I've tested if the system image builds after merging patches for the
> vboot-utils package.
> 
> $ guix system build -s armhf-linux test.scm

That's an emulated build (with QEMU), not a cross-build.
To cross-build, something like

$ guix system build --target=arm-linux-gnueabihf test.scm

is necessary. Emulated builds function rather differently
from cross-builds (the former mostly looks like native compilation to
guix), so the former command isn't a good test.

Greetings,
Maxime


-- 
not hacking on guix for a while, only occassionally looking at IRC logs
and bug reports.  E-mails are unsigned until backup is located.






^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#47908: Cross building disk image for ARM Asus C201 fails
  2021-11-05  9:59   ` Maxime Devos
@ 2021-11-05 18:17     ` phodina via Bug reports for GNU Guix
  0 siblings, 0 replies; 5+ messages in thread
From: phodina via Bug reports for GNU Guix @ 2021-11-05 18:17 UTC (permalink / raw)
  To: Maxime Devos; +Cc: 47908@debbugs.gnu.org

Hi Maxime,

On Friday, November 5th, 2021 at 10:59 AM, Maxime Devos <maximedevos@telenet.be> wrote:

> phodina via Bug reports for GNU Guix schreef op vr 05-11-2021 om 09:24
>
> [+0000]:
>
> > Hi Martin & Maxime,
> >
> > I've tested if the system image builds after merging patches for the
> >
> > vboot-utils package.
> >
> > $ guix system build -s armhf-linux test.scm
>
> That's an emulated build (with QEMU), not a cross-build.
>
> To cross-build, something like
>
> $ guix system build --target=arm-linux-gnueabihf test.scm
>
> is necessary. Emulated builds function rather differently
>
> from cross-builds (the former mostly looks like native compilation to
>
> guix), so the former command isn't a good test.
>
> Greetings,
>
> Maxime
>

Thanks for highlighting the fact. I've intended to run the cross-compilation as you said not run "native" build in QEMU.

The command in full:

[env]$ ./pre-inst-env guix system build --target=arm-linux-gnueabihf gnu/system/examples/asus-c201.tmpl

Then again the build is successful but without the hardware I can't verify it boots successfully.

Petr




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-11-05 18:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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).