Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-79591

zlib fails to compile on Clang-15

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 7.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Storage Execution
    • Minor Change
    • Execution NAMR Team 2023-09-04
    • 35

      Our zlib dependency fails to compile on clang-15 because -Wdeprecated-non-prototype is enabled by default.

      Upstream appears to be aware but as of today it hasn't been fixed yet: https://github.com/madler/zlib/issues/633

      One possible work-around would be to disable this warning for zlib, eg:

      diff --git a/src/third_party/scripts/zlib_get_sources.sh b/src/third_party/scripts/zlib_get_sources.sh
      index e48154de802..aae536ad400 100755
      --- a/src/third_party/scripts/zlib_get_sources.sh
      +++ b/src/third_party/scripts/zlib_get_sources.sh
      @@ -51,6 +51,8 @@ env.Append(CPPDEFINES=["HAVE_STDARG_H"])
       if not env.TargetOSIs('windows'):
           env.Append(CPPDEFINES=["HAVE_UNISTD_H"])

      +env.Append(CCFLAGS=["-Wno-deprecated-non-prototype"])
      +
       env.Library(
           target="zlib",
           source=[

            Assignee:
            matt.kneiser@mongodb.com Matt Kneiser
            Reporter:
            colin.stolley@mongodb.com Colin Stolley
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: