Skip to content

Errors while compiling libdw

When compiling the RTS in a validate build, I see

rts/Libdw.c: In function ‘set_initial_registers’:

rts/Libdw.c:316:12: error:
     warning: ‘regs’ may be used uninitialized [-Wmaybe-uninitialized]
      316 |     return dwfl_thread_state_registers(thread, 0, 17, regs);
          |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    |
316 |     return dwfl_thread_state_registers(thread, 0, 17, regs);
    |            ^

In file included from rts/Libdw.c:15:0: error:

/nix/store/js14rv1j3yfqh0yc9x8p6r83xcs5x3vv-elfutils-0.187-dev/include/elfutils/libdwfl.h:745:6: error:
     note: by argument 4 of type ‘const Dwarf_Word *’ {aka ‘const long unsigned int *’} to ‘dwfl_thread_state_registers’ declared here
      745 | bool dwfl_thread_state_registers (Dwfl_Thread *thread, int firstreg,
          |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    |
745 | bool dwfl_thread_state_registers (Dwfl_Thread *thread, int firstreg,
    |      ^

rts/Libdw.c:293:16: error:
     note: ‘regs’ declared here
      293 |     Dwarf_Word regs[17];
          |                ^~~~
    |
293 |     Dwarf_Word regs[17];
    |                ^
rts/Libdw.c: At top level:
cc1: note: unrecognized command-line option ‘-Wno-nonportable-include-path’ may have been intended to silence earlier diagnostics

But the build seems to succeed anyway.

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