unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#39699: [core-updates] gash-boot0 fails on i686-linux
@ 2020-02-20 17:24 Marius Bakke
  2020-02-20 21:57 ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Marius Bakke @ 2020-02-20 17:24 UTC (permalink / raw)
  To: 39699

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

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

* bug#39699: [core-updates] gash-boot0 fails on i686-linux
  2020-02-20 17:24 bug#39699: [core-updates] gash-boot0 fails on i686-linux Marius Bakke
@ 2020-02-20 21:57 ` Ludovic Courtès
  2020-02-21 14:11   ` Jan Nieuwenhuizen
  2020-02-21 14:18   ` Timothy Sample
  0 siblings, 2 replies; 10+ messages in thread
From: Ludovic Courtès @ 2020-02-20 21:57 UTC (permalink / raw)
  To: Marius Bakke, Timothy Sample, Jan Nieuwenhuizen; +Cc: 39699

Hi,

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?

Thanks,
Ludo’.

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

* bug#39699: [core-updates] gash-boot0 fails on i686-linux
  2020-02-20 21:57 ` Ludovic Courtès
@ 2020-02-21 14:11   ` Jan Nieuwenhuizen
  2020-02-21 20:38     ` Ludovic Courtès
  2020-02-21 14:18   ` Timothy Sample
  1 sibling, 1 reply; 10+ messages in thread
From: Jan Nieuwenhuizen @ 2020-02-21 14:11 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 39699

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

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.

> 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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-commencement-bootar-Build-fix-for-i686-linux.patch --]
[-- Type: text/x-patch, Size: 1361 bytes --]

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(+)

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


[-- Attachment #3: Type: text/plain, Size: 152 bytes --]


-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

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

* bug#39699: [core-updates] gash-boot0 fails on i686-linux
  2020-02-20 21:57 ` Ludovic Courtès
  2020-02-21 14:11   ` Jan Nieuwenhuizen
@ 2020-02-21 14:18   ` Timothy Sample
  1 sibling, 0 replies; 10+ messages in thread
From: Timothy Sample @ 2020-02-21 14:18 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 39699

Hi Ludo,

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

> 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

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

* bug#39699: [core-updates] gash-boot0 fails on i686-linux
  2020-02-21 14:11   ` Jan Nieuwenhuizen
@ 2020-02-21 20:38     ` Ludovic Courtès
  2020-02-21 21:30       ` Jan Nieuwenhuizen
  2020-02-21 21:30       ` Jan Nieuwenhuizen
  0 siblings, 2 replies; 10+ messages in thread
From: Ludovic Courtès @ 2020-02-21 20:38 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 39699

Hi!

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> 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!

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

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

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

[...]

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

> 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!

> Sorry for the little hiccup!

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

Ludo’.

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

* bug#39699: [core-updates] gash-boot0 fails on i686-linux
  2020-02-21 20:38     ` Ludovic Courtès
@ 2020-02-21 21:30       ` Jan Nieuwenhuizen
  2020-02-21 23:28         ` Ludovic Courtès
  2020-02-21 21:30       ` Jan Nieuwenhuizen
  1 sibling, 1 reply; 10+ messages in thread
From: Jan Nieuwenhuizen @ 2020-02-21 21:30 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 39699

Ludovic Courtès writes:

Hi!

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

>> See #39699
>
> Nitpick: “Fixes <https://bugs.gnu.org/39699>.”  :-)

Thanks.

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

> 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

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

* bug#39699: [core-updates] gash-boot0 fails on i686-linux
  2020-02-21 20:38     ` Ludovic Courtès
  2020-02-21 21:30       ` Jan Nieuwenhuizen
@ 2020-02-21 21:30       ` Jan Nieuwenhuizen
  2020-02-22  5:07         ` Timothy Sample
  1 sibling, 1 reply; 10+ messages in thread
From: Jan Nieuwenhuizen @ 2020-02-21 21:30 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: 39699-done

Ludovic Courtès writes:

Hi!

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

>> See #39699
>
> Nitpick: “Fixes <https://bugs.gnu.org/39699>.”  :-)

Thanks.

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

> 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

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

* bug#39699: [core-updates] gash-boot0 fails on i686-linux
  2020-02-21 21:30       ` Jan Nieuwenhuizen
@ 2020-02-21 23:28         ` Ludovic Courtès
  0 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2020-02-21 23:28 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 39699

Jan Nieuwenhuizen <janneke@gnu.org> skribis:

> @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’.

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

* bug#39699: [core-updates] gash-boot0 fails on i686-linux
  2020-02-21 21:30       ` Jan Nieuwenhuizen
@ 2020-02-22  5:07         ` Timothy Sample
  2020-02-22 20:41           ` Ludovic Courtès
  0 siblings, 1 reply; 10+ messages in thread
From: Timothy Sample @ 2020-02-22  5:07 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: 39699-done

Hi all,

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.


-- Tim

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

* bug#39699: [core-updates] gash-boot0 fails on i686-linux
  2020-02-22  5:07         ` Timothy Sample
@ 2020-02-22 20:41           ` Ludovic Courtès
  0 siblings, 0 replies; 10+ messages in thread
From: Ludovic Courtès @ 2020-02-22 20:41 UTC (permalink / raw)
  To: Timothy Sample; +Cc: 39699-done

Hey!

Timothy Sample <samplet@ngyro.com> skribis:

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

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

end of thread, other threads:[~2020-02-22 20:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-20 17:24 bug#39699: [core-updates] gash-boot0 fails on i686-linux Marius Bakke
2020-02-20 21:57 ` Ludovic Courtès
2020-02-21 14:11   ` Jan Nieuwenhuizen
2020-02-21 20:38     ` Ludovic Courtès
2020-02-21 21:30       ` Jan Nieuwenhuizen
2020-02-21 23:28         ` Ludovic Courtès
2020-02-21 21:30       ` Jan Nieuwenhuizen
2020-02-22  5:07         ` Timothy Sample
2020-02-22 20:41           ` Ludovic Courtès
2020-02-21 14:18   ` Timothy Sample

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