Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.16.0
    • None
    • None
    • Clang 15.0.6
    • 3
    • 9223372036854775807

    Description

      I've been experimenting with using Clang 15.0.6 to compile Lustre. The compiler runs into a number of build issues. Clang seems to be stricter than GCC in a few cases. Lustre can still be compiled by disabling the errors [1], but a first glance the errors seem legitimate. I'm making this ticket because I have a patch to fix some of the failures.

      It seems like some Clang-based static analyzers were used in the past [2], although I'm not sure if compiling Lustre with Clang is super common. I think it could be useful to have Clang as an option for development purposes, along the lines of ClangBuiltLinux [3]. It's seems like some kind of plugin [4] was developed at some point. It would be for an old (3.0) Clang, but it could be interesting to look at.

       

      [1] Errors that needed to be disabled:

       

      -Wno-error=enum-conversion
      -Wno-error=unused-but-set-variable
      -Wno-error=uninitialized
      -Wno-error=format
      -Wno-error=strncat-size
      -Wno-error=switch
      -Wno-error=strlcpy-strlcat-size
      -Wno-error=unneeded-internal-declaration
      -Wno-error=self-assign
      -Wno-error=tautological-constant-out-of-range-compare
      -Wno-error=constant-logical-operand
      -Wno-error=pointer-bool-conversion
      -Wno-error=unused-function
      -Wno-error=parentheses-equality
      -Wno-error=deprecated-non-prototype
      

      [2] Old Clang tickets:

      https://jira.whamcloud.com/browse/LU-871

      https://jira.whamcloud.com/browse/LU-2675

      [3] Clang/Linux: https://clangbuiltlinux.github.io/

      [4] Plugin: https://wiki.whamcloud.com/pages/viewpage.action?pageId=18645101

       

       

      Attachments

        Issue Links

          Activity

            [LU-16518] Fix Clang build errors
            rread Robert Read made changes -
            Link New: This issue is related to LU-18916 [ LU-18916 ]
            chunter-wc Chris Hunter made changes -
            Link New: This issue is related to EX-9607 [ EX-9607 ]
            pjones Peter Jones made changes -
            Fix Version/s New: Lustre 2.16.0 [ 15190 ]
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            yujian Jian Yu made changes -
            Link New: This issue is related to NVDCSE-145 [ NVDCSE-145 ]
            adilger Andreas Dilger made changes -
            Link Original: This issue is related to DDN-4341 [ DDN-4341 ]
            adilger Andreas Dilger made changes -
            Link New: This issue is related to DDN-4341 [ DDN-4341 ]
            timday Tim Day made changes -
            Link New: This issue is related to LU-16961 [ LU-16961 ]
            bzzz Alex Zhuravlev made changes -
            Attachment New: stdout.txt [ 48525 ]
            Attachment New: serial.txt [ 48526 ]
            Attachment New: sanity-flr.test_42.debug_log.tmp.1679582991.log.bz2 [ 48527 ]
            timday Tim Day created issue -

            People

              timday Tim Day
              timday Tim Day
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: