Re: fossil build failure on riscv64
Thanks, Bo.
(Will post this on the upstream forum thread you opened.)
I used the riscv64 porter box ricci.debian.org.
Fossil takes like six thousand years to compile on ricci.
Not sure if it's GCC-on-riscv64-is-a-pig vs riscv64-is-a-pig vs
porter-box-posessed-by-pig-demon, but something is a pig!
I'm trying to figure out if the test failure issue is in the
calculations vs the printing routines.
So here are some commands, with the output on amd64, then on riscv64
if that differs.
It looks to me like the issue is some problem with the most negative
32-bit twos-complement integer in specific.
But it's hard to distinguish printing from arithmetic, because it
seems to use a printed form as intermediate value.
$ ./fossil version
This is fossil version 2.25 [1fba3e4aa9] 2025-04-07 19:33:35 UTC
$ ./fossil test-th-eval "expr (1<<30)"
1073741824
$ ./fossil test-th-eval "expr (1<<31)"
-2147483648
-0./,),(-*,(
$ ./fossil test-th-eval "expr (1<<31)+1"
-2147483647
TH_ERROR: expected number, got: "-0./,),(-*,("
$ ./fossil test-th-eval "expr 2147483647"
2147483647
2147483647
$ ./fossil test-th-eval "expr 2147483647+1"
-2147483648
-0./,),(-*,(
$ ./fossil test-th-eval "expr -2147483648"
-2147483648
-0./,),(-*,(
$ ./fossil test-th-eval "expr -2147483647"
-2147483647
-2147483647
$ ./fossil test-th-eval "expr -2147483647-1"
-2147483648
-0./,),(-*,(
$ ./fossil test-th-eval "expr -2147483647-2"
2147483647
2147483647
$ ./fossil test-th-eval "expr -2147483647-1-1"
2147483647
TH_ERROR: expected number, got: "-0./,),(-*,("
Reply to: