Skip to content

RTS build warnings related to era profiling.

Summary

I'm seeing a number of warnings seemingly related to era profiling when build the RTS.

I assume this might have happened when we merged !11917 (closed) (base: Add new RTS options introduced by eras profiling to GHC.RTS.Flags) or !11903 (closed) (rts: eras profiling mode)

In file included from rts/Interpreter.c:11:0: error:

rts/RtsFlags.h:27:6: error:
     warning: redundant redeclaration of ‘doingLDVProfiling’ [-Wredundant-decls]
       27 | bool doingLDVProfiling (void);
          |      ^~~~~~~~~~~~~~~~~
   |
27 | bool doingLDVProfiling (void);
   |      ^

In file included from rts/include/Rts.h:253,
                 from rts/Interpreter.c:9:0: error:

rts/include/rts/storage/ClosureMacros.h:156:6: error:
     note: previous declaration of ‘doingLDVProfiling’ with type ‘_Bool(void)’
      156 | bool doingLDVProfiling(void);
          |      ^~~~~~~~~~~~~~~~~
    |
156 | bool doingLDVProfiling(void);
    |      ^

rts/RtsFlags.h:28:6: error:
     warning: redundant redeclaration of ‘doingRetainerProfiling’ [-Wredundant-decls]
       28 | bool doingRetainerProfiling(void);
          |      ^~~~~~~~~~~~~~~~~~~~~~
   |
28 | bool doingRetainerProfiling(void);
   |      ^

rts/include/rts/storage/ClosureMacros.h:157:6: error:
     note: previous declaration of ‘doingRetainerProfiling’ with type ‘_Bool(void)’
      157 | bool doingRetainerProfiling(void);
          |      ^~~~~~~~~~~~~~~~~~~~~~
    |
157 | bool doingRetainerProfiling(void);
    |      ^

rts/RtsFlags.h:29:6: error:
     warning: redundant redeclaration of ‘doingErasProfiling’ [-Wredundant-decls]
       29 | bool doingErasProfiling(void);
          |      ^~~~~~~~~~~~~~~~~~
   |
29 | bool doingErasProfiling(void);
   |      ^

rts/include/rts/storage/ClosureMacros.h:158:6: error:
     note: previous declaration of ‘doingErasProfiling’ with type ‘_Bool(void)’
      158 | bool doingErasProfiling(void);
          |      ^~~~~~~~~~~~~~~~~~
    |
158 | bool doingErasProfiling(void);
    |      ^

@mpickering Maybe it's obvious to you what the problem is I haven't looking into this further yet.

Steps to reproduce

hadrian/build --flavour=default -j5 on master

Expected behavior

GHC should build without warnings.

Environment

  • GHC version used:

Optional:

  • Operating System:
  • System Architecture:
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information