[LU-5224] Lustre client build failed with Mellanox OFED Created: 18/Jun/14  Updated: 14/Aug/14  Resolved: 12/Aug/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.4.1, Lustre 2.5.0, Lustre 2.5.1
Fix Version/s: Lustre 2.6.0, Lustre 2.5.3

Type: Bug Priority: Minor
Reporter: wu libin (Inactive) Assignee: Minh Diep
Resolution: Fixed Votes: 0
Labels: patch
Environment:

SLES11 SP3 X86_64, with MLNX_OFED_LINUX-2.2-1.0.1


Epic/Theme: lnet
Severity: 3
Epic: client, lnet
Rank (Obsolete): 14558

 Description   

I am try to compile lustre client rpms on SLES11 SP3 with the MLNX_OFED-2.2:
1. ./configure --disable-server --disable-test --with-o2ib=/usr/src/ofa_kernel/default/
It success,
2. make, it failed with this message:
In file included from /usr/src/linux-3.0.76-0.11/include/linux/netdevice.h:34,
from /usr/src/linux-3.0.76-0.11/include/net/sock.h:50,
from /home/lustre-hpdd/lnet/klnds/o2iblnd/o2iblnd.h:66,
from /home/lustre-hpdd/lnet/klnds/o2iblnd/o2iblnd.c:41:
/usr/src/ofa_kernel/default/include/linux/pm_qos_params.h:27: error: ‘LINUX_BACKPORT’ declared as function returning a function
cc1: warnings being treated as errors
/usr/src/ofa_kernel/default/include/linux/pm_qos_params.h:27: error: parameter names (without types) in function declaration
/usr/src/ofa_kernel/default/include/linux/pm_qos_params.h:29: error: ‘LINUX_BACKPORT’ declared as function returning a function
/usr/src/ofa_kernel/default/include/linux/pm_qos_params.h:29: error: parameter names (without types) in function declaration
/usr/src/ofa_kernel/default/include/linux/pm_qos_params.h:31: error: ‘LINUX_BACKPORT’ declared as function returning a function
/usr/src/ofa_kernel/default/include/linux/pm_qos_params.h:31: error: parameter names (without types) in function declaration
/usr/src/ofa_kernel/default/include/linux/pm_qos_params.h:34: error: ‘LINUX_BACKPORT’ declared as function returning a function
/usr/src/ofa_kernel/default/include/linux/pm_qos_params.h:34: error: parameter names (without types) in function declaration
/usr/src/ofa_kernel/default/include/linux/pm_qos_params.h:37: error: ‘LINUX_BACKPORT’ declared as function returning a function
/usr/src/ofa_kernel/default/include/linux/pm_qos_params.h:37: error: parameter names (without types) in function declaration
/usr/src/ofa_kernel/default/include/linux/pm_qos_params.h:39: error: ‘LINUX_BACKPORT’ declared as function returning a function
/usr/src/ofa_kernel/default/include/linux/pm_qos_params.h:39: error: parameter names (without types) in function declaration
In file included from /usr/src/linux-3.0.76-0.11/include/net/sock.h:50,
from /home/lustre-hpdd/lnet/klnds/o2iblnd/o2iblnd.h:66,
from /home/lustre-hpdd/lnet/klnds/o2iblnd/o2iblnd.c:41:
/usr/src/linux-3.0.76-0.11/include/linux/netdevice.h:1064: error: field ‘pm_qos_req’ has incomplete type
make[9]: *** [/home/lustre-hpdd/lnet/klnds/o2iblnd/o2iblnd.o] Error 1
make[8]: *** [/home/lustre-hpdd/lnet/klnds/o2iblnd] Error 2
make[7]: *** [/home/lustre-hpdd/lnet/klnds] Error 2
make[6]: *** [/home/lustre-hpdd/lnet] Error 2
make[5]: *** [_module_/home/lustre-hpdd] Error 2
make[4]: *** [sub-make] Error 2
make[3]: *** [all] Error 2
make[3]: Leaving directory `/usr/src/linux-3.0.76-0.11-obj/x86_64/default'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/home/lustre-hpdd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/lustre-hpdd'
make: *** [all] Error 2



 Comments   
Comment by Bob Glossman (Inactive) [ 19/Jun/14 ]

I see a proposed solution at http://review.whamcloud.com/#/c/10749. our regular autotest doesn't build with MLNX ofed stack so only shows the change doesn't break regular builds. Can anybody confirm the fix does fix the build with MLNX on more than one distro? I'm concerned to know that a fix tried on sles11sp3 doesn't break anything on el6, for example.

Comment by James A Simmons [ 07/Jul/14 ]

Patch for master has landed. Back ported patch for b2_5 is at http://review.whamcloud.com/#/c/10819

Comment by Jay Lan (Inactive) [ 06/Aug/14 ]

The #10819 patch did not help us. We hit the same problem in building 2.4.3 against MLNX 2.2. Kernel is sles11sp3 3.0.101-0.31.1.

...
make[5]: Entering directory `/usr/src/linux-3.0.101-0.31.1.20140612nasa-obj/x86_64/nasa'
In file included from /usr/src/linux-3.0.101-0.31.1.20140612nasa/include/linux/netdevice.h:35,
from /usr/src/linux-3.0.101-0.31.1.20140612nasa/include/net/sock.h:51,
from /usr/src/packages/BUILD/lustre-2.4.3/libcfs/include/libcfs/linux/linux-tcpip.h:53,
from /usr/src/packages/BUILD/lustre-2.4.3/libcfs/include/libcfs/linux/libcfs.h:57,
from /usr/src/packages/BUILD/lustre-2.4.3/libcfs/include/libcfs/libcfs.h:48,
from /usr/src/packages/BUILD/lustre-2.4.3/libcfs/libcfs/linux/linux-tracefile.c:41:
/usr/src/ofa_kernel/nasa/include/linux/pm_qos_params.h:27: error: 'LINUX_BACKPORT' declared as function returning a function
cc1: warnings being treated as errors
/usr/src/ofa_kernel/nasa/include/linux/pm_qos_params.h:27: error: parameter names (without types) in function declaration
/usr/src/ofa_kernel/nasa/include/linux/pm_qos_params.h:29: error: 'LINUX_BACKPORT' declared as function returning a function
/usr/src/ofa_kernel/nasa/include/linux/pm_qos_params.h:29: error: parameter names (without types) in function declaration
/usr/src/ofa_kernel/nasa/include/linux/pm_qos_params.h:31: error: 'LINUX_BACKPORT' declared as function returning a function
/usr/src/ofa_kernel/nasa/include/linux/pm_qos_params.h:31: error: parameter names (without types) in function declaration
/usr/src/ofa_kernel/nasa/include/linux/pm_qos_params.h:34: error: 'LINUX_BACKPORT' declared as function returning a function
/usr/src/ofa_kernel/nasa/include/linux/pm_qos_params.h:34: error: parameter names (without types) in function declaration
/usr/src/ofa_kernel/nasa/include/linux/pm_qos_params.h:37: error: 'LINUX_BACKPORT' declared as function returning a function
/usr/src/ofa_kernel/nasa/include/linux/pm_qos_params.h:37: error: parameter names (without types) in function declaration
/usr/src/ofa_kernel/nasa/include/linux/pm_qos_params.h:39: error: 'LINUX_BACKPORT' declared as function returning a function
/usr/src/ofa_kernel/nasa/include/linux/pm_qos_params.h:39: error: parameter names (without types) in function declaration
In file included from /usr/src/linux-3.0.101-0.31.1.20140612nasa/include/net/sock.h:51,
from /usr/src/packages/BUILD/lustre-2.4.3/libcfs/include/libcfs/linux/linux-tcpip.h:53,
from /usr/src/packages/BUILD/lustre-2.4.3/libcfs/include/libcfs/linux/libcfs.h:57,
from /usr/src/packages/BUILD/lustre-2.4.3/libcfs/include/libcfs/libcfs.h:48,
from /usr/src/packages/BUILD/lustre-2.4.3/libcfs/libcfs/linux/linux-tracefile.c:41:
/usr/src/linux-3.0.101-0.31.1.20140612nasa/include/linux/netdevice.h:1064: error: field 'pm_qos_req' has incomplete type
make[10]: *** [/usr/src/packages/BUILD/lustre-2.4.3/libcfs/libcfs/linux/linux-tracefile.o] Error 1

Comment by Jay Lan (Inactive) [ 06/Aug/14 ]

There are more than one ways to end up with /usr/src/ofa_kernel/nasa/include/linux/pm_qos_params.h.

Why don't we just add
-DCOFIG_COMPAT_PM_QOS
to
EXTRA_LNET_INCLUDE="$EXTRA_LNET_INCLUDE -DCONFIG_COMPAT_SLES_11_$SP -DCONFIG_COMPAT_PM_QOS"

in config/lustre-build-linux.m4? Worked for me, and #10819 is not needed any more.

Comment by James A Simmons [ 06/Aug/14 ]

Does this only happen for the 2.4 code base? Do we need this fix for 2.5 as well.

Comment by Jay Lan (Inactive) [ 07/Aug/14 ]

I believe so. Fixing at o2iblnd.h (as in #10819) is not a correct fix. The build of my 2.5.1 client failed on lustre/lmv/lproc_lmv.c.

Comment by Peter Jones [ 12/Aug/14 ]

This looks like it was landed for 2.6

Generated at Sat Feb 10 01:49:36 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.