Whamcloud - gitweb
LU-11541 build: Adjust OFED check for DKMS enabled MLNX OFED. 96/33396/10
authorAke Sandgren <ake.sandgren@hpc2n.umu.se>
Tue, 13 Nov 2018 17:48:22 +0000 (12:48 -0500)
committerOleg Drokin <green@whamcloud.com>
Wed, 21 Nov 2018 04:05:30 +0000 (04:05 +0000)
The DKMS packaging of MLNX OFED, i.e. mlnx-ofed-kernel-dkms, (at least
v4.4 and newer), doesn't have /usr/src/ofa_kernel/default as part of
the package, it is created as a link during package installation.

Restore LB_USES_DPKG autoconf test that was removed since it is needed
in lustre-lnet.m4 so Debian / Ubuntu can build properly with external
infiniband stacks.

Test-Parameters: trivial
Signed-off-by: Ake Sandgren <ake.sandgren@hpc2n.umu.se>
Change-Id: I1739a67e16bc0dab8cf551b460b424441d81fc91
Reviewed-on: https://review.whamcloud.com/33396
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
config/lustre-build-linux.m4
config/lustre-build.m4
lnet/autoconf/lustre-lnet.m4

index a1b5155..ba250e3 100644 (file)
@@ -412,6 +412,20 @@ LC_MODULE_LOADING
 ])
 
 #
+# LB_USES_DPKG
+#
+# Determine if the target is a dpkg system or rpm
+#
+AC_DEFUN([LB_USES_DPKG], [
+AC_CACHE_CHECK([if this distro uses dpkg], lb_cv_uses_dpkg, [
+lb_cv_uses_dpkg="no"
+AS_CASE([$(lsb_release -i -s 2>/dev/null)],
+       [Ubuntu | Debian], [lb_cv_uses_dpkg="yes"])
+])
+uses_dpkg=$lb_cv_uses_dpkg
+])
+
+#
 # LB_CHECK_EXPORT
 #
 # check symbol exported or not
index c2da79e..7fec7bb 100644 (file)
@@ -573,6 +573,7 @@ LB_CANONICAL_SYSTEM
 LB_CONFIG_DIST
 
 LB_DOWNSTREAM_RELEASE
+LB_USES_DPKG
 
 LB_LIBCFS_DIR
 
index 8607f57..f5b084a 100644 (file)
@@ -114,7 +114,7 @@ case $with_o2ib in
                                OFED_INFO="ofed_info"
                                LSPKG="rpm -ql"
                        ])
-                       O2IBPATHS=$(eval $OFED_INFO | egrep -w 'mlnx-ofed-kernel-dkms|mlnx-ofa_kernel-devel|compat-rdma-devel|kernel-ib-devel|ofa_kernel-devel' | xargs $LSPKG | grep '\(/openib\|/ofa_kernel/default\)$' | head -n1)
+                       O2IBPATHS=$(eval $OFED_INFO | egrep -w 'mlnx-ofed-kernel-dkms|mlnx-ofa_kernel-devel|compat-rdma-devel|kernel-ib-devel|ofa_kernel-devel' | xargs $LSPKG | grep '\(/openib\|/ofa_kernel/default\|/ofa_kernel\)$' | head -n1)
                        AS_IF([test -z "$O2IBPATHS"], [
                                AC_MSG_ERROR([
 You seem to have an OFED installed but have not installed it's devel package.
@@ -129,6 +129,9 @@ If you still want to build Lustre for your OFED I/B stack, you need to install a
 Instead, if you want to build Lustre for your kernel's built-in I/B stack rather than your installed OFED stack, either remove the OFED package(s) or use --with-o2ib=no.
                                             ])
                        ])
+                       if test -e $O2IBPATHS/default; then
+                           O2IBPATHS=$O2IBPATHS/default
+                       fi
                        OFED="yes"
                ], [
                        O2IBPATHS="$LINUX $LINUX/drivers/infiniband"