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

config.h header conflict with OFED 3.18

Details

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

    Description

      This issue was mentioned on the mailing list, but we just hit it ourselves attempting to build Lustre 2.7 on SLES 12 with OFED 3.18.

      [  128s] In file included from /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/compat-2.6.h:7:0,
      [  128s]                  from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.h:67,
      [  128s]                  from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.c:42:
      [  128s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/../../compat/config.h:398:0: error: "PACKAGE_BUGREPORT" redefined [-Werror]
      [  128s]  #define PACKAGE_BUGREPORT "http://bugs.openfabrics.org/bugzilla"
      [  128s]  ^
      [  128s] In file included from <command-line>:0:0:
      [  128s] /home/abuild/rpmbuild/BUILD/cray-lustre/config.h:558:0: note: this is the location of the previous definition
      [  128s]  #define PACKAGE_BUGREPORT "https://jira.hpdd.intel.com/"
      [  128s]  ^
      [  128s] In file included from /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/compat-2.6.h:7:0,
      [  128s]                  from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.h:67,
      [  128s]                  from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.c:42:
      [  128s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/../../compat/config.h:401:0: error: "PACKAGE_NAME" redefined [-Werror]
      [  128s]  #define PACKAGE_NAME "compat_ofa"
      [  128s]  ^
      [  128s] In file included from <command-line>:0:0:
      [  128s] /home/abuild/rpmbuild/BUILD/cray-lustre/config.h:561:0: note: this is the location of the previous definition
      [  128s]  #define PACKAGE_NAME "Lustre"
      [  128s]  ^
      [  128s] In file included from /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/compat-2.6.h:7:0,
      [  128s]                  from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.h:67,
      [  128s]                  from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.c:42:
      [  128s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/../../compat/config.h:404:0: error: "PACKAGE_STRING" redefined [-Werror]
      [  128s]  #define PACKAGE_STRING "compat_ofa 1.0"
      [  128s]  ^
      [  128s] In file included from <command-line>:0:0:
      [  128s] /home/abuild/rpmbuild/BUILD/cray-lustre/config.h:564:0: note: this is the location of the previous definition
      [  128s]  #define PACKAGE_STRING "Lustre LUSTRE_VERSION"
      [  128s]  ^
      [  128s] In file included from /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/compat-2.6.h:7:0,
      [  128s]                  from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.h:67,
      [  128s]                  from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.c:42:
      [  128s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/../../compat/config.h:407:0: error: "PACKAGE_TARNAME" redefined [-Werror]
      [  128s]  #define PACKAGE_TARNAME "compat_ofa"
      [  128s]  ^
      [  128s] In file included from <command-line>:0:0:
      [  128s] /home/abuild/rpmbuild/BUILD/cray-lustre/config.h:567:0: note: this is the location of the previous definition
      [  128s]  #define PACKAGE_TARNAME "lustre"
      [  128s]  ^
      [  128s] In file included from /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/compat-2.6.h:7:0,
      [  128s]                  from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.h:67,
      [  128s]                  from /home/abuild/rpmbuild/BUILD/cray-lustre/lnet/klnds/o2iblnd/o2iblnd.c:42:
      [  128s] /usr/src/kernel-modules-ofed/x86_64/cray_ari_s/include/linux/../../compat/config.h:413:0: error: "PACKAGE_VERSION" redefined [-Werror]
      [  128s]  #define PACKAGE_VERSION "1.0"
      [  128s]  ^
      [  128s] In file included from <command-line>:0:0:
      [  128s] /home/abuild/rpmbuild/BUILD/cray-lustre/config.h:573:0: note: this is the location of the previous definition
      [  128s]  #define PACKAGE_VERSION "LUSTRE_VERSION"
      [  128s]  ^
      

      It seems OFED 3.18 now automatically generates a config.h in the same fashion that Lustre does, and these PACKAGE_* defines in the two config.h files are conflicting.

      Attachments

        Issue Links

          Activity

            [LU-7042] config.h header conflict with OFED 3.18
            pjones Peter Jones added a comment -

            Landed for 2.8

            pjones Peter Jones added a comment - Landed for 2.8

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16418/
            Subject: LU-7042 lnet: Handle OFED 3.18 packaging definitions
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: bfa4bc911208f7a7a447984a40266c70ad8814ab

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16418/ Subject: LU-7042 lnet: Handle OFED 3.18 packaging definitions Project: fs/lustre-release Branch: master Current Patch Set: Commit: bfa4bc911208f7a7a447984a40266c70ad8814ab

            This is very serious issue because of all checks will fail if they include <compact-2.6.h> which redefine PACKAGE_* macros.

            | /* confdefs.h.  */
            | #define PACKAGE_NAME "Lustre"
            | #define PACKAGE_TARNAME "lustre"
            | #define PACKAGE_VERSION "LUSTRE_VERSION"
            | #define PACKAGE_STRING "Lustre LUSTRE_VERSION"
            | #define PACKAGE_BUGREPORT "https://jira.hpdd.intel.com/"
            | #define PACKAGE "lustre"
            | #define VERSION "2.7.59"
            | #define STDC_HEADERS 1
            | #define HAVE_SYS_TYPES_H 1
            | #define HAVE_SYS_STAT_H 1
            | #define HAVE_STDLIB_H 1
            | #define HAVE_STRING_H 1
            | #define HAVE_MEMORY_H 1
            | #define HAVE_STRINGS_H 1
            | #define HAVE_INTTYPES_H 1
            | #define HAVE_STDINT_H 1
            | #define HAVE_UNISTD_H 1
            | #define HAVE_DLFCN_H 1
            | #define LT_OBJDIR ".libs/"
            | #define SIZEOF_UNSIGNED_LONG_LONG 8
            | #define HAVE_MODULE_LOADING_SUPPORT 1
            | #define STACKTRACE_OPS_HAVE_WALK_STACK 1
            | #define HAVE_SHRINKER_WANT_SHRINK_PTR 1
            | #define HAVE_SYSCTL_CTLNAME 1
            | #define HAVE_KSTRTOUL 1
            | #define HAVE_STACKTRACE_WARNING 1
            | #define HAVE_CRC32 1
            | #define NEED_CRC32_ACCEL 1
            | #define HAVE_HLIST_ADD_AFTER 1
            | #define CPU_AFFINITY 1
            | #define HAVE_COMPAT_RDMA 1
            | #define HAVE_KTHREAD_WORK 1
            | #define HAVE_RDMA_CREATE_ID_4ARG 1
            | /* end confdefs.h.  */
            |
            | #include <linux/kernel.h>
            |
            |               #ifdef HAVE_COMPAT_RDMA
            |               #include <linux/compat-2.6.h>
            |               #endif
            |               #include <rdma/ib_verbs.h>
            |
            | int
            | main (void)
            | {
            |
            |               struct ib_cq_init_attr cq_attr;
            |
            |               cq_attr.comp_vector = NULL;
            |
            |   ;
            |   return 0;
            | }
            

            My patch resolve this issue.

            dmiter Dmitry Eremin (Inactive) added a comment - This is very serious issue because of all checks will fail if they include <compact-2.6.h> which redefine PACKAGE_* macros. | /* confdefs.h. */ | #define PACKAGE_NAME "Lustre" | #define PACKAGE_TARNAME "lustre" | #define PACKAGE_VERSION "LUSTRE_VERSION" | #define PACKAGE_STRING "Lustre LUSTRE_VERSION" | #define PACKAGE_BUGREPORT "https: //jira.hpdd.intel.com/" | #define PACKAGE "lustre" | #define VERSION "2.7.59" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define SIZEOF_UNSIGNED_LONG_LONG 8 | #define HAVE_MODULE_LOADING_SUPPORT 1 | #define STACKTRACE_OPS_HAVE_WALK_STACK 1 | #define HAVE_SHRINKER_WANT_SHRINK_PTR 1 | #define HAVE_SYSCTL_CTLNAME 1 | #define HAVE_KSTRTOUL 1 | #define HAVE_STACKTRACE_WARNING 1 | #define HAVE_CRC32 1 | #define NEED_CRC32_ACCEL 1 | #define HAVE_HLIST_ADD_AFTER 1 | #define CPU_AFFINITY 1 | #define HAVE_COMPAT_RDMA 1 | #define HAVE_KTHREAD_WORK 1 | #define HAVE_RDMA_CREATE_ID_4ARG 1 | /* end confdefs.h. */ | | #include <linux/kernel.h> | | #ifdef HAVE_COMPAT_RDMA | #include <linux/compat-2.6.h> | #endif | #include <rdma/ib_verbs.h> | | int | main (void) | { | | struct ib_cq_init_attr cq_attr; | | cq_attr.comp_vector = NULL; | | ; | return 0; | } My patch resolve this issue.

            Dmitry Eremin (dmitry.eremin@intel.com) uploaded a new patch: http://review.whamcloud.com/16418
            Subject: LU-7042 lnet: Handle OFED 3.18 packaging definitions
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: c0cd81795f38da5225022b52319ae5d90a802a72

            gerrit Gerrit Updater added a comment - Dmitry Eremin (dmitry.eremin@intel.com) uploaded a new patch: http://review.whamcloud.com/16418 Subject: LU-7042 lnet: Handle OFED 3.18 packaging definitions Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: c0cd81795f38da5225022b52319ae5d90a802a72

            James Simmons (uja.ornl@yahoo.com) uploaded a new patch: http://review.whamcloud.com/16381
            Subject: LU-7042 ofed: Handle OFED 3.18 packaging definitions
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: f9f1ed5e8da106512ea7dc618b578e984edb0937

            gerrit Gerrit Updater added a comment - James Simmons (uja.ornl@yahoo.com) uploaded a new patch: http://review.whamcloud.com/16381 Subject: LU-7042 ofed: Handle OFED 3.18 packaging definitions Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: f9f1ed5e8da106512ea7dc618b578e984edb0937

            Hmmm. The only solution I can think of is doing #undef PACKAGE_XXX after #include <compact-2.6.h>

            simmonsja James A Simmons added a comment - Hmmm. The only solution I can think of is doing #undef PACKAGE_XXX after #include <compact-2.6.h>

            That is resulting from the macro AC_PACKAGE_NAME which is pretty standard in usage.

            simmonsja James A Simmons added a comment - That is resulting from the macro AC_PACKAGE_NAME which is pretty standard in usage.

            People

              dmiter Dmitry Eremin (Inactive)
              hornc Chris Horn
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: