[core-updates] gash-boot0 fails on i686-linux

  • Done
  • quality assurance status badge
Details
4 participants
  • Jan Nieuwenhuizen
  • Ludovic Courtès
  • Marius Bakke
  • Timothy Sample
Owner
unassigned
Submitted by
Marius Bakke
Severity
normal
M
M
Marius Bakke wrote on 20 Feb 2020 18:24
(address . bug-guix@gnu.org)
87y2sx41f2.fsf@devup.no
Hello,

Bootstrap fails early on i686-linux when trying to build gash-boot0,
which fails thusly:

starting phase `unpack'
Backtrace:
In ice-9/eval.scm:
432: 19 [eval # #]
In ice-9/boot-9.scm:
2320: 18 [save-module-excursion #<procedure 8517ca0 at ice-9/boot-9.scm:3961:3 ()>]
3966: 17 [#<procedure 8517ca0 at ice-9/boot-9.scm:3961:3 ()>]
1645: 16 [%start-stack load-stack ...]
1650: 15 [#<procedure 850d9f0 ()>]
In unknown file:
?: 14 [primitive-load "/gnu/store/2m6vg55vvlxscc9yrq2ahqxvx4z9gbfp-bootar-1/bin/tar"]
In ice-9/eval.scm:
505: 13 [#<procedure 84682a0 at ice-9/eval.scm:499:4 (exp)> (use-modules # # # ...)]
In ice-9/psyntax.scm:
1091: 12 [expand-top-sequence ((use-modules # # # ...)) () ((top)) ...]
976: 11 [scan ((use-modules (compression bzip2) (compression gzip) ...)) () ...]
270: 10 [scan ((# #) #(syntax-object *unspecified* # #)) () (()) ...]
In ice-9/boot-9.scm:
3513: 9 [process-use-modules ((#) (#) (#) (#) ...)]
627: 8 [map #<procedure 84c6ae0 at ice-9/boot-9.scm:3513:25 (mif-args)> #]
3514: 7 [#<procedure 84c6ae0 at ice-9/boot-9.scm:3513:25 (mif-args)> (#)]
2783: 6 [resolve-interface (compression bzip2) #:select ...]
2708: 5 [#<procedure 84bf770 at ice-9/boot-9.scm:2696:4 (name #:optional autoload version #:key ensure)> # ...]
2981: 4 [try-module-autoload (compression bzip2) #f]
2320: 3 [save-module-excursion #<procedure 850d228 at ice-9/boot-9.scm:2982:17 ()>]
3001: 2 [#<procedure 850d228 at ice-9/boot-9.scm:2982:17 ()>]
In unknown file:
?: 1 [primitive-load-path "compression/bzip2" ...]
In compression/bzip2.scm:
45: 0 [#<procedure 8499a10 ()>]

compression/bzip2.scm:45:18: In procedure #<procedure 8499a10 ()>:
compression/bzip2.scm:45:18: ERROR: R6RS exception:
1. &error
2. &who: bzip2
3. &message: "This module requires at least 32-bit fixnums"
4. &irritants: ()
command "tar" "xvf" "/gnu/store/bspn36jhcd2ky6ih7wnh9z0iz867flc2-gash-0.2.0.tar.gz" failed with status 1
L
L
Ludovic Courtès wrote on 20 Feb 2020 22:57
(address . 39699@debbugs.gnu.org)
87zhdc9b1e.fsf@gnu.org
Hi,

Marius Bakke <mbakke@fastmail.com> skribis:

Toggle quote (3 lines)
> Bootstrap fails early on i686-linux when trying to build gash-boot0,
> which fails thusly:

[...]

Toggle quote (12 lines)
> ?: 1 [primitive-load-path "compression/bzip2" ...]
> In compression/bzip2.scm:
> 45: 0 [#<procedure 8499a10 ()>]
>
> compression/bzip2.scm:45:18: In procedure #<procedure 8499a10 ()>:
> compression/bzip2.scm:45:18: ERROR: R6RS exception:
> 1. &error
> 2. &who: bzip2
> 3. &message: "This module requires at least 32-bit fixnums"
> 4. &irritants: ()
> command "tar" "xvf" "/gnu/store/bspn36jhcd2ky6ih7wnh9z0iz867flc2-gash-0.2.0.tar.gz" failed with status 1

The error comes from the (compression bzip2) module included in
“bootar”.

I can see two solutions:

1. Remove bzip2 support from bootar (it’s not actually needed, is it?).

2. Modify (compression bzip2) so that it errors out on first use
rather than at load time.

Timothy, janneke, WDYT?

Thanks,
Ludo’.
J
J
Jan Nieuwenhuizen wrote on 21 Feb 2020 15:11
(name . Ludovic Courtès)(address . ludo@gnu.org)
87mu9c81z9.fsf@gnu.org
Ludovic Courtès writes:

Hi!

Toggle quote (4 lines)
> I can see two solutions:
>
> 1. Remove bzip2 support from bootar (it’s not actually needed, is it?).

Ugly but easiest fix for me, see attached.

Toggle quote (3 lines)
> 2. Modify (compression bzip2) so that it errors out on first use
> rather than at load time.

Or
3. Port bzip2 to to 32bit.

Toggle quote (2 lines)
> Timothy, janneke, WDYT?

I would prefer 3., with the fix going upstream. This opens the path to
really using bzip2 in the bootstrap. 2. could be a nice intermediate
step, but I would not know how to do that nicely, as we fetch
(compression bzip2) from upstream. Timothy?

How about applying attached patch that implements 1. and revert it once
we get to 2. or 3.

janneke
From 06bc492cdc1f476f0caa558546290ceafde357b1 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Fri, 21 Feb 2020 07:46:16 +0100
Subject: [PATCH] gnu: commencement: bootar: Build fix for i686-linux.

See #39699

* gnu/packages/commencement.scm (bootar)[i686-linux]: Stub bzip2.
---
gnu/packages/commencement.scm | 9 +++++++++
1 file changed, 9 insertions(+)

Toggle diff (22 lines)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index e3800d84a5..4901391073 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -111,6 +111,15 @@
(guile (string-append guile-dir "/bin/guile")))
(invoke guile "--no-auto-compile" source)
(chdir "bootar")
+ (when ,(equal? (%current-system) "i686-linux")
+ (delete-file "scripts/bzip2.in")
+ (delete-file "compression/bzip2.scm")
+ (with-output-to-file "compression/bzip2.scm"
+ (lambda _
+ (display "(define-module (compression bzip2))
+(define-public is-bzip2-file? (const #f))
+(define-public make-bzip2-input-port (const #f))
+"))))
#t)))
(replace 'configure (bootstrap-configure ,version "." "scripts"))
(replace 'build (bootstrap-build "."))
--
2.24.0
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com| Avatar® http://AvatarAcademy.com
T
T
Timothy Sample wrote on 21 Feb 2020 15:18
(name . Ludovic Courtès)(address . ludo@gnu.org)
878skwkoq8.fsf@ngyro.com
Hi Ludo,

Ludovic Courtès <ludo@gnu.org> writes:

Toggle quote (31 lines)
> Marius Bakke <mbakke@fastmail.com> skribis:
>
>> Bootstrap fails early on i686-linux when trying to build gash-boot0,
>> which fails thusly:
>
> [...]
>
>> ?: 1 [primitive-load-path "compression/bzip2" ...]
>> In compression/bzip2.scm:
>> 45: 0 [#<procedure 8499a10 ()>]
>>
>> compression/bzip2.scm:45:18: In procedure #<procedure 8499a10 ()>:
>> compression/bzip2.scm:45:18: ERROR: R6RS exception:
>> 1. &error
>> 2. &who: bzip2
>> 3. &message: "This module requires at least 32-bit fixnums"
>> 4. &irritants: ()
>> command "tar" "xvf" "/gnu/store/bspn36jhcd2ky6ih7wnh9z0iz867flc2-gash-0.2.0.tar.gz" failed with status 1
>
> The error comes from the (compression bzip2) module included in
> “bootar”.
>
> I can see two solutions:
>
> 1. Remove bzip2 support from bootar (it’s not actually needed, is it?).
>
> 2. Modify (compression bzip2) so that it errors out on first use
> rather than at load time.
>
> Timothy, janneke, WDYT?

Both of those are good options. The 32-bit fixnum limit is a something
of a development artifact. I think I can remove it without problems.
If not, I will just remove BZip2 support for now, since I think you’re
right that we don’t use it.

Sorry for the little hiccup!


-- Tim
L
L
Ludovic Courtès wrote on 21 Feb 2020 21:38
(name . Jan Nieuwenhuizen)(address . janneke@gnu.org)
87h7zj3cc3.fsf@gnu.org
Hi!

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (16 lines)
> Ludovic Courtès writes:
>
> Hi!
>
>> I can see two solutions:
>>
>> 1. Remove bzip2 support from bootar (it’s not actually needed, is it?).
>
> Ugly but easiest fix for me, see attached.
>
>> 2. Modify (compression bzip2) so that it errors out on first use
>> rather than at load time.
>
> Or
> 3. Port bzip2 to to 32bit.

Indeed!

Toggle quote (5 lines)
> I would prefer 3., with the fix going upstream. This opens the path to
> really using bzip2 in the bootstrap. 2. could be a nice intermediate
> step, but I would not know how to do that nicely, as we fetch
> (compression bzip2) from upstream. Timothy?

I don’t think we’ll introduce new uses of bzip2 on the bootstrap path.
So if it’s unnecessary today, it may remain unnecessary in the
foreseeable future.

Toggle quote (7 lines)
> From 06bc492cdc1f476f0caa558546290ceafde357b1 Mon Sep 17 00:00:00 2001
> From: Jan Nieuwenhuizen <janneke@gnu.org>
> Date: Fri, 21 Feb 2020 07:46:16 +0100
> Subject: [PATCH] gnu: commencement: bootar: Build fix for i686-linux.
>
> See #39699

Nitpick: “Fixes https://bugs.gnu.org/39699.” :-)

Toggle quote (2 lines)
> * gnu/packages/commencement.scm (bootar)[i686-linux]: Stub bzip2.

[...]

Toggle quote (11 lines)
> (chdir "bootar")
> + (when ,(equal? (%current-system) "i686-linux")
> + (delete-file "scripts/bzip2.in")
> + (delete-file "compression/bzip2.scm")
> + (with-output-to-file "compression/bzip2.scm"
> + (lambda _
> + (display "(define-module (compression bzip2))
> +(define-public is-bzip2-file? (const #f))
> +(define-public make-bzip2-input-port (const #f))
> +"))))

Perhaps you can write it in a way that avoids rebuilds on x86_64:

,@(if (equal? …)
'((…))
'())

Or actually, we can just remove the functionality unconditionally for
now since it could be error-prone to have different features depending
on the platform.

WDYT?

Timothy Sample <samplet@ngyro.com> skribis:

Toggle quote (5 lines)
> Both of those are good options. The 32-bit fixnum limit is a something
> of a development artifact. I think I can remove it without problems.
> If not, I will just remove BZip2 support for now, since I think you’re
> right that we don’t use it.

For now I guess we can apply something as discussed above, but in the
longer run, it’d be nice to have that 32-bit limit waived!

Toggle quote (2 lines)
> Sorry for the little hiccup!

No problem, it’s really great that we got these binary seeds further
reduced!

Ludo’.
J
J
Jan Nieuwenhuizen wrote on 21 Feb 2020 22:30
(name . Ludovic Courtès)(address . ludo@gnu.org)
87eeun8w7q.fsf@gnu.org
Ludovic Courtès writes:

Hi!

Toggle quote (9 lines)
>> I would prefer 3., with the fix going upstream. This opens the path to
>> really using bzip2 in the bootstrap. 2. could be a nice intermediate
>> step, but I would not know how to do that nicely, as we fetch
>> (compression bzip2) from upstream. Timothy?
>
> I don’t think we’ll introduce new uses of bzip2 on the bootstrap path.
> So if it’s unnecessary today, it may remain unnecessary in the
> foreseeable future.

That's a helpful perspective; Yes, I agree.

Toggle quote (4 lines)
>> See #39699
>
> Nitpick: “Fixes <https://bugs.gnu.org/39699>.” :-)

Thanks.

Toggle quote (17 lines)
>> (chdir "bootar")
>> + (when ,(equal? (%current-system) "i686-linux")
>> + (delete-file "scripts/bzip2.in")
>> + (delete-file "compression/bzip2.scm")
>> + (with-output-to-file "compression/bzip2.scm"
>> + (lambda _
>> + (display "(define-module (compression bzip2))
>> +(define-public is-bzip2-file? (const #f))
>> +(define-public make-bzip2-input-port (const #f))
>> +"))))
>
> Perhaps you can write it in a way that avoids rebuilds on x86_64:
>
> ,@(if (equal? …)
> '((…))
> '())

Neat...

Toggle quote (6 lines)
> Or actually, we can just remove the functionality unconditionally for
> now since it could be error-prone to have different features depending
> on the platform.
>
> WDYT?

Yes, I removed it. Hoping that's okay. We just decided above it's
adding an unnecessary "if".

@Timothy: if you want to change this in bootar itself and remove the
workaround from commencement, please feel free. Pushed to core-updates
as

a82cf70e8ae4c8dcf03d2633f09dcfc8bb6d6d1e

Thanks,
janneke

--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com| Avatar® http://AvatarAcademy.com
J
J
Jan Nieuwenhuizen wrote on 21 Feb 2020 22:30
(name . Ludovic Courtès)(address . ludo@gnu.org)
87d0a78w70.fsf@gnu.org
Ludovic Courtès writes:

Hi!

Toggle quote (9 lines)
>> I would prefer 3., with the fix going upstream. This opens the path to
>> really using bzip2 in the bootstrap. 2. could be a nice intermediate
>> step, but I would not know how to do that nicely, as we fetch
>> (compression bzip2) from upstream. Timothy?
>
> I don’t think we’ll introduce new uses of bzip2 on the bootstrap path.
> So if it’s unnecessary today, it may remain unnecessary in the
> foreseeable future.

That's a helpful perspective; Yes, I agree.

Toggle quote (4 lines)
>> See #39699
>
> Nitpick: “Fixes <https://bugs.gnu.org/39699>.” :-)

Thanks.

Toggle quote (17 lines)
>> (chdir "bootar")
>> + (when ,(equal? (%current-system) "i686-linux")
>> + (delete-file "scripts/bzip2.in")
>> + (delete-file "compression/bzip2.scm")
>> + (with-output-to-file "compression/bzip2.scm"
>> + (lambda _
>> + (display "(define-module (compression bzip2))
>> +(define-public is-bzip2-file? (const #f))
>> +(define-public make-bzip2-input-port (const #f))
>> +"))))
>
> Perhaps you can write it in a way that avoids rebuilds on x86_64:
>
> ,@(if (equal? …)
> '((…))
> '())

Neat...

Toggle quote (6 lines)
> Or actually, we can just remove the functionality unconditionally for
> now since it could be error-prone to have different features depending
> on the platform.
>
> WDYT?

Yes, I removed it. Hoping that's okay. We just decided above it's
adding an unnecessary "if".

@Timothy: if you want to change this in bootar itself and remove the
workaround from commencement, please feel free. Pushed to core-updates
as

a82cf70e8ae4c8dcf03d2633f09dcfc8bb6d6d1e

Thanks,
janneke

--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com| Avatar® http://AvatarAcademy.com
Closed
L
L
Ludovic Courtès wrote on 22 Feb 2020 00:28
(name . Jan Nieuwenhuizen)(address . janneke@gnu.org)
8736b31pw1.fsf@gnu.org
Jan Nieuwenhuizen <janneke@gnu.org> skribis:

Toggle quote (6 lines)
> @Timothy: if you want to change this in bootar itself and remove the
> workaround from commencement, please feel free. Pushed to core-updates
> as
>
> a82cf70e8ae4c8dcf03d2633f09dcfc8bb6d6d1e

Thanks!

Ludo’.
T
T
Timothy Sample wrote on 22 Feb 2020 06:07
(name . Jan Nieuwenhuizen)(address . janneke@gnu.org)
8736b3ky50.fsf@ngyro.com
Hi all,

Jan Nieuwenhuizen <janneke@gnu.org> writes:

Toggle quote (3 lines)
> @Timothy: if you want to change this in bootar itself and remove the
> workaround from commencement, please feel free.

Done in 4b807ef87c4634e8bea1431d47ee3df3b519145d.


-- Tim
Closed
L
L
Ludovic Courtès wrote on 22 Feb 2020 21:41
(name . Timothy Sample)(address . samplet@ngyro.com)
87r1ymuzgh.fsf@gnu.org
Hey!

Timothy Sample <samplet@ngyro.com> skribis:

Toggle quote (7 lines)
> Jan Nieuwenhuizen <janneke@gnu.org> writes:
>
>> @Timothy: if you want to change this in bootar itself and remove the
>> workaround from commencement, please feel free.
>
> Done in 4b807ef87c4634e8bea1431d47ee3df3b519145d.

Thanks!

In other news, I’ve mirrored bootar-1{,a}.ses on ftp.gnu.org so we have
an additional copy out there.

Ludo’.
Closed
?