Issue compiling Mellanox Ofed supoprt for MIC

Issue compiling Mellanox Ofed supoprt for MIC

Hi,

We have a SLES11 SP3 non original kernel, and mellanox ofed 2.2 and when trying to rebuild the ofed-driver-3.3-1.src.rpm it fails with the following error:

# rpmbuild --rebuild --define MOFED=1 src/ofed-driver*.src.rpm
[...]
In file included from /usr/src/linux-3.0.101-0.35/include/linux/netdevice.h:34,
                 from /usr/src/linux-3.0.101-0.35/include/linux/if_arp.h:26,
                 from /usr/src/packages/BUILD/ofed-driver/ofa_kernel-1.5.4.1/drivers/infiniband/hw/scif/ibscif_driver.h:39,
                 from /usr/src/packages/BUILD/ofed-driver/ofa_kernel-1.5.4.1/drivers/infiniband/hw/scif/ibscif_main.c:31:
/usr/src/ofa_kernel/default/include/linux/pm_qos_params.h:27: error: ‘LINUX_BACKPORT’ declared as function returning a function
/usr/src/ofa_kernel/default/include/linux/pm_qos_params.h:27: warning: 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: warning: 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: warning: 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: warning: 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: warning: 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: warning: parameter names (without types) in function declaration
In file included from /usr/src/linux-3.0.101-0.35/include/linux/if_arp.h:26,
                 from /usr/src/packages/BUILD/ofed-driver/ofa_kernel-1.5.4.1/drivers/infiniband/hw/scif/ibscif_driver.h:39,
                 from /usr/src/packages/BUILD/ofed-driver/ofa_kernel-1.5.4.1/drivers/infiniband/hw/scif/ibscif_main.c:31:
/usr/src/linux-3.0.101-0.35/include/linux/netdevice.h:1064: error: field ‘pm_qos_req’ has incomplete type
make[5]: *** [/usr/src/packages/BUILD/ofed-driver/ofa_kernel-1.5.4.1/drivers/infiniband/hw/scif/ibscif_main.o] Error 1
make[4]: *** [/usr/src/packages/BUILD/ofed-driver/ofa_kernel-1.5.4.1/drivers/infiniband/hw/scif] Error 2
make[3]: *** [_module_/usr/src/packages/BUILD/ofed-driver/ofa_kernel-1.5.4.1] Error 2
make[2]: *** [sub-make] Error 2
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/src/linux-3.0.101-0.35-obj/x86_64/default'
make: *** [kernel] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.44285 (%build)

Dapl and libscif rebuilding went ok. Any ideas?

Thanks in advance

2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Best Reply

We solved it, it was a matter of disorder in the includes. This is how you can solve it, in case anyone else is using SLES11 SP3:

--- ofed-driver/src/kernel/drivers/infiniband/ibp/kmtest/tcp_utils.h.orig	2014-07-25 08:25:24.090751000 +0200
+++ ofed-driver/src/kernel/drivers/infiniband/ibp/kmtest/tcp_utils.h	2014-07-24 15:40:52.001716000 +0200
@@ -36,6 +36,7 @@
 #include <linux/kernel.h>
 #include <linux/net.h>
 #include <linux/socket.h>
+#include <linux/compat-2.6.h>
 #include <net/sock.h>
 #include <linux/in.h>
 #include <linux/slab.h>

This patch modifies the tcp_utils.h file inside the ofed-driver.tar.gz which is contained in the ofed-driver-3.3-1.src.rpm file in thge src directory.

Hope it helps.

 

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen