[LU-9118] Failed to build MOFED 3.4-1.0.0 Created: 10/Feb/17  Updated: 02/Mar/17  Resolved: 02/Mar/17

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.10.0
Fix Version/s: Lustre 2.10.0

Type: Bug Priority: Minor
Reporter: Minh Diep Assignee: James A Simmons
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocker
Related
Severity: 3
Rank (Obsolete): 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) {
                   ^


 Comments   
Comment by James A Simmons [ 14/Feb/17 ]

Oh no we are colliding again with compact from MLX.

Comment by James A Simmons [ 14/Feb/17 ]

MInh can you try patch https://review.whamcloud.com/#/c/24919 with MLX OFED as well. I like to see the amount of conflict with the remaining 64 bit time work.

Comment by Minh Diep [ 14/Feb/17 ]

James, we still hit the same error. I guess your changed is after this error

Comment by James A Simmons [ 14/Feb/17 ]

I just wanted to see if ktime_get_ns() is the only problem.

Comment by Minh Diep [ 14/Feb/17 ]

you need to fix ktime_get_real_ns first

Comment by James A Simmons [ 21/Feb/17 ]

I'm installing a MOFED 4 stack on our system. Will push something soon.

Comment by Gerrit Updater [ 21/Feb/17 ]

James Simmons (uja.ornl@yahoo.com) uploaded a new patch: https://review.whamcloud.com/25564
Subject: LU-9118 o2iblnd: handle MOFED libcfs time api collision
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 25f64d4aeb292d42ccafbd8568476df4f32b9e7c

Comment by Bob Glossman (Inactive) [ 22/Feb/17 ]

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?

Comment by James A Simmons [ 22/Feb/17 ]

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.

Comment by Minh Diep [ 22/Feb/17 ]

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

 

Comment by James A Simmons [ 22/Feb/17 ]

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

Comment by Dmitry Eremin (Inactive) [ 23/Feb/17 ]

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

Comment by James A Simmons [ 23/Feb/17 ]

Does my patch help you Dmitry

Comment by Dmitry Eremin (Inactive) [ 23/Feb/17 ]

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.

Comment by Minh Diep [ 23/Feb/17 ]
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

Comment by Dmitry Eremin (Inactive) [ 23/Feb/17 ]

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)
    
    
Comment by Dmitry Eremin (Inactive) [ 23/Feb/17 ]

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.

Comment by James A Simmons [ 24/Feb/17 ]

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

 

Comment by Gerrit Updater [ 02/Mar/17 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/25564/
Subject: LU-9118 o2iblnd: handle MOFED libcfs time api collision
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: f548d1a00eaf705607b0c1eac254c95e3905f5b2

Comment by James A Simmons [ 02/Mar/17 ]

MOFED 3.4 support is restored.

Comment by Minh Diep [ 02/Mar/17 ]

Landed in Lustre 2.10

Generated at Sat Feb 10 02:23:23 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.