Hi, many of sagemath's doctests in the interface to gfan fail on riscv64 with the following error: gfan_*: src/application.cpp:42: char* tail(char*): Assertion `*p==*m' failed. It looks like the pointer arithmetic in the function tail() in application.cpp does not work like this on riscv64. Unfortunately there are no porterboxes for riscv64 yet, so I can't come up with a minimal example triggering the bug. Best, Tobias
Hello! I am forwarding the bug report below from the Debian package of gfan:
Hi, Thanks for the bug report. Line 30 of application.cpp looks suspicious: while(p[l]!=0 && p[l]!='/'); Does it help to change it to while(l!=0 && p[l]!='/'); ? If not, I think I need to know what the char* argv[0] points to when main is called. Best regards, Anders
This is also causing macaulay2 to FTBFS in riscv64 [1]:
checking whether the package gfan is installed... gfan: src/application.cpp:42: char* tail(char*): Assertion `*p==*m' failed.
yes, but < 0.6, will build
...
make -C gfan fetch
make[3]: Entering directory '/<<PKGBUILDDIR>>/M2/libraries/gfan'
error: for the third-party library or program source "gfan"
the source code is not present in the file "/<<PKGBUILDDIR>>/M2/BUILD/tarfiles/gfan0.6.2.tar.gz"
so either download a "fat" tar file of the Macaulay2 source code
or rerun the Macaulay2 "configure" command with the added option "--enable-download"
to enable automatic downloading of the source code over the internet
make[3]: *** [../Makefile.library:235: /<<PKGBUILDDIR>>/M2/BUILD/tarfiles/gfan0.6.2.tar.gz] Error 1
[1] https://buildd.debian.org/status/fetch.php?pkg=macaulay2&arch=riscv64&ver=1.18%2Bds-1%7Eexp1&stamp=1625665959&raw=0
I included a slight modification of this patch (with "l >= 0" instead of "l != 0") in the latest gfan upload (0.6.2-5). Fingers crossed that it fixes things on riscv64! Doug
This patch (attached) appears to have worked! The most recent build of
Macaulay2 on riscv64 [1], while failing for other reasons, got past the gfan
detection stage:
checking whether the package gfan is installed... yes
I'll wait to see if it works for the next riscv64 build of Sage before
closing this bug.
Doug
[1] https://buildd.debian.org/status/fetch.php?pkg=macaulay2&arch=riscv64&ver=1.19%2Bds-1&stamp=1637315650&raw=0
Thanks,
I have made this update to the gfan svn.
Best regards,
Anders
This patch (attached) appears to have worked! The most recent build of
Macaulay2 on riscv64 [1], while failing for other reasons, got past the gfan
detection stage:
checking whether the package gfan is installed... yes
I'll wait to see if it works for the next riscv64 build of Sage before
closing this bug.
Doug
[1] https://buildd.debian.org/status/fetch.php?pkg=macaulay2&arch=riscv64&ver=1.19%2Bds-1&stamp=1637315650&raw=0