On Tue, 9 Nov 2021 01:13:25 +0000 "Torrance, Douglas" <dtorra...@piedmont.edu> 
wrote:
On Tue, 28 Jan 2020 13:28:02 +0000 Anders Nedergaard Jensen <jen...@math.au.dk> 
wrote:
> 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.

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!

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
Description: Properly terminate while loop when finding application name.
Author: Anders Nedergaard Jensen <jen...@math.au.dk>
Origin: https://bugs.debian.org/950008#17
Bug-Debian: https://bugs.debian.org/950008
Last-Update: 2021-11-08

--- a/src/application.cpp
+++ b/src/application.cpp
@@ -26,7 +26,7 @@
     {
       l--;
     }
-  while(p[l]!=0 && p[l]!='/');
+  while(l >= 0 && p[l]!='/');
 
   return p+l+1;
 }

Attachment: signature.asc
Description: PGP signature

Reply via email to