Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-14748

gcc9 (RHEL 7.x with devtoolset-9) build failure (5.4.x kernel)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.15.0
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      Building master with gcc9 shows some build warnings.

      log_reader.c: In function ‘lustre_swab_lu_fid’:
      llog_reader.c:781:12: error: taking address of packed member of ‘struct lu_fid’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
        781 |  __swab64s(&fid->f_seq);
            |            ^~~~~~~~~~~
      llog_reader.c:782:12: error: taking address of packed member of ‘struct lu_fid’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
        782 |  __swab32s(&fid->f_oid);
            |            ^~~~~~~~~~~
      llog_reader.c:783:12: error: taking address of packed member of ‘struct lu_fid’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
        783 |  __swab32s(&fid->f_ver);
            |            ^~~~~~~~~~~
      llog_reader.c: In function ‘lustre_swab_update_ops’:
      llog_reader.c:811:13: error: taking address of packed member of ‘struct update_op’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
        811 |   __swab16s(&op->uop_type);
            |             ^~~~~~~~~~~~~
      llog_reader.c:812:13: error: taking address of packed member of ‘struct update_op’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
        812 |   __swab16s(&op->uop_param_count);
            |             ^~~~~~~~~~~~~~~~~~~~
      llog_reader.c:814:14: error: taking address of packed member of ‘struct update_op’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
        814 |    __swab16s(&op->uop_params_off[j]);
            |              ^~~~~~~~~~~~~~~~~~~~~~
      llog_reader.c: In function ‘print_update_rec’:
      llog_reader.c:908:15: error: converting a packed ‘struct update_op’ pointer (alignment 1) to a ‘struct object_update_param’ pointer (alignment 4) may result in an unaligned pointer value [-Werror=address-of-packed-member]
        908 |  pm = (struct object_update_param *) op;
            |               ^~~~~~~~~~~~~~~~~~~
      In file included from /home/shaun/lustre-release/lustre/include/uapi/linux/lustre/lustre_fid.h:41,
                       from llog_reader.c:57:
      /home/shaun/lustre-release/lustre/include/uapi/linux/lustre/lustre_idl.h:3501:8: note: defined here
       3501 | struct update_op {
            |        ^~~~~~~~~
      /home/shaun/lustre-release/lustre/include/uapi/linux/lustre/lustre_idl.h:3400:8: note: defined here
       3400 | struct object_update_param {
            |        ^~~~~~~~~~~~~~~~~~~
      cc1: all warnings being treated as errors
      make[4]: *** [Makefile:1448: llog_reader.o] Error 1
      make[4]: Leaving directory '/home/shaun/lustre-release/lustre/utils'
      make[3]: *** [Makefile:1855: all-recursive] Error 1
      make[3]: Leaving directory '/home/shaun/lustre-release/lustre/utils'
      make[2]: *** [autoMakefile:489: all-recursive] Error 1
      make[2]: Leaving directory '/home/shaun/lustre-release/lustre'
      make[1]: *** [autoMakefile:592: all-recursive] Error 1
      make[1]: Leaving directory '/home/shaun/lustre-release'
      make: *** [autoMakefile:483: all] Error 2
      
      

      Attachments

        Issue Links

          Activity

            People

              stancheff Shaun Tancheff
              stancheff Shaun Tancheff
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: