Menu

#164 bug in determination of GOODGCC

Developer
closed-fixed
5
2011-01-21
2010-11-19
lindnerb
No

Hello,

Using atlas 3.9.32, I believe there is a bug in the code detemining the value for GOODGCC in config/src/SpewMakeInc.c.
Looking at the code starting at line 670, if I interpret it correctly, it should search through the list of specified compilers until it finds one whose name ends in 'gcc', and use this compiler for GOODGCC, right? If that is so, then the loop index variable 'i' should be used in determining whether a compiler was found, not the string length variable 'j', as in

diff --git a/CONFIG/src/SpewMakeInc.c b/CONFIG/src/SpewMakeInc.c
--- a/CONFIG/src/SpewMakeInc.c
+++ b/CONFIG/src/SpewMakeInc.c
@@ -675,7 +675,7 @@
comps[i][j-2] == 'c' && comps[i][j-1] == 'c')
break;
}
- goodgcc = (j < NCOMP) ? comps[j] : "gcc";
+ goodgcc = (i < NCOMP) ? comps[i] : "gcc";
fprintf(fpout, " GOODGCC = %s", goodgcc);
if (gccflags)
fprintf(fpout, " %s", gccflags);

regards,
benjamin

Discussion

  • R. Clint Whaley

    R. Clint Whaley - 2010-12-21

    You are correct. This is a bug, and I have fixed it in the basefiles. Can close when I release 3.9.33.

    Thanks!
    Clint

     
  • R. Clint Whaley

    R. Clint Whaley - 2010-12-21
    • assigned_to: nobody --> rwhaley
    • labels: 320139 -->
    • status: open --> open-accepted
     
  • R. Clint Whaley

    R. Clint Whaley - 2010-12-21
    • milestone: --> Developer
    • labels: --> Install problem
     
  • R. Clint Whaley

    R. Clint Whaley - 2011-01-21
    • status: open-accepted --> closed-fixed
     
  • R. Clint Whaley

    R. Clint Whaley - 2011-01-21

    Should be fixed by 3.9.33

     

Log in to post a comment.

MongoDB Logo MongoDB