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

Cannot compile WiredTiger on Clang 17

    • Storage Engines
    • 2
    • Megabat - 2024-05-14

      Clang 17 has, at least with WiredTiger's build flags, started enforcing that names beginning with a double underscore are reserved.

      With the following compile flags: cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/clang.cmake -DENABLE_PYTHON=1 -DHAVE_DIAGNOSTIC=1 -DENABLE_STRICT=1 -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -G Ninja ../.

      When using Clang 17, many warnings like this are generated:

      wiredtiger/build/include/wiredtiger.h:70:8: error: identifier '__wt_compressor' is reserved because it starts with '__' [-Werror,-Wreserved-identifier]
         70 | struct __wt_compressor;     typedef struct __wt_compressor WT_COMPRESSOR;
      

      A full log is attached.

            Assignee:
            will.korteland@mongodb.com Will Korteland
            Reporter:
            will.korteland@mongodb.com Will Korteland
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: