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
            gerrit Gerrit Updater added a comment -

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58345/
            Subject: LU-16518 lst: fix switch-case unannotated fall-through (2)
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 7055e949d3f5fc8318577dab9967ad74cac832c6

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58345/ Subject: LU-16518 lst: fix switch-case unannotated fall-through (2) Project: fs/lustre-release Branch: master Current Patch Set: Commit: 7055e949d3f5fc8318577dab9967ad74cac832c6

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58553/
            Subject: LU-16518 mgs: remove dt2msg_obj/dev() and friends
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 7fafc105a1a236752b1ec1e0f61ff8c325680af4

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58553/ Subject: LU-16518 mgs: remove dt2msg_obj/dev() and friends Project: fs/lustre-release Branch: master Current Patch Set: Commit: 7fafc105a1a236752b1ec1e0f61ff8c325680af4

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58552/
            Subject: LU-16518 lnet: remove unused lnet_find_peer_net_locked()
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: df6a7264dcd08d18d5e4ea11a5ad9d99c2101fdb

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58552/ Subject: LU-16518 lnet: remove unused lnet_find_peer_net_locked() Project: fs/lustre-release Branch: master Current Patch Set: Commit: df6a7264dcd08d18d5e4ea11a5ad9d99c2101fdb

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58349/
            Subject: LU-16518 lnet: fix implicit-fallthrough warnings
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 5feade9a6f69ee0fd6782de8c9b30f75f1c1f795

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58349/ Subject: LU-16518 lnet: fix implicit-fallthrough warnings Project: fs/lustre-release Branch: master Current Patch Set: Commit: 5feade9a6f69ee0fd6782de8c9b30f75f1c1f795

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58353/
            Subject: LU-16518 lnet: remove want_large_primary in lnet_peer_merge_data()
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: eba19ba90512b1231c52211bb2772f4926e88fbf

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58353/ Subject: LU-16518 lnet: remove want_large_primary in lnet_peer_merge_data() Project: fs/lustre-release Branch: master Current Patch Set: Commit: eba19ba90512b1231c52211bb2772f4926e88fbf

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58348/
            Subject: LU-16518 lustre: fix implicit-fallthrough warnings
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: f7b1fea6bff50c190e9e644f86d709921aaa1974

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58348/ Subject: LU-16518 lustre: fix implicit-fallthrough warnings Project: fs/lustre-release Branch: master Current Patch Set: Commit: f7b1fea6bff50c190e9e644f86d709921aaa1974

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58347/
            Subject: LU-16518 mdt: implicit truncation to a one-bit field
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 4d72b73d807168746f8a17bfb947df3fe6ceb95d

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58347/ Subject: LU-16518 mdt: implicit truncation to a one-bit field Project: fs/lustre-release Branch: master Current Patch Set: Commit: 4d72b73d807168746f8a17bfb947df3fe6ceb95d

            "Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/58553
            Subject: LU-16518 mgs: remove dt2msg_obj/dev() and friends
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: ed1443735bab1e844208a8a13a1d333d328348ba

            gerrit Gerrit Updater added a comment - "Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/58553 Subject: LU-16518 mgs: remove dt2msg_obj/dev() and friends Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: ed1443735bab1e844208a8a13a1d333d328348ba

            "Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/58552
            Subject: LU-16518 lnet: remove unused lnet_find_peer_net_locked()
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 2633552ed8d2b1f888968c32b8ea615a1abb687c

            gerrit Gerrit Updater added a comment - "Timothy Day <timday@amazon.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/58552 Subject: LU-16518 lnet: remove unused lnet_find_peer_net_locked() Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 2633552ed8d2b1f888968c32b8ea615a1abb687c

            "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58414/
            Subject: LU-16518 lu: remove unused functions in lu_object.h
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: fdeb9320e1ceefb9d2b3acf73da9eebd03491660

            gerrit Gerrit Updater added a comment - "Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/58414/ Subject: LU-16518 lu: remove unused functions in lu_object.h Project: fs/lustre-release Branch: master Current Patch Set: Commit: fdeb9320e1ceefb9d2b3acf73da9eebd03491660

            People

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

              Dates

                Created:
                Updated:
                Resolved: