Skip to content

Build error from following default nixos instructions and -Werror

When building the RTS with the nixos instructions from the wiki (https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Linux#NixNixOS) if you enable Werror then the build fails with warnings from the rts.

For example

rts/Interpreter.c: In function ‘interpretBCO’:
rts/Interpreter.c:593:41: error:
     warning: ‘obj’ may be used uninitialized in this function [-Wmaybe-uninitialized]
                  debugBelch("Returning: "); printObj(obj);

Is this something I should worry about? Are there additional flags that I should pass to gcc in order to turn these warnings off?

The workaround is compile without -Werror and then turn it on once the rts has been compiled.

Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority lowest
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information