"genimage fails to build on arm architecture"

  • Open
  • quality assurance status badge
Details
4 participants
  • Denis 'GNUtoo' Carikli
  • Andreas Enge
  • Timotej Lazar
  • Vincent Legoll
Owner
unassigned
Submitted by
Andreas Enge
Severity
normal
A
A
Andreas Enge wrote on 8 Sep 2020 13:19
fdisk fails to build on armhf
(address . bug-guix@gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20200908111939.GA10965@jurong
Hello,

I am trying to build an armhf disk image on an aarch64 machine.

The build fails in this order:
genimage requires fdisk
fdisk requires guile-1.8.8 (!)
guile-1.8.8 fails two of its 16 tests:
ERROR: Value out of range -9223372036854775808 to 9223372036854775807: -9223372036854775808
FAIL: test-num2integral
fail: scm_is_signed_integer ((- (expt 2 63)), -9223372036854775808, 9223372036854775807) == 1
FAIL: test-conversion

This might be due to trying to "pseudo-cross-compile" from an aarch64 machine.
Independently, the last fdisk release dates from 2011, and relying on
guile-1.8.8 is not sustainable.

Can we phase out fdisk in Guix? Replace it by parted? Something else?
Actually genimage is the only package depending on fdisk, so if anything,
we could maybe drop this dependency, marked as
(native-inputs
...
("fdisk" ,fdisk) ; for the tests

What do you think?

Andreas
A
A
Andreas Enge wrote on 8 Sep 2020 14:02
(address . 43274@debbugs.gnu.org)
20200908120226.GA14984@jurong
The same two tests also fail on an armhf machine.

Andreas
A
A
Andreas Enge wrote on 8 Sep 2020 15:12
(address . 43274@debbugs.gnu.org)
20200908131203.GA19681@jurong
Here is what happens when I drop fdisk from native-inputs of genimage:

starting phase `check'
make --no-print-directory check-TESTS
PASS: test/basic-images.test 1 - cpio
SKIP: test/basic-images.test 2 # SKIP cramfs (missing mkcramfs)
...
PASS: test/basic-images.test 20 - fit
============================================================================
Testsuite summary for genimage 11
============================================================================
# TOTAL: 20
# PASS: 19
# SKIP: 1
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0

So there does not even seem to be a test that relies on fdisk.

I would suggest to drop fdisk from this package (and getting closer to
dropping guile@1.8 as well).

Andreas
A
A
Andreas Enge wrote on 8 Sep 2020 17:47
(address . 43274@debbugs.gnu.org)
20200908154753.GA28320@jurong
On Tue, Sep 08, 2020 at 03:12:03PM +0200, Andreas Enge wrote:
Toggle quote (2 lines)
> So there does not even seem to be a test that relies on fdisk.

Looking at the tests, they do call "fdisk" and "sfdisk", but these come
from the util-linux package. The fdisk package only provides "gnufdisk",
which does not seem to be used at all.

Toggle quote (3 lines)
> I would suggest to drop fdisk from this package (and getting closer to
> dropping guile@1.8 as well).

The package without fdisk fails on aarch64 (where it also failed previously)
and on armhf (where previously its dependency fdisk failed). So I will push
a commit that drops fdisk.

The next step would be to check newer releases (12 and 13) of genimage.
Has it actually ever been built on the arm architecture?

Also, is there any opposition to then drop the fdisk package from the
distribution?

Andreas
A
A
Andreas Enge wrote on 8 Sep 2020 18:24
(address . 43274@debbugs.gnu.org)
20200908162421.GA10312@jurong
On Tue, Sep 08, 2020 at 05:47:53PM +0200, Andreas Enge wrote:
Toggle quote (3 lines)
> The next step would be to check newer releases (12 and 13) of genimage.
> Has it actually ever been built on the arm architecture?

I tried 12 and 13, but already on x86_64 the test
FAIL: test/basic-images.test 7 - mke2fs
fails.

If someone with more experience with the package could have a look, that
would be nice.

Andreas
A
A
Andreas Enge wrote on 8 Sep 2020 18:26
Retitle
(address . control@debbugs.gnu.org)
20200908162657.GB10312@jurong
retitle 43274 "genimage fails to build on arm architecture"
thanks
T
T
Timotej Lazar wrote on 8 Sep 2020 19:50
Re: bug#43274: fdisk fails to build on armhf
(address . 43274@debbugs.gnu.org)(name . Andreas Enge)(address . andreas@enge.fr)
87mu202m4d.fsf@araneo.si
Hi,

Andreas Enge <andreas@enge.fr> [2020-09-08 18:24:21+0200]:
Toggle quote (3 lines)
>> The next step would be to check newer releases (12 and 13) of genimage.
>> Has it actually ever been built on the arm architecture?

genimage tests fail on arm64 due to differently signed char. The fix¹
is in upstream master but has not been released yet. Maybe we can add
it to the current Guix package until then?

A
A
Andreas Enge wrote on 8 Sep 2020 23:00
(name . Timotej Lazar)(address . timotej.lazar@araneo.si)(address . 43274@debbugs.gnu.org)
20200908210056.GA8936@jurong
Hello Timotej,

On Tue, Sep 08, 2020 at 07:50:58PM +0200, Timotej Lazar wrote:
Toggle quote (5 lines)
> genimage tests fail on arm64 due to differently signed char. The fixᅵ
> is in upstream master but has not been released yet. Maybe we can add
> it to the current Guix package until then?
> ᅵ https://github.com/pengutronix/genimage/commit/f4524ddc

great, thanks a lot! I applied and pushed this patch, and dropped fdisk
from the inputs. I am happy to report that genimage now builds on all
our four architectures, instead of just x86_64.

So, do we drop fdisk, which now is a leaf package?

Also, I tried updating genimage to version 12, but there is still a test
failure even on x86_64:
FAIL: test/basic-images.test 7 - mke2fs
Here is the diff of the test:
--- /tmp/guix-build-genimage-12.drv-0/genimage-12-checkout/test/mke2fs.dump 2020-09-08 20:57:40.650216225 +0000
+++ dump 2020-09-08 20:57:47.962216531 +0000
@@ -11,7 +11,7 @@
Inode count: 8192
Block count: 32768
Reserved block count: 1638
-Free blocks: 27592
+Free blocks: 27590
Free inodes: 8141
First block: 1
Block size: 1024
@@ -29,7 +29,7 @@
Maximum mount count: -1
Last checked: Sat Jan 1 00:00:00 2000
Check interval: 0 (<none>)
-Lifetime writes: 123 kB
+Lifetime writes: 125 kB
Reserved blocks uid: 0 (user unknown)
Reserved blocks gid: 0 (group unknown)
First inode: 11
@@ -47,13 +47,13 @@
Journal start: 0


-Group 0: (Blocks 1-8192) csum 0x62cb [ITABLE_ZEROED]
+Group 0: (Blocks 1-8192) csum 0xe083 [ITABLE_ZEROED]
Primary superblock at 1, Group descriptors at 2-2
++ func_check
- Block bitmap at 3 (+2), csum 0xb4967804
+ Block bitmap at 3 (+2), csum 0x0fddd371
Inode bitmap at 7 (+6), csum 0xb1052088
Inode table at 11-266 (+10)
- 7117 free blocks, 1997 free inodes, 18 directories, 1997 unused inodes
- Free blocks: 1076-8192
+ 7115 free blocks, 1997 free inodes, 18 directories, 1997 unused inodes
+ Free blocks: 1078-8192
Free inodes: 52-2048
++ local ret=1
Group 1: (Blocks 8193-16384) csum 0x7d4b [INODE_UNINIT, BLOCK_UNINIT, ITABLE_ZEROED]
++ set +x
Failed to execute 'check_ext'!
Backup superblock at 8193, Group descriptors at 8194-8194
not ok 7 - mke2fs
FAIL: test/basic-images.test 7 - mke2fs


Andreas
D
D
Denis 'GNUtoo' Carikli wrote on 14 Dec 2020 20:03
Guile: test-num2integral and scm_is_signed_integer test failing.
20201214200328.671ebc51@primarylaptop.localdomain
Hi,

Guile tests (also) fails on my setup.

I use Parabola i686 with a 64bit kernel( 5.7.2-gnu-1-64), and I've Guix
i686 installed[1].

When installing a package (gnurobots) with Guix, Guix tried to build
guile-1.8.8, and the compilation ends up with:
Toggle quote (27 lines)
> libtool: link: gcc -I../../test-suite/standalone -I../.. -I../..
> -pthread -g -O2 -Wall -Wmissing-prototypes -pthread -o
> .libs/test-scm-with-guile test_scm_with_guile-test-scm-with-guile.o
> ../../libguile/.libs/libguile.so -lgmp -lcrypt -lm -lltdl -pthread
> -Wl,-rpath
> -Wl,/gnu/store/j6mnhk6iiy77m1ial0ffgjz2zwdc6m4z-guile-1.8.8/lib
> make[4]: Leaving directory
> '/tmp/guix-build-guile-1.8.8.drv-0/guile-1.8.8/test-suite/standalone'
> make check-TESTS make[4]: Entering directory
> '/tmp/guix-build-guile-1.8.8.drv-0/guile-1.8.8/test-suite/standalone'
> PASS: test-system-cmds PASS: test-require-extension PASS:
> test-bad-identifiers ERROR: Value out of range -9223372036854775808
> to 9223372036854775807: -9223372036854775808 FAIL: test-num2integral
> PASS: test-round PASS: test-gh PASS: test-asmobs PASS: test-list
> PASS: test-unwind fail: scm_is_signed_integer ((- (expt 2 63)),
> -9223372036854775808, 9223372036854775807) == 1 FAIL: test-conversion
> PASS: test-fast-slot-ref
> PASS: test-use-srfi
> PASS: test-scm-c-read
> PASS: test-scm-take-locale-symbol
> PASS: test-with-guile-module
> PASS: test-scm-with-guile
> ==================================
> 2 of 16 tests failed
> Please report to bug-guile gnu.org
> ==================================
> make[4]: *** [Makefile:797: check-TESTS] Error 1
[...]

As bugreport says to bugreport to bug-guile gnu.org, and that there
is already an existing bug in Guix about it (for armhf), I've added
both in To.

I've also attached the full build log.

References:
-----------
[1] I've an x86_64 CPU but I kept my old Parabola rootfs
around as it had too much configuration, and software in /usr/local.
As I want to be able to chroot in x86_64 rootfs I need an x86_64
kernel. So I added one to Parabola and I use that.

Denis.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAl/XtwAACgkQX138wUF3
4mM/sw/+Let+utk65wqcNDC94Rowvnd6Q3ZXWNtZ10E3D9pa1O2M8dL2mFq+s8lD
Dydpe31GyAoDRLCvicOmvt+f52zHzkQLHEflBmrutOsuBdvIRC56Lu2kztnY5S+D
UP1wzO3t6bbkzfY4sKA6pp5A3KbBbhwOLjFmxRmSDcoXR3E/40U9Ogw9DmPXBEzm
1Sc6k0GYWQa4tZAiPH7exWKnxeO+2wg0mzsoxh1NRclpA3U+6ZVfsCzInoH0hPT5
2bd3waotNsC6FWF8/1K29SIik7JoisPySP+N0kt35GugU4Loied2OoTBhT2Hi6HD
zWfzG4JhgWN20uXnZCsgMvUnLL8dEYTfT+ddZxlJf1yJURl1i9RzqVvtyMTn2JsB
NgK5VpWZ48xDOjS4g7pp5xO+eJ2M/cgEa1401e3ii+lKvYwVnORkC4TZvg+pOtAF
CzKdsUzvqtXHdf4cqzk3doM2KcUPw6mpt4g5ZZ9Kr78ylmc5oehhbp7UsQfA5PMU
y+/euwNWJ4oqNLWevtbhwRiEX5C3qbWEwqA8udgI6bapq4Y8fzR91JSW1UMTMYG7
2Qntrnh5hsjL1nAOlVJkYGXZjUEwrodtLNoJz2wnTYHYV5aSZuF/UmLjcPw1HBIz
F9gWmo9DJTLOnp8ZTB9Lr33IvEiTjAwbMggAIQXVxcJDqh7MRM8=
=aQU6
-----END PGP SIGNATURE-----


V
V
Vincent Legoll wrote on 14 Jan 2021 13:33
latest genimage test suite
CAEwRq=re-CaG50Npz_pyYFv-yvQ3SJJRzQ1t2-hkMrFFm+tuVQ@mail.gmail.com
Those two issues are linked...

The mke2fs test failure happens on
all versions after 11: 12, 13 & even the recent 14.

I tried the coreutils-with-xattrs that was suggested a while back, but
unsuccessfully.

Anyone had a chat with upstream about that failure ?

--
Vincent Legoll
V
V
Vincent Legoll wrote on 14 Jan 2021 13:45
CAEwRq=oJCaiTODud1VomT=dvi8f1eG91YP73h6NWwS9oRwX0ow@mail.gmail.com
On Thu, Jan 14, 2021 at 1:33 PM Vincent Legoll <vincent.legoll@gmail.com> wrote:
Toggle quote (2 lines)
> Those two issues are linked...

The other one being the closed & archived :
40331@debbugs.gnu.org

--
Vincent Legoll
?