[GHC] #14945: Compiling error related to rts/Stats.c

GHC ghc-devs at haskell.org
Tue Mar 27 06:29:43 UTC 2018


#14945: Compiling error related to rts/Stats.c
-------------------------------------+-------------------------------------
        Reporter:  terrorjack        |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Build System      |              Version:  8.5
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:  x86_64
 Type of failure:  Building GHC      |  (amd64)
  failed                             |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by osa1):

 I can also confirm that the build is still broken:

 {{{
 rts/Stats.c:741:37: error:
      error: ‘RTSSummaryStats {aka const struct RTSSummaryStats_}’ has no
 member named ‘rc_cpu_ns’
                      TimeToSecondsDbl(sum->rc_cpu_ns),
                                          ^
     |
 741 |                 TimeToSecondsDbl(sum->rc_cpu_ns),
     |                                     ^

 rts/Stats.c:29:39: error:
      note: in definition of macro ‘TimeToSecondsDbl’
      #define TimeToSecondsDbl(t) ((double)(t) / TIME_RESOLUTION)
                                            ^
    |
 29 | #define TimeToSecondsDbl(t) ((double)(t) / TIME_RESOLUTION)
    |                                       ^

 rts/Stats.c:742:37: error:
      error: ‘RTSSummaryStats {aka const struct RTSSummaryStats_}’ has no
 member named ‘rc_elapsed_ns’
                      TimeToSecondsDbl(sum->rc_elapsed_ns));
                                          ^
     |
 742 |                 TimeToSecondsDbl(sum->rc_elapsed_ns));
     |                                     ^

 rts/Stats.c:29:39: error:
      note: in definition of macro ‘TimeToSecondsDbl’
      #define TimeToSecondsDbl(t) ((double)(t) / TIME_RESOLUTION)
                                            ^
    |
 29 | #define TimeToSecondsDbl(t) ((double)(t) / TIME_RESOLUTION)
    |                                       ^
 rts/Stats.c: In function ‘report_machine_readable’:

 rts/Stats.c:904:56: error:
      error: ‘RTSSummaryStats {aka const struct RTSSummaryStats_}’ has no
 member named ‘hp_cpu_ns’
          MR_STAT("hc_cpu_seconds", "f", TimeToSecondsDbl(sum->hp_cpu_ns));
                                                             ^
     |
 904 |     MR_STAT("hc_cpu_seconds", "f",
 TimeToSecondsDbl(sum->hp_cpu_ns));
     |                                                        ^

 "inplace/bin/ghc-stage1" -optc-fno-stack-protector -optc-Wall -optc-Werror
 -optc-Wall -optc-Wextra -optc-Wstrict-prototypes -optc-Wmissing-prototypes
 -optc-Wmissing-declarations -optc-Winline -optc-Waggregate-return -optc-
 Wpointer-arith -optc-Wmissing-noreturn -optc-Wnested-externs -optc-
 Wredundant-decls -optc-Wundef -optc-Iincludes -optc-Iincludes/dist -optc-
 Iincludes/dist-derivedconstants/header -optc-Iincludes/dist-
 ghcconstants/header -optc-Irts -optc-Irts/dist/build -optc-DCOMPILING_RTS
 -optc-fno-strict-aliasing -optc-fno-common -optc-Irts/dist/build/./autogen
 -optc-Werror=unused-but-set-variable -optc-Wno-error=inline -optc-O2
 -optc-fomit-frame-pointer -optc-g -optc-DRtsWay=\"rts_p\" -static -prof
 -eventlog  -O0 -H64m -Wall -fllvm-fill-undef-with-garbage    -Werror
 -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header
 -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS
 -this-unit-id rts -dcmm-lint      -i -irts -irts/dist/build
 -Irts/dist/build -irts/dist/build/./autogen -Irts/dist/build/./autogen
 -O2 -Wcpp-undef    -Wnoncanonical-monad-instances  -c rts/Threads.c -o
 rts/dist/build/Threads.p_o
 rts/Stats.c:867:62: error:
      note: in definition of macro ‘MR_STAT’
          statsPrintf(" ,(\"" field_name "\", \"%" format "\")\n", value)
                                                                   ^
     |
 867 |     statsPrintf(" ,(\"" field_name "\", \"%" format "\")\n", value)
     |                                                              ^

 rts/Stats.c:904:36: error:
      note: in expansion of macro ‘TimeToSecondsDbl’
          MR_STAT("hc_cpu_seconds", "f", TimeToSecondsDbl(sum->hp_cpu_ns));
                                         ^
     |
 904 |     MR_STAT("hc_cpu_seconds", "f",
 TimeToSecondsDbl(sum->hp_cpu_ns));
     |                                    ^

 rts/Stats.c:905:57: error:
      error: ‘RTSSummaryStats {aka const struct RTSSummaryStats_}’ has no
 member named ‘hp_elapsed_ns’
          MR_STAT("hc_wall_seconds", "f",
 TimeToSecondsDbl(sum->hp_elapsed_ns));
                                                              ^
     |
 905 |     MR_STAT("hc_wall_seconds", "f",
 TimeToSecondsDbl(sum->hp_elapsed_ns));
     |                                                         ^

 rts/Stats.c:867:62: error:
      note: in definition of macro ‘MR_STAT’
          statsPrintf(" ,(\"" field_name "\", \"%" format "\")\n", value)
                                                                   ^
     |
 867 |     statsPrintf(" ,(\"" field_name "\", \"%" format "\")\n", value)
     |                                                              ^

 rts/Stats.c:905:37: error:
      note: in expansion of macro ‘TimeToSecondsDbl’
          MR_STAT("hc_wall_seconds", "f",
 TimeToSecondsDbl(sum->hp_elapsed_ns));
                                          ^
     |
 905 |     MR_STAT("hc_wall_seconds", "f",
 TimeToSecondsDbl(sum->hp_elapsed_ns));
     |                                     ^
 `gcc' failed in phase `C Compiler'. (Exit code: 1)
 rts/ghc.mk:295: recipe for target 'rts/dist/build/Stats.p_o' failed
 make[1]: *** [rts/dist/build/Stats.p_o] Error 1
 make[1]: *** Waiting for unfinished jobs....
 Makefile:122: recipe for target 'all' failed
 make: *** [all] Error 2
 Command exited with non-zero status 2
 2127.75user 125.66system 9:50.20elapsed 381%CPU (0avgtext+0avgdata
 2299464maxresident)k
 223824inputs+2528896outputs (1204major+45830428minor)pagefaults 0swaps
 }}}

-- 
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14945#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list