GNU bug report logs - #71891
Compiler error building 3.0.10 on 32-bit platforms

Previous Next

Package: guile;

Reported by: Rob Browning <rlb <at> defaultvalue.org>

Date: Tue, 2 Jul 2024 02:10:02 UTC

Severity: important

Merged with 72215, 72913

Found in version 3.0.10

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Subject: bug#72215: closed (Re: bug#72913: Guile 3.0.10 fails to build for
 powerpc-darwin (3.0.9 built earlier))
Date: Fri, 27 Sep 2024 21:11:05 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#71891: Compiler error building 3.0.10 on 32-bit platforms

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 72215 <at> debbugs.gnu.org.

-- 
71891: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=71891
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Rob Browning <rlb <at> defaultvalue.org>
Cc: 71891-done <at> debbugs.gnu.org, 72913-done <at> debbugs.gnu.org
Subject: Re: bug#72913: Guile 3.0.10 fails to build for powerpc-darwin
 (3.0.9 built earlier)
Date: Fri, 27 Sep 2024 22:40:01 +0200
Hi,

Rob Browning <rlb <at> defaultvalue.org> skribis:

>   In language/cps/switch.scm:
>       99:36  6 (fold-branch-chains #<intmap 0-8003> _ _ #<procedure optimize-branch-chain (var exit tests cps)> _)
>       343:8  5 (optimize-branch-chain 3346 7427 (6771 6772 6773 6901 7029 7157 7285) _)
>   In ice-9/boot-9.scm:
>      260:13  4 (for-each #<procedure 429618 at language/cps/switch.scm:343:18 (expr)> _)
>   In language/cps/switch.scm:
>      340:32  3 (_ (u64-imm-< . 7428))
>   In language/cps/guile-vm.scm:
>       89:31  2 (target-symbol-hash _)
>       41:18  1 (jenkins-lookup3-hashword2 "u64-imm-<")
>   In ice-9/boot-9.scm:
>     1676:22  0 (raise-exception _ #:continuable? _)
>
>   ice-9/boot-9.scm:1676:22: In procedure raise-exception:
>   Value out of range 0 to< 18446744073709551615: -505802029
>   make[4]: *** [Makefile:2515: language/cps/guile-vm/reify-primitives.go] Error 1
>
> Investigation on an i386 host, and then a git bisect suggested that this
> might be relevant (i.e. the "bad" commit bisect landed on):
>
>   commit d579848cb5d65440af5afd9c8968628665554c22
>
>     Fix bug lowering logand/immediate to ulogand/immediate
>     
>     * module/language/cps/specialize-numbers.scm (logand/immediate): Define
>     a sigbits handler.
>     (specialize-operations): Require logand/immediate operand to be u64 to
>     lower to ulogand/immediate.  Shouldn't be necessary but even if only u64
>     bits are used, negative fixnums will have the sign bit set, which trips
>     up further unboxed uses which error if the operand to `scm->u64` is
>     negative.
>     * module/language/cps/type-fold.scm (rem): Emit logand/immediate.

I believe this was fixed by
<https://git.savannah.gnu.org/cgit/guile.git/commit/?id=aff9ac968840e9c86719fb613bd2ed3c39b9905c>
(see the neat explanation at
<https://wingolog.org/archives/2024/09/26/needed-bits-optimizations-in-guile>).

Confirmed by CI: <https://ci.guix.gnu.org/eval/1667191>.

Thanks,
Ludo’.

[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: bug-guile <at> gnu.org
Subject: Compiler error building 3.0.10 on 32-bit platforms
Date: Sat, 20 Jul 2024 21:34:35 +0200
Hi,

The following compilation error occurs on i686-linux:

--8<---------------cut here---------------start------------->8---
  BOOTSTRAP(stage1) GUILEC ice-9/control.go
wrote `language/cps/verify.go'
  BOOTSTRAP(stage1) GUILEC ice-9/copy-tree.go
wrote `ice-9/copy-tree.go'
  BOOTSTRAP(stage1) GUILEC ice-9/curried-definitions.go
Backtrace:
In ice-9/boot-9.scm:
  1755:12 19 (with-exception-handler #<procedure c6988 at ice-9/boot-9.scm:1797:7 (exn)> #<procedure f1d60 at system/base/compile.scm:68:9 ()> #:unwind? _ #:unwind-for-type _)
In system/base/compile.scm:
    69:11 18 (_)
   190:11 17 (_ #<closed: file 42e38>)
    309:6 16 (read-and-compile #<closed: file 42e70> #:from _ #:to _ #:env _ #:optimization-level _ #:warning-level _ #:opts _)
   352:28 15 (compile #<tree-il (seq (let (m) (m-182b3cf1-2) ((call (@@ (guile) define-module*) (const (ice-9 control)) (const #:filename) (const "ice-9/control.scm") (const #:exports) (const (% abort shift reset shift* reset* call-with-escape-continuation call/ec let-escape-continuation let/ec suspendable-continuation?)) (const #:re-exports) (const (call-with-prompt abort-to-prompt default-prompt-tag make-prompt-tag)) (const #:declarative?) (const #t))) (seq (call (@@ (guile) set-current-m?> ?)
   265:44 14 (_ #<tree-il (seq (let (m) (m-182b3cf1-2) ((call (@@ (guile) define-module*) (const (ice-9 control)) (const #:filename) (const "ice-9/control.scm") (const #:exports) (const (% abort shift reset shift* reset* call-with-escape-continuation call/ec let-escape-continuation let/ec suspendable-continuation?)) (const #:re-exports) (const (call-with-prompt abort-to-prompt default-prompt-tag make-prompt-tag)) (const #:declarative?) (const #t))) (seq (call (@@ (guile) set-current-module)?> ?)
   261:33 13 (_ #<intmap 0-1142> #<directory (ice-9 control) e9c30>)
In language/cps/optimize.scm:
    136:2 12 (_ _ #<directory (ice-9 control) e9c30>)
    111:3 11 (optimize-first-order-cps _ _)
In language/cps/switch.scm:
    414:6 10 (optimize-branch-chains _)
In language/cps/intmap.scm:
    519:6  9 (visit-branch #(#(#(#<intset 0-129> (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) #f) (absent) (absent) (absent) #((absent) (absent) #<intset 130-153> (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) # ?) ?) ?) ?)
    519:6  8 (visit-branch #(#(#<intset 0-129> (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) #f) (absent) (absent) (absent) #((absent) (absent) #<intset 130-153> (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (#) # ?) ?) ?)
    519:6  7 (visit-branch #((absent) (absent) #<intset 130-153> (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) (absent) #<intset 154-734,1124-1129> (absent) (absent) (absent) (absent) (absent) #f) _ 128 _)
In language/cps/switch.scm:
    99:36  6 (fold-branch-chains #<intmap 0-1129> _ _ #<procedure optimize-branch-chain (var exit tests cps)> _)
    343:8  5 (optimize-branch-chain 100 151 (132 134 136 138 140) _)
In ice-9/boot-9.scm:
   260:13  4 (for-each1 ((call-with-escape-continuation . 135) (call/ec . 133) (reset* . 139) (shift* . 137)))
In language/cps/switch.scm:
   340:32  3 (_ (call-with-escape-continuation . 135))
In language/cps/guile-vm.scm:
    89:31  2 (target-symbol-hash _)
    41:18  1 (jenkins-lookup3-hashword2 "call-with-escape-continuation")
In ice-9/boot-9.scm:
  1676:22  0 (lp 0)

ice-9/boot-9.scm:1676:22: In procedure lp:
Value out of range 0 to< 18446744073709551615: -512332661
make[2]: *** [Makefile:2517: ice-9/control.go] Error 1
make[2]: *** Waiting for unfinished jobs....
--8<---------------cut here---------------end--------------->8---

According to <https://ci.guix.gnu.org/build/477680/details>, this
regression was introduced by
<https://git.savannah.gnu.org/cgit/guile.git/commit/?id=3b47f87618047ebb8812788c64a44877a4f2e0dd>.

(This affects 3.0.10.)

Ludo’.



This bug report was last modified 231 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.