Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-9790

Building WiredTiger with -Og results in compilation errors

    • Type: Icon: Technical Debt Technical Debt
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • 2

      Trying to compile WiredTiger as optimised for debugging (-Og) results in a handful of -Werror=maybe-uninitialized compile errors, most of which just require variables to be initialised to zero.

      To reproduce, follow the usual build process but add the -DCC_OPTIMIZE_LEVEL='-Og' flag:

      mkdir build
      cd build
      cmake -DCC_OPTIMIZE_LEVEL='-Og' -G Ninja ../../
      ninja

      I hot-fixed this for a patch build and noticed that while compiling locally succeeded, additional errors were found in the patch build. I'd recommend running the compile job for all buildvariants to confirm this is fixed. The easiest way to do this is to remove all CC_OPTIMIZE_LEVEL mentions in evergreen.yml and set default_optimize_level "-Og" in cmake/base.cmake.

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            andrew.morton@mongodb.com Andrew Morton
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: