Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • Lustre 2.11.0
    • Lustre 2.11.0
    • None
    • gcc7
    • 9223372036854775807

    Description

      Lustre doesn't build with newer gcc7 due to many different warnings. some are easier to fix in the code. another are rather false (see an example below) and easier to supress.

      util/parser.c:575:25: error: ‘%2d’ directive output may be truncated writing between 2 and 10 bytes into a region of size 4 [-Werror=format-truncation=]

      Attachments

        Issue Links

          Activity

            [LU-9934] support gcc7

            Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33160
            Subject: LU-9934 build: address issues raised by gcc7
            Project: fs/lustre-release
            Branch: b2_10
            Current Patch Set: 1
            Commit: 3b90539df347a9669bda22691855f98b4f7c06b1

            gerrit Gerrit Updater added a comment - Minh Diep (mdiep@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/33160 Subject: LU-9934 build: address issues raised by gcc7 Project: fs/lustre-release Branch: b2_10 Current Patch Set: 1 Commit: 3b90539df347a9669bda22691855f98b4f7c06b1

            Li Dongyang (dongyangli@ddn.com) uploaded a new patch: https://review.whamcloud.com/31791
            Subject: LU-9934 build: fix gcc7 complains in lprocfs_status_server.c
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: ca080cc5877ed4bb521c03466f92324760d5ff9f

            gerrit Gerrit Updater added a comment - Li Dongyang (dongyangli@ddn.com) uploaded a new patch: https://review.whamcloud.com/31791 Subject: LU-9934 build: fix gcc7 complains in lprocfs_status_server.c Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: ca080cc5877ed4bb521c03466f92324760d5ff9f
            pjones Peter Jones added a comment -

            Landed for 2.11

            pjones Peter Jones added a comment - Landed for 2.11

            Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28810/
            Subject: LU-9934 build: support for gcc7
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: 4b67e5a8150309f4bbeb43a9095f12243be6dcfa

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/28810/ Subject: LU-9934 build: support for gcc7 Project: fs/lustre-release Branch: master Current Patch Set: Commit: 4b67e5a8150309f4bbeb43a9095f12243be6dcfa

            Thanks. I also see another patch just landed that break Ubuntu17 builds again  Its in lnetconfig library.

            simmonsja James A Simmons added a comment - Thanks. I also see another patch just landed that break Ubuntu17 builds again  Its in lnetconfig library.

            I've updated my patch (now much smaller) to be able to build with gcc7
            notice #include <sys/sysmacros.h>
            w/o that I'm getting this:

            libmount_utils_ldiskfs.c: In function ‘tune_block_dev’:
            libmount_utils_ldiskfs.c:1234:13: error: In the GNU C Library, "major" is defined
            by <sys/sysmacros.h>. For historical compatibility, it is
            currently defined by <sys/types.h> as well, but we plan to
            remove this soon. To use "major", include <sys/sysmacros.h>
            directly. If you did not intend to use a system-defined macro
            "major", you should undefine it after including <sys/types.h>. [-Werror]
            if (major(st.st_rdev) == LOOP_MAJOR)
            ^~~~~~~~~~~~~~~~~~~~~~~~~

            bzzz Alex Zhuravlev added a comment - I've updated my patch (now much smaller) to be able to build with gcc7 notice #include <sys/sysmacros.h> w/o that I'm getting this: libmount_utils_ldiskfs.c: In function ‘tune_block_dev’: libmount_utils_ldiskfs.c:1234:13: error: In the GNU C Library, "major" is defined by <sys/sysmacros.h>. For historical compatibility, it is currently defined by <sys/types.h> as well, but we plan to remove this soon. To use "major", include <sys/sysmacros.h> directly. If you did not intend to use a system-defined macro "major", you should undefine it after including <sys/types.h>. [-Werror] if (major(st.st_rdev) == LOOP_MAJOR) ^~~~~~~~~~~~~~~~~~~~~~~~~

            what's wrong with -Wno-format-truncation ?

            bzzz Alex Zhuravlev added a comment - what's wrong with -Wno-format-truncation ?

            I'm still getting those errors with gcc7.. will it be another patch?

            bzzz Alex Zhuravlev added a comment - I'm still getting those errors with gcc7.. will it be another patch?

            going to check in my setup today.

            bzzz Alex Zhuravlev added a comment - going to check in my setup today.
            pjones Peter Jones added a comment -

            Alex

            Does your patch need to land too or was James's sufficient?

            Peter

            pjones Peter Jones added a comment - Alex Does your patch need to land too or was James's sufficient? Peter

            People

              bzzz Alex Zhuravlev
              bzzz Alex Zhuravlev
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: