Details

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

    Description

      + make -j4 -s
      Making all in .
      In file included from /tmp/rpmbuild-lustre-jenkins-2HDIMGOt/BUILD/lustre-2.9.52_82_gb2d45e0/libcfs/include/libcfs/linux/libcfs.h:85:0,
                       from /tmp/rpmbuild-lustre-jenkins-2HDIMGOt/BUILD/lustre-2.9.52_82_gb2d45e0/libcfs/include/libcfs/libcfs.h:37,
                       from /tmp/rpmbuild-lustre-jenkins-2HDIMGOt/BUILD/lustre-2.9.52_82_gb2d45e0/lnet/klnds/o2iblnd/o2iblnd.h:77,
                       from /tmp/rpmbuild-lustre-jenkins-2HDIMGOt/BUILD/lustre-2.9.52_82_gb2d45e0/lnet/klnds/o2iblnd/o2iblnd.c:38:
      /tmp/rpmbuild-lustre-jenkins-2HDIMGOt/BUILD/lustre-2.9.52_82_gb2d45e0/libcfs/include/libcfs/linux/linux-time.h:149:19: error: redefinition of 'ktime_get_real_ns'
       static inline u64 ktime_get_real_ns(void)
                         ^
      In file included from /var/lib/jenkins/workspace/lustre-reviews-ib/arch/x86_64/build_type/client/distro/sles12/ib_stack/mlx/BUILD/mlnx-ofa_kernel-devel/usr/src/ofa_kernel/default/include/linux/compat-2.6.h:82:0,
                       from <command-line>:0:
      /var/lib/jenkins/workspace/lustre-reviews-ib/arch/x86_64/build_type/client/distro/sles12/ib_stack/mlx/BUILD/mlnx-ofa_kernel-devel/usr/src/ofa_kernel/default/include/linux/compat-3.17.h:12:19: note: previous definition of 'ktime_get_real_ns' was here
       static inline u64 ktime_get_real_ns(void) {
                         ^
      

      Attachments

        Activity

          [LU-9118] Failed to build MOFED 3.4-1.0.0

          I just looked at the OFED-3.18 source and compat-3.16.h unconditionally create ktime_get_ns(). I can't turn off the collision like I did for ktime_get_real_ns(). Their is nothing I can do

           

          simmonsja James A Simmons added a comment - I just looked at the OFED-3.18 source and compat-3.16.h unconditionally create ktime_get_ns(). I can't turn off the collision like I did for ktime_get_real_ns(). Their is nothing I can do  

          I miss this is not related to Lustre code.But it have the same issue. So, the patch can be the same but for OFED-3.18-3.

          dmiter Dmitry Eremin (Inactive) added a comment - I miss this is not related to Lustre code.But it have the same issue. So, the patch can be the same but for OFED-3.18-3.

          The complains was following:

          For centos 7 kernel 3.10.0-514. OFED 3.18-3 installation fails during compilation.

          1. uname -a
            Linux x 3.10.0-514.el7_lustre.x86_64 #1 SMP Wed Dec 7 15:50:02 PST 2016 x86_64 x86_64 x86_64 GNU/Linux
            In file included from /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-2.6.h:75:0,
                             from <command-line>:0:
            /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-3.16.h:25:19: error: redefinition of ‘ktime_get_ns’
            static inline u64 ktime_get_ns(void)
                               ^
            In file included from /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-2.6.h:75:0,
                             from <command-line>:0:
            /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-3.16.h:25:19: error: redefinition of ‘ktime_get_ns’
            static inline u64 ktime_get_ns(void)
                               ^
            In file included from /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-2.6.h:75:0,
                             from <command-line>:0:
            /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-3.16.h:25:19: error: redefinition of ‘ktime_get_ns’
            static inline u64 ktime_get_ns(void)
                               ^
            In file included from include/linux/ktime.h:442:0,
                             from include/linux/timer.h:5,
                             from include/linux/workqueue.h:8,
                             from include/linux/pm.h:25,
                             from ./arch/x86/include/asm/apic.h:5,
                             from ./arch/x86/include/asm/smp.h:12,
                             from include/linux/smp.h:43,
                             from include/linux/percpu.h:6,
                             from /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/percpu.h:6,
                             from include/linux/percpu-rwsem.h:6,
                             from include/linux/fs.h:28,
                             from /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-3.5.h:5,
                             from /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-2.6.h:64,
                             from <command-line>:0:
            include/linux/timekeeping.h:170:19: note: previous definition of ‘ktime_get_ns’ was here
            static inline u64 ktime_get_ns(void)
            
            
          dmiter Dmitry Eremin (Inactive) added a comment - The complains was following: For centos 7 kernel 3.10.0-514. OFED 3.18-3 installation fails during compilation. uname -a Linux x 3.10.0-514.el7_lustre.x86_64 #1 SMP Wed Dec 7 15:50:02 PST 2016 x86_64 x86_64 x86_64 GNU/Linux In file included from /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-2.6.h:75:0, from <command-line>:0: /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-3.16.h:25:19: error: redefinition of ‘ktime_get_ns’ static inline u64 ktime_get_ns(void) ^ In file included from /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-2.6.h:75:0, from <command-line>:0: /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-3.16.h:25:19: error: redefinition of ‘ktime_get_ns’ static inline u64 ktime_get_ns(void) ^ In file included from /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-2.6.h:75:0, from <command-line>:0: /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-3.16.h:25:19: error: redefinition of ‘ktime_get_ns’ static inline u64 ktime_get_ns(void) ^ In file included from include/linux/ktime.h:442:0, from include/linux/timer.h:5, from include/linux/workqueue.h:8, from include/linux/pm.h:25, from ./arch/x86/include/asm/apic.h:5, from ./arch/x86/include/asm/smp.h:12, from include/linux/smp.h:43, from include/linux/percpu.h:6, from /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/percpu.h:6, from include/linux/percpu-rwsem.h:6, from include/linux/fs.h:28, from /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-3.5.h:5, from /var/tmp/OFED_topdir/BUILD/compat-rdma-3.18/include/linux/compat-2.6.h:64, from <command-line>:0: include/linux/timekeeping.h:170:19: note: previous definition of ‘ktime_get_ns’ was here static inline u64 ktime_get_ns(void)
          mdiep Minh Diep added a comment -
          In file included from /var/lib/jenkins/workspace/lustre-reviews-ib/arch/x86_64/build_type/client/distro/el7/ib_stack/ofa/BUILD/BUILD/compat-rdma-3.18/include/linux/compat-2.6.h:75:0, from <command-line>:1: /var/lib/jenkins/workspace/lustre-reviews-ib/arch/x86_64/build_type/client/distro/el7/ib_stack/ofa/BUILD/BUILD/compat-rdma-3.18/include/linux/compat-3.16.h:25:59: error: redefinition of 'ktime_get_ns' static inline u64 ktime_get_ns(void) ^ In file included from include/linux/ktime.h:442:0, from include/linux/timer.h:5, from include/linux/workqueue.h:8, from include/linux/pm.h:25,
          

          I don't think we can verify on OFED 3.18-3 because OFED also broken on el7 with similar/same error

          mdiep Minh Diep added a comment - In file included from / var /lib/jenkins/workspace/lustre-reviews-ib/arch/x86_64/build_type/client/distro/el7/ib_stack/ofa/BUILD/BUILD/compat-rdma-3.18/include/linux/compat-2.6.h:75:0, from <command-line>:1: / var /lib/jenkins/workspace/lustre-reviews-ib/arch/x86_64/build_type/client/distro/el7/ib_stack/ofa/BUILD/BUILD/compat-rdma-3.18/include/linux/compat-3.16.h:25:59: error: redefinition of 'ktime_get_ns' static inline u64 ktime_get_ns(void) ^ In file included from include/linux/ktime.h:442:0, from include/linux/timer.h:5, from include/linux/workqueue.h:8, from include/linux/pm.h:25, I don't think we can verify on OFED 3.18-3 because OFED also broken on el7 with similar/same error

          James, I didn't reproduce this locally yet. I just got an issue report from our customer. I'm going to reproduce this and check this patch soon.

          dmiter Dmitry Eremin (Inactive) added a comment - James, I didn't reproduce this locally yet. I just got an issue report from our customer. I'm going to reproduce this and check this patch soon.

          Does my patch help you Dmitry

          simmonsja James A Simmons added a comment - Does my patch help you Dmitry
          dmiter Dmitry Eremin (Inactive) added a comment - - edited

          It looks this also affect the Open OFED 3.18-3.

          dmiter Dmitry Eremin (Inactive) added a comment - - edited It looks this also affect the Open OFED 3.18-3.

          Okay I figured out a solution. So both OFED and libcfs was setting HAVE_KTIME_GET_REAL_NS. So I inverted the logic of detection in libcfs, now NEED_KTIME_GET_REAL_NS and unset it in o2iblnd.h.  The logic is in the commit. Try the latest patch. Tested on RHEL7.2 + MOFED 3.3 and RHEL7.3 + MOFED 4.0 and SLES11SP3 + OFED12

          simmonsja James A Simmons added a comment - Okay I figured out a solution. So both OFED and libcfs was setting HAVE_KTIME_GET_REAL_NS. So I inverted the logic of detection in libcfs, now NEED_KTIME_GET_REAL_NS and unset it in o2iblnd.h.  The logic is in the commit. Try the latest patch. Tested on RHEL7.2 + MOFED 3.3 and RHEL7.3 + MOFED 4.0 and SLES11SP3 + OFED12
          mdiep Minh Diep added a comment -

          Yes, I confirmed that it failed in el6.8 too

           

          mdiep Minh Diep added a comment - Yes, I confirmed that it failed in el6.8 too  

          I tested it on MOFED 4 + RHEL7.3 but then I went to my Power8 RHEL7.2 + MOFED 3.3 which didn't work. I also have a Cray system with OFED 3.12 + SLES11SP3. The man problem is both MOFED and libcfs are setting HAVE_KTIME_GET_REAL_NS  So I need to rethink it.

          simmonsja James A Simmons added a comment - I tested it on MOFED 4 + RHEL7.3 but then I went to my Power8 RHEL7.2 + MOFED 3.3 which didn't work. I also have a Cray system with OFED 3.12 + SLES11SP3. The man problem is both MOFED and libcfs are setting HAVE_KTIME_GET_REAL_NS  So I need to rethink it.

          I hesitate to give this a +review. I can see the proposed solution works when building without MOFED. Can't see evidence of it working building with MOFED.

          James, have you tested build with MOFED on both el6 and el7 to cover both cases of finding and not finding ktime_get_real_ns in the kernel?

          bogl Bob Glossman (Inactive) added a comment - I hesitate to give this a +review. I can see the proposed solution works when building without MOFED. Can't see evidence of it working building with MOFED. James, have you tested build with MOFED on both el6 and el7 to cover both cases of finding and not finding ktime_get_real_ns in the kernel?

          People

            simmonsja James A Simmons
            mdiep Minh Diep
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: