disk image installer for rock64 fails

  • Open
  • quality assurance status badge
Details
3 participants
  • Florian Hoertlehner
  • Maxime Devos
  • pelzflorian (Florian Pelz)
Owner
unassigned
Submitted by
Florian Hoertlehner
Severity
normal
F
F
Florian Hoertlehner wrote on 4 Dec 2021 01:03
(address . bug-guix@gnu.org)
CADXXfW=x0t3fd_2TTbLEvOZKEjabp6zji1jzL1CxUYrrJFAcvg@mail.gmail.com
guix system disk-image --system=aarch64-linux \ -e "(@ (gnu system install)
rock64-installation-os)"
fails with this error:

builder for
`/gnu/store/399pb3xc4pcxkclfcp1fsbxx8jy1vifq-openconnect-8.10.drv' failed
with exit code 1
Attachment: file
P
P
pelzflorian (Florian Pelz) wrote on 4 Dec 2021 03:41
(name . Florian Hoertlehner)(address . hoertlehner@gmail.com)(address . 52267@debbugs.gnu.org)
20211204024144.qd3vir7ha3ait6x5@pelzflorian.localdomain
On Sat, Dec 04, 2021 at 01:03:13AM +0100, Florian Hoertlehner wrote:
Toggle quote (8 lines)
> guix system disk-image --system=aarch64-linux \ -e "(@ (gnu system install)
> rock64-installation-os)"
> fails with this error:
>
> builder for
> `/gnu/store/399pb3xc4pcxkclfcp1fsbxx8jy1vifq-openconnect-8.10.drv' failed
> with exit code 1

Instead of --system=aarch64-linux maybe --target=aarch64-linux-gnu works?

I assume you run the command on an x86_64-linux?

I will try tomorrow.

(I’m writing this using GNU Guix System on a rock64 …)

Regards,
Florian
P
P
pelzflorian (Florian Pelz) wrote on 4 Dec 2021 12:39
(name . Florian Hoertlehner)(address . hoertlehner@gmail.com)(address . 52267@debbugs.gnu.org)
20211204113928.mysxp2572wjakvme@pelzflorian.localdomain
On Sat, Dec 04, 2021 at 03:41:44AM +0100, pelzflorian (Florian Pelz) wrote:
Toggle quote (11 lines)
> On Sat, Dec 04, 2021 at 01:03:13AM +0100, Florian Hoertlehner wrote:
> > guix system disk-image --system=aarch64-linux \ -e "(@ (gnu system install)
> > rock64-installation-os)"
> > fails with this error:
> >
> > builder for
> > `/gnu/store/399pb3xc4pcxkclfcp1fsbxx8jy1vifq-openconnect-8.10.drv' failed
> > with exit code 1
>
> Instead of --system=aarch64-linux maybe --target=aarch64-linux-gnu works?

I only tried on an x86_64-linux `guix build --system=aarch64-linux
openconnect`.

It failed until I added the

(service qemu-binfmt-service-type
(qemu-binfmt-configuration
(platforms (lookup-qemu-platforms "arm" "aarch64"))))

from the manual.

The version with --target worked and building is faster, although
maybe building the whole image might still fail, which would be a bug.

Can this issue be closed?

Regards,
Florian
F
F
Florian Hoertlehner wrote on 4 Dec 2021 18:02
Re: bug#52267: Acknowledgement (disk image installer for rock64 fails)
(address . 52267@debbugs.gnu.org)
CADXXfWn_3r_kCviMoCKUkaOOPBb+PNuzToZztXHfevFNOXBLrw@mail.gmail.com
Can you please tell me exactly what you have entered?
I am not sure where you enter he services specification.

Should I try with the --gnu ?

Best Regards,
Florian


On Sat, Dec 4, 2021 at 1:04 AM GNU bug Tracking System <help-debbugs@gnu.org>
wrote:

Toggle quote (22 lines)
> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
> bug-guix@gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 52267@debbugs.gnu.org.
>
> Please do not send mail to help-debbugs@gnu.org unless you wish
> to report a problem with the Bug-tracking system.
>
> --
> 52267: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=52267
> GNU Bug Tracking System
> Contact help-debbugs@gnu.org with problems
>
Attachment: file
P
P
pelzflorian (Florian Pelz) wrote on 4 Dec 2021 22:02
Re: bug#52267: disk image installer for rock64 fails
(name . Florian Hoertlehner)(address . hoertlehner@gmail.com)(address . 52267@debbugs.gnu.org)
20211204210251.okkpd5a3npddhjo7@pelzflorian.localdomain
On Sat, Dec 04, 2021 at 12:39:28PM +0100, pelzflorian (Florian Pelz) wrote:
Toggle quote (11 lines)
> It failed until I added the
>
> (service qemu-binfmt-service-type
> (qemu-binfmt-configuration
> (platforms (lookup-qemu-platforms "arm" "aarch64"))))
>
> from the manual.
>
> The version with --target worked and building is faster, although
> maybe building the whole image might still fail, which would be a bug.

My suggestion that you change your command to use --target rather than
--system fails. Sorry it was the wrong suggestion, because I had not
tried before answering. (On master it fails to cross-compile
meson-based packages; on core-updates-frozen it fails to cross-compile
dosfstools.)

Anyway, your previous command with --system was correct, but if you
are on GNU Guix System, you need to add the qemu-binfmt-service-type.

Toggle quote (4 lines)
> (service qemu-binfmt-service-type
> (qemu-binfmt-configuration
> (platforms (lookup-qemu-platforms "arm" "aarch64"))))

You wrote to me in private and talk about rockpro. If you have a
rockpro64 and not a rock64, I am not sure if the command works; at
least you would need to use rockpro64-installation-os instead of
rock64-installation-os.

But if your PC uses Guix on a foreign distribution such as Debian, you
need to add qemu binfmt support in another way. For Debian it seems
you need to use aarch64 instead of armhf, and I have not tried. It
depends on the distro.

Alternatively, you can install another distro on the rock64�/
rockpro64 and then install GNU Guix on it without a Guix System image.

If you know what you are doing, you can install GNU Guix System onto
an SSD connected to the rock64 via USB2 by the guix system init
command; this is what I did, but I have no automatic setup for the
bootloader. The rock64 officially only boots from the SD card, I
think, and I always copy the relevant store files to the SD card
manually.

Regards,
Florian
F
F
Florian Hoertlehner wrote on 8 Dec 2021 14:56
Re: bug#52267: Acknowledgement (disk image installer for rock64 fails)
(address . 52267@debbugs.gnu.org)
CADXXfWnuxGOao2C2B5XDU0JouczZAfyRir2ja=MQuEPXY7rqww@mail.gmail.com
Installer build fails with cross compilation due to meson build error.

I have interrupted the installer build with qemu after 2 days, because it
still has nkt compelted the build.

On Sat, Dec 4, 2021, 6:02 PM Florian Hoertlehner <hoertlehner@gmail.com>
wrote:

Toggle quote (35 lines)
> Can you please tell me exactly what you have entered?
> I am not sure where you enter he services specification.
>
> Should I try with the --gnu ?
>
> Best Regards,
> Florian
>
>
> On Sat, Dec 4, 2021 at 1:04 AM GNU bug Tracking System <
> help-debbugs@gnu.org> wrote:
>
>> Thank you for filing a new bug report with debbugs.gnu.org.
>>
>> This is an automatically generated reply to let you know your message
>> has been received.
>>
>> Your message is being forwarded to the package maintainers and other
>> interested parties for their attention; they will reply in due course.
>>
>> Your message has been sent to the package maintainer(s):
>> bug-guix@gnu.org
>>
>> If you wish to submit further information on this problem, please
>> send it to 52267@debbugs.gnu.org.
>>
>> Please do not send mail to help-debbugs@gnu.org unless you wish
>> to report a problem with the Bug-tracking system.
>>
>> --
>> 52267: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=52267
>> GNU Bug Tracking System
>> Contact help-debbugs@gnu.org with problems
>>
>
Attachment: file
M
M
Maxime Devos wrote on 8 Dec 2021 18:27
8c94593193aa913607bdd4d0b2eb976e3041b17b.camel@telenet.be
Florian Hoertlehner schreef op wo 08-12-2021 om 14:56 [+0100]:
Toggle quote (3 lines)
> Installer build fails with cross compilation due to meson build
> error.

Do you mean an error message like the following:

guix build: error: gnu/packages/glib.scm:425:2: glib@2.62.6: build
system `meson' does not support cross builds

If so, you could try on 'core-updates-frozen' instead of 'master',
because on 'core-updates-frozen' meson supports cross-compilation (from
what I've heard, core-updates-frozen is in a relatively decent though
not perfect state).

Greetings,
Maxime
F
F
Florian Hoertlehner wrote on 8 Dec 2021 19:26
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 52267@debbugs.gnu.org)
CADXXfWkw+q8TuYZp1Cnujq+7QFMQkLQScYw-vKAejUqzMr8Epg@mail.gmail.com
Do you know how I would do that? Do ai have to change th guix channel
Definition for that? Would this still allow me to roll back in case
something fails terribly? Or could it be that core-updates-frozen will
crash my Main machine all together? Man's thanks!

On Wed, Dec 8, 2021, 18:27 Maxime Devos <maximedevos@telenet.be> wrote:

Toggle quote (18 lines)
> Florian Hoertlehner schreef op wo 08-12-2021 om 14:56 [+0100]:
> > Installer build fails with cross compilation due to meson build
> > error.
>
> Do you mean an error message like the following:
>
> guix build: error: gnu/packages/glib.scm:425:2: glib@2.62.6: build
> system `meson' does not support cross builds
>
> If so, you could try on 'core-updates-frozen' instead of 'master',
> because on 'core-updates-frozen' meson supports cross-compilation (from
> what I've heard, core-updates-frozen is in a relatively decent though
> not perfect state).
>
> Greetings,
> Maxime
>
>
Attachment: file
M
M
Maxime Devos wrote on 8 Dec 2021 20:20
(name . Florian Hoertlehner)(address . hoertlehner@gmail.com)(address . 52267@debbugs.gnu.org)
3e0d6f2d8879ca8f83ad3d9cc7e8c88c3e8639fc.camel@telenet.be
Florian Hoertlehner schreef op wo 08-12-2021 om 19:26 [+0100]:
Toggle quote (5 lines)
> Do you know how I would do that? Do ai have to change th guix channel
> Definition for that? Would this still allow me to roll back in case
> something fails terribly? Or could it be that core-updates-frozen
> will crash my Main machine all together? Man's thanks!

The least risky method I know of, is to pull guix into a _separate_
profile ,
and use that guix to build the installation image:

$ guix pull --profile=./guix-cuf --branch=core-updates-frozen
[wait for the pull to finish]
[alternatively, you could use 'guix time-machine']
$ ./guix-cuf/bin/guix system disk-image --target=aarch64-linux-gnu -e
'(@ (gnu system install) rock64-installation-os)'

That way, the core-updates-frozen guix will only be used for building
the installation image, and nothing else.

I don't see how that could crash your main machine, though I don't know
if it will work on your rock64.

Greetings,
Maxime
F
F
Florian Hoertlehner wrote on 8 Dec 2021 20:42
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 52267@debbugs.gnu.org)
CADXXfWni23nmmXjZfLjraRxO2LE-D21QTfc7fjX5Q84o6s1dPg@mail.gmail.com
Thanska lot Maxime! This is really simple. Guix is an amazing tool!

On Wed, Dec 8, 2021, 8:20 PM Maxime Devos <maximedevos@telenet.be> wrote:

Toggle quote (26 lines)
> Florian Hoertlehner schreef op wo 08-12-2021 om 19:26 [+0100]:
> > Do you know how I would do that? Do ai have to change th guix channel
> > Definition for that? Would this still allow me to roll back in case
> > something fails terribly? Or could it be that core-updates-frozen
> > will crash my Main machine all together? Man's thanks!
>
> The least risky method I know of, is to pull guix into a _separate_
> profile ,
> and use that guix to build the installation image:
>
> $ guix pull --profile=./guix-cuf --branch=core-updates-frozen
> [wait for the pull to finish]
> [alternatively, you could use 'guix time-machine']
> $ ./guix-cuf/bin/guix system disk-image --target=aarch64-linux-gnu -e
> '(@ (gnu system install) rock64-installation-os)'
>
> That way, the core-updates-frozen guix will only be used for building
> the installation image, and nothing else.
>
> I don't see how that could crash your main machine, though I don't know
> if it will work on your rock64.
>
> Greetings,
> Maxime
>
>
Attachment: file
M
M
Maxime Devos wrote on 9 Dec 2021 08:45
(name . Florian Hoertlehner)(address . hoertlehner@gmail.com)(address . 52267@debbugs.gnu.org)
81e8d85afc6e1bf045983864f7a277b4c2da59af.camel@telenet.be
I forgot to add debbugs in CC, resending ...

Maxime Devos schreef op do 09-12-2021 om 07:41 [+0100]:
Toggle quote (40 lines)
> Florian Hoertlehner schreef op do 09-12-2021 om 00:04 [+0100]:
> >
> > installer build on core-updates-frozen build with cross-
> > compilaition
> > fails with:
> > -builder for `/gnu/store/49ir2x9wypyrv9p1gvd54pzj4frap2jg-
> > dosfstools-
> > 4.2.drv' failed with exit code 1
>
> Seems like there are two bugs in the dosfstools package definition
> currently preventing cross-compilation:
>
> This line  ...
> > #:make-flags (list (string-append "PREFIX=" %output) "CC=gcc")))
>
> ... needs to be replaced by ...
>
> > #:make-flags ,#~(list (string-append "PREFIX=" #$output) (string-
> > append "CC=" ,(cc-for-target)))
>
> in the package definition of dosfstools.
>
> To test, you can try
>
> ./guix-cuf/bin/guix system disk-image --target=aarch64-linux-gnu -e
> '(begin (set! (@ (gnu packages disk) dosfstools) ((@ (guix packages)
> package) (inherit (@ (gnu packages disk) dosfstools)) (arguments
> `(#:make-flags ,#~(list (string-append "PREFIX=" #$output) (string-
> append "CC=" ,(cc-for-target))) #:configure-flags (list "--enable-
> compat-symlinks"))))) (@ (gnu system install) rock64-installation-
> os))'
>
> or apply the change to a local git checkout of guix (see ‘17.1
> Building from Git’ in the manual’) and test from there.
>
> After the aarch64-linux-gnu cross-compiler has finished building,
> I'll test that change.
>
> Greetings,
> Maxime
M
M
Maxime Devos wrote on 9 Dec 2021 08:49
(name . Florian Hoertlehner)(address . hoertlehner@gmail.com)(address . 52267@debbugs.gnu.org)
03ea59a06605b4451293808051afa3e1cc3f4882.camel@telenet.be
Maxime Devos schreef op do 09-12-2021 om 07:45 [+0000]:
Toggle quote (12 lines)
> > [...]
> > Seems like there are two bugs in the dosfstools package definition
> > currently preventing cross-compilation:
> >
> > This line  ...
> > > #:make-flags (list (string-append "PREFIX=" %output) "CC=gcc")))
> >
> > ... needs to be replaced by ...
> >
> > > #:make-flags ,#~(list (string-append "PREFIX=" #$output) (string-
> > > append "CC=" ,(cc-for-target)))

Correction, it must be

Toggle quote (2 lines)
> #:make-flags ,#~(list (string-append "PREFIX=" #$output) (string-append "CC=" #$(cc-for-target))).

(#$(cc-for-target) instead of ,(cc-for-target)).

That makes the cross-build

./guix-cuf/bin/guix build --target=aarch64-linux-gnu -e '((@ (guix packages) package) (inherit (@ (gnu packages disk) dosfstools)) (arguments `(#:make-flags ,#~(list (string-append "PREFIX=" #$output) (string-append "CC=" #$((@ (guix utils) cc-for-target)))) #:configure-flags (list "--enable-compat-symlinks"))))'

succeed for me, though I don't have an aarch64 to test it on.
The output from 'guix gc --references' only show a glibc-cross-... and gcc-cross-...-lib,
so presumably the cross-compiled package will work.

Greetings,
Maxime
?