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

Previous Next

Package: guile;

Reported by: Sergey Fedorov <vital.had <at> gmail.com>

Date: Sat, 31 Aug 2024 11:05:02 UTC

Severity: important

Merged with 71891, 72215

Found in version 3.0.10

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 72913 in the body.
You can then email your comments to 72913 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#72913; Package guile. (Sat, 31 Aug 2024 11:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sergey Fedorov <vital.had <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Sat, 31 Aug 2024 11:05:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Sergey Fedorov <vital.had <at> gmail.com>
To: bug-guile <at> gnu.org, guile-devel <at> gnu.org
Subject: Guile 3.0.10 fails to build for powerpc-darwin (3.0.9 built earlier)
Date: Sat, 31 Aug 2024 05:20:33 +0800
[Message part 1 (text/plain, inline)]
Greetings,
Could someone take a look, please?

I am not familiar with Guile internals, so need some help with fixing this.
Guile 3.0.9 was building with minimal fixes for Darwin ppc, however I am
unable to get 3.0.10 build.
I have tried to change some configure settings, but the failure is not
sensitive to any, it seems.

The error looks like this:

:info:build   BOOTSTRAP(stage1) GUILEC ice-9/control.go
:info:build Backtrace:
:info:build In ice-9/boot-9.scm:
:info:build   1755:12 19 (with-exception-handler _ _ #:unwind? _
#:unwind-for-type _)
:info:build In system/base/compile.scm:
:info:build     69:11 18 (_)
:info:build    190:11 17 (_ #<closed: file 2841ea8>)
:info:build     309:6 16 (read-and-compile _ #:from _ #:to _ #:env _
#:optimization-level _ #:warning-level _ #:opts _)
:info:build    352:28 15 (compile _ #:from _ #:to _ #:env _
#:optimization-level _ #:warning-level _ #:opts _)
:info:build    265:44 14 (_ _ _)
:info:build    261:33 13 (_ _ #<directory (ice-9 common-list) 28a8320>)
:info:build In language/cps/optimize.scm:
:info:build     136:2 12 (_ _ #<directory (ice-9 common-list) 28a8320>)
:info:build     111:3 11 (optimize-first-order-cps _ _)
:info:build In language/cps/switch.scm:
:info:build     414:6 10 (optimize-branch-chains _)
:info:build In language/cps/intmap.scm:
:info:build     519:6  9 (visit-branch #(#(#(#<intset 0-155> (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) (absent) (absent) (absent) (absent) (absent)
(absent) (absent) (absent) (absent) (absent) (absent) (absent) # ?) ?) ?) ?)
:info:build     519:6  8 (visit-branch #(#(#<intset 0-155> (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) (absent) (absent) (absent) (absent) (absent)
(absent) (absent) (absent) (absent) (absent) (absent) (absent) (#) # ?) ?)
?)
:info:build     519:6  7 (visit-branch #((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) #<intset 156-199> (absent) (absent) (absent) #f) _ 128 _)
:info:build In language/cps/switch.scm:
:info:build     99:36  6 (fold-branch-chains #<intmap 0-1831> _ _
#<procedure optimize-branch-chain (var exit tests cps)> _)
:info:build     343:8  5 (optimize-branch-chain 122 181 (158 159 160 161
162 163 164 165 167 169 171 173 175 177 179) _)
:info:build In ice-9/boot-9.scm:
:info:build    260:13  4 (for-each #<procedure 412a570 at
language/cps/switch.scm:343:18 (expr)> _)
:info:build In language/cps/switch.scm:
:info:build    340:32  3 (_ (count-if . 170))
:info:build In language/cps/guile-vm.scm:
:info:build     89:31  2 (target-symbol-hash _)
:info:build     41:18  1 (jenkins-lookup3-hashword2 "count-if")
:info:build In ice-9/boot-9.scm:
:info:build   1676:22  0 (raise-exception _ #:continuable? _)
:info:build ice-9/boot-9.scm:1676:22: In procedure raise-exception:
:info:build Value out of range 0 to< 18446744073709551615: -432225964
:info:build gmake[2]: *** [Makefile:2516: ice-9/common-list.go] Error 1
:info:build gmake[2]: *** Waiting for unfinished jobs....
:info:build Backtrace:
:info:build In ice-9/boot-9.scm:
:info:build   1755:12 19 (with-exception-handler _ _ #:unwind? _
#:unwind-for-type _)
:info:build In system/base/compile.scm:
:info:build     69:11 18 (_)
:info:build    190:11 17 (_ #<closed: file 2841ea8>)
:info:build     309:6 16 (read-and-compile _ #:from _ #:to _ #:env _
#:optimization-level _ #:warning-level _ #:opts _)
:info:build    352:28 15 (compile _ #:from _ #:to _ #:env _
#:optimization-level _ #:warning-level _ #:opts _)
:info:build    265:44 14 (_ _ _)
:info:build    261:33 13 (_ _ #<directory (ice-9 control) 288cf00>)
:info:build In language/cps/optimize.scm:
:info:build     136:2 12 (_ _ #<directory (ice-9 control) 288cf00>)
:info:build     111:3 11 (optimize-first-order-cps _ _)
:info:build In language/cps/switch.scm:
:info:build     414:6 10 (optimize-branch-chains _)
:info:build In language/cps/intmap.scm:
:info:build     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) # ?) ?) ?) ?)
:info:build     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) (#) # ?) ?)
?)
:info:build     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 _)
:info:build In language/cps/switch.scm:
:info:build     99:36  6 (fold-branch-chains #<intmap 0-1129> _ _
#<procedure optimize-branch-chain (var exit tests cps)> _)
:info:build     343:8  5 (optimize-branch-chain 100 151 (132 134 136 138
140) _)
:info:build In ice-9/boot-9.scm:
:info:build    260:13  4 (for-each #<procedure 39d7ea0 at
language/cps/switch.scm:343:18 (expr)> _)
:info:build In language/cps/switch.scm:
:info:build    340:32  3 (_ (call-with-escape-continuation . 135))
:info:build In language/cps/guile-vm.scm:
:info:build     89:31  2 (target-symbol-hash _)
:info:build     41:18  1 (jenkins-lookup3-hashword2
"call-with-escape-continuation")
:info:build In ice-9/boot-9.scm:
:info:build   1676:22  0 (raise-exception _ #:continuable? _)
:info:build ice-9/boot-9.scm:1676:22: In procedure raise-exception:
:info:build Value out of range 0 to< 18446744073709551615: -512332661
:info:build gmake[2]: *** [Makefile:2516: ice-9/control.go] Error 1
:info:build wrote `language/cps/guile-vm/lower-primcalls.go'
:info:build wrote `language/cps/guile-vm/reify-primitives.go'
:info:build wrote `language/cps/compile-bytecode.go'
:info:build wrote `language/cps/types.go'
:info:build gmake[2]: Leaving directory
'/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_guile-3.0/guile-3.0/work/guile-3.0.10/stage1'
:info:build gmake[1]: *** [Makefile:2180: all-recursive] Error 1
:info:build gmake[1]: Leaving directory
'/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_lang_guile-3.0/guile-3.0/work/guile-3.0.10'
:info:build gmake: *** [Makefile:2065: all] Error 2

P. S. Given that it takes about 11 hrs to reach to this point (because
pre-built binaries for ppc32 are broken since guile2, and a full bootstrap
is needed), it is somewhat problematic to debug this blindly without an
idea what could cause this failure.
[Message part 2 (text/html, inline)]
[guile_3.0.10_powerpc_darwin.log (application/octet-stream, attachment)]

Information forwarded to bug-guile <at> gnu.org:
bug#72913; Package guile. (Sun, 01 Sep 2024 14:29:01 GMT) Full text and rfc822 format available.

Message #8 received at 72913 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Sergey Fedorov <vital.had <at> gmail.com>
Cc: 72913 <at> debbugs.gnu.org, guile-devel <at> gnu.org
Subject: Re: bug#72913: Guile 3.0.10 fails to build for powerpc-darwin
 (3.0.9 built earlier)
Date: Sun, 01 Sep 2024 16:24:46 +0200
Hi Sergey,

Sergey Fedorov <vital.had <at> gmail.com> skribis:

> :info:build In language/cps/guile-vm.scm:
> :info:build     89:31  2 (target-symbol-hash _)
> :info:build     41:18  1 (jenkins-lookup3-hashword2
> "call-with-escape-continuation")
> :info:build In ice-9/boot-9.scm:
> :info:build   1676:22  0 (raise-exception _ #:continuable? _)
> :info:build ice-9/boot-9.scm:1676:22: In procedure raise-exception:
> :info:build Value out of range 0 to< 18446744073709551615: -512332661
> :info:build gmake[2]: *** [Makefile:2516: ice-9/control.go] Error 1

This affects all 32-bit platforms unfortunately:

  https://issues.guix.gnu.org/72215

Ludo’.




Merged 71891 72215 72913. Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Sun, 01 Sep 2024 14:30:03 GMT) Full text and rfc822 format available.

Changed bug title to 'Compiler error building 3.0.10 on 32-bit platforms' from 'Guile 3.0.10 fails to build for powerpc-darwin (3.0.9 built earlier)' Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 27 Sep 2024 20:38:02 GMT) Full text and rfc822 format available.

Severity set to 'important' from 'normal' Request was from Ludovic Courtès <ludo <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 27 Sep 2024 21:11:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-guile <at> gnu.org:
bug#72913; Package guile. (Fri, 27 Sep 2024 21:11:06 GMT) Full text and rfc822 format available.

Message #17 received at 72913-done <at> debbugs.gnu.org (full text, mbox):

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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 26 Oct 2024 11:24:07 GMT) Full text and rfc822 format available.

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.